diff options
author | EuAndreh <eu@euandre.org> | 2020-10-05 21:27:57 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-10-10 14:31:24 -0300 |
commit | a7c4db7e9215694ef6c50debcc0b4e7402265687 (patch) | |
tree | d45b89f1758b34416e5157cb0e7404276c6fa49a /_includes | |
parent | cargo2nix: Use overlay on example (diff) | |
download | euandre.org-a7c4db7e9215694ef6c50debcc0b4e7402265687.tar.gz euandre.org-a7c4db7e9215694ef6c50debcc0b4e7402265687.tar.xz |
Refactor i18n structure, remove layouts, add slides
Yep, this commit is too big big I didn't want to take the trouble of splitting
it now.
- _config.yml translation keys are now simetrical on the entitiy: articles,
pastebins, tils, slides, etc.;
- _posts were moved to _articles: the _posts collection had special treatment in
Jekyll which I wanted to avoid;
- the filtering of entries for the Atom feed is now done inside the
_includes/feed.atom file instead of every feed file;
- all entities are now dealt with using the pluralized name: articles,
pastebins, tils, slides. No more inconsistencies on the key names, they now
should only make sense as the translation value on the dictionary;
- add base reveal.js infrastruture, with Jekyll generating the listing page and
nothing else.
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/feed.atom | 5 | ||||
-rw-r--r-- | _includes/link-listing.html | 15 |
2 files changed, 18 insertions, 2 deletions
diff --git a/_includes/feed.atom b/_includes/feed.atom index 511611f..53a0897 100644 --- a/_includes/feed.atom +++ b/_includes/feed.atom @@ -5,14 +5,15 @@ <id>{{ page.url | absolute_url | xml_escape }}</id> <title>{{ site.title | xml_escape }}</title> - <subtitle>{{ site.t.feed.title[include.kind][include.lang] | smartify | xml_escape }}</subtitle> + <subtitle>{{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }}</subtitle> <author> <name>{{ site.author.name | xml_escape }}</name> <email>{{ site.author.email | xml_escape }}</email> </author> - {% for entry in include.entries %} + {% assign entries = include.entries | where:"lang", page.lang | sort: "date" | reverse %} + {% for entry in 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 }}" /> diff --git a/_includes/link-listing.html b/_includes/link-listing.html new file mode 100644 index 0000000..2828efb --- /dev/null +++ b/_includes/link-listing.html @@ -0,0 +1,15 @@ +<h2> + {{ site.t[include.kind].listing[page.lang] }} + <a href="{% link {{ site.t[include.kind].feed.url[page.lang] }} %}"> + <img class="simple-icon" src="/images/atom.svg" alt="{{ site.t.alt.atom[page.lang] }}" /> + </a> +</h2> + +<ul> + {% assign entries = include.entries | where:"lang", page.lang | sort: "date" | reverse %} + {% for entry in entries %} + <li> + <a href="{{ entry.url | relative_url }}">{{ entry.title | escape }}</a> - {% include i18n-date.html date=entry.date %} + </li> + {% endfor %} +</ul> |