aboutsummaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-12 06:34:38 -0300
committerEuAndreh <eu@euandre.org>2020-08-12 06:56:04 -0300
commit191728a2cac217e96a7f1e4e9a4710606f6ad920 (patch)
treebbcf9c17bb3bd462f8d1c41169d1122b08161d18 /_includes
parentassert-content.sh: Look at post refs too, not only pages (diff)
downloadeuandre.org-191728a2cac217e96a7f1e4e9a4710606f6ad920.tar.gz
euandre.org-191728a2cac217e96a7f1e4e9a4710606f6ad920.tar.xz
Add TILs section, with Atom support and i18n
- add i18n logic to support translated TIL entries and listing; - make the website title less tied to a blog: "EuAndreh::blog" -> <web>EuAndreh</web>; - remove old Atom feed link aliases; - remove feed.all.atom and it's link in the about page; - create Atom feed for TIL entries; - show blog and TIL Atom feed on their listing pages (index and tils-listing); - add root alias: / -> /en/ - remove explicit list of feeds from $IGNORED_PAGES and use a '*.atom' glob instead; - also lint, assert-content and assert-unique-ref of TILs; - fix wrong "post.date" in pastebin entry in site.json;
Diffstat (limited to '_includes')
-rw-r--r--_includes/feed.atom20
1 files changed, 10 insertions, 10 deletions
diff --git a/_includes/feed.atom b/_includes/feed.atom
index bf0f4d4..5451702 100644
--- a/_includes/feed.atom
+++ b/_includes/feed.atom
@@ -6,29 +6,29 @@
<id>{{ page.url | absolute_url | xml_escape }}</id>
<title type="html">{{ site.title | smartify | xml_escape }}</title>
- <subtitle>{{ site.t.feed_title[include.lang] | smartify | xml_escape }}</subtitle>
+ <subtitle>{{ site.t.feed.title[include.kind][include.lang] | smartify | xml_escape }}</subtitle>
<author>
<name>{{ site.author.name | xml_escape }}</name>
<email>{{ site.author.email | xml_escape }}</email>
</author>
- {% for post in include.posts %}
- <entry xml:lang="{{ post.lang }}">
- <title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
- <link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
- <published>{{ post.date | date_to_xmlschema }}</published>
- <updated>{{ post.updated_at | default: post.date | date_to_xmlschema }}</updated>
- <id>{{ post.url | absolute_url | xml_escape }}</id>
+ {% for entry in include.entries %}
+ <entry xml:lang="{{ entry.lang }}">
+ <title type="html">{{ entry.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
+ <link href="{{ entry.url | absolute_url }}" rel="alternate" type="text/html" title="{{ entry.title | xml_escape }}" />
+ <published>{{ entry.date | date_to_xmlschema }}</published>
+ <updated>{{ entry.updated_at | default: entry.date | date_to_xmlschema }}</updated>
+ <id>{{ entry.url | absolute_url | xml_escape }}</id>
- <content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}">{{ post.content | strip | xml_escape }}</content>
+ <content type="html" xml:base="{{ entry.url | absolute_url | xml_escape }}">{{ entry.content | strip | xml_escape }}</content>
<author>
<name>{{ site.author.name | xml_escape }}</name>
<email>{{ site.author.email | xml_escape }}</email>
</author>
- <summary type="html">{{ post.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
+ <summary type="html">{{ entry.excerpt | strip_html | normalize_whitespace | xml_escape }}</summary>
</entry>
{% endfor %}
</feed>