From 191728a2cac217e96a7f1e4e9a4710606f6ad920 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 12 Aug 2020 06:34:38 -0300 Subject: 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" -> EuAndreh; - 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; --- site.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'site.json') diff --git a/site.json b/site.json index 8c22cc5..032fe2f 100644 --- a/site.json +++ b/site.json @@ -9,6 +9,7 @@ "url": "{{ post.url }}", "lang": "{{ post.lang }}", "ref": "{{ post.ref }}", + "layout": "post", "content": {{ post.content | strip_html | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} @@ -20,6 +21,7 @@ "url": "{{ page.url }}", "lang": "{{ page.lang }}", "ref": "{{ page.ref }}", + "layout": "page", "content": {{ page.content | strip_html | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} @@ -28,12 +30,26 @@ {% for pastebin in site.pastebins %} { "title": "{{ pastebin.title | smartify }}", - "date": "{{ post.date }}", + "date": "{{ pastebin.date }}", "url": "{{ pastebin.url }}", "lang": "{{ pastebin.lang }}", "ref": "pastebin-ref", + "layout": "pastebin", "content": {{ pastebin.content | strip_html | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} + ], + "tils": [ + {% for til in site.tils %} + { + "title": "{{ til.title | smartify }}", + "date": "{{ til.date }}", + "url": "{{ til.url }}", + "lang": "{{ til.lang }}", + "ref": "{{ til.ref }}", + "layout": "til", + "content": {{ til.content | strip_html | jsonify }} + }{% unless forloop.last %},{% endunless %} + {% endfor %} ] } -- cgit v1.2.3