From 9e1e7783b385b670bec774cbad604fbf4581d079 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 14 Nov 2020 11:03:12 -0300 Subject: Use "eu_categories" frontmatter attribute Jekyll treats names like "category" and "categories" differently, so I chose to name it "eu_categories" in order to avoid inheriting the special treatment, and have full control of what a category means and how it behaves. The _includes/category.html was changed to reflect that, with an extra coupled change that makes it not specific to articles, but any collection type. --- _articles/2020-08-31-the-database-i-wish-i-had.md | 2 +- ...5-cargo2nix-dramatically-simpler-rust-in-nix.md | 2 +- ...-10-05-swift2nix-run-swift-inside-nix-builds.md | 2 +- ...ferences-between-backend-frontend-and-mobile.md | 2 +- ...t-paradigm-shift-in-programming-video-review.md | 2 +- ...s-and-parser-combinators-building-a-database.md | 2 +- _includes/categories.html | 30 +++++++++++----------- categorias.md | 2 +- categories.en.md | 2 +- categories.fr.md | 2 +- kategorioj.md | 2 +- .../2020-08-31-the-database-i-wish-i-had.po | 30 ++++++++++++++-------- ...5-cargo2nix-dramatically-simpler-rust-in-nix.po | 27 ++++++++++++------- ...-10-05-swift2nix-run-swift-inside-nix-builds.po | 27 ++++++++++++------- ...ferences-between-backend-frontend-and-mobile.po | 30 ++++++++++++++-------- ...t-paradigm-shift-in-programming-video-review.po | 9 ++++--- ...s-and-parser-combinators-building-a-database.po | 9 ++++--- ...019-06-08-inconsistent-hash-of-buildgomodule.po | 9 +++++-- locale/eo/LC_MESSAGES/categories.en.po | 9 ++++--- .../2020-08-31-the-database-i-wish-i-had.po | 30 ++++++++++++++-------- ...5-cargo2nix-dramatically-simpler-rust-in-nix.po | 27 ++++++++++++------- ...-10-05-swift2nix-run-swift-inside-nix-builds.po | 27 ++++++++++++------- ...ferences-between-backend-frontend-and-mobile.po | 30 ++++++++++++++-------- ...t-paradigm-shift-in-programming-video-review.po | 9 ++++--- ...s-and-parser-combinators-building-a-database.po | 9 ++++--- ...019-06-08-inconsistent-hash-of-buildgomodule.po | 9 +++++-- locale/fr/LC_MESSAGES/categories.en.po | 9 ++++--- .../2020-08-31-the-database-i-wish-i-had.po | 30 ++++++++++++++-------- ...5-cargo2nix-dramatically-simpler-rust-in-nix.po | 27 ++++++++++++------- ...-10-05-swift2nix-run-swift-inside-nix-builds.po | 27 ++++++++++++------- ...ferences-between-backend-frontend-and-mobile.po | 30 ++++++++++++++-------- ...t-paradigm-shift-in-programming-video-review.po | 9 ++++--- ...s-and-parser-combinators-building-a-database.po | 9 ++++--- ...019-06-08-inconsistent-hash-of-buildgomodule.po | 9 +++++-- locale/pt/LC_MESSAGES/categories.en.po | 9 ++++--- 35 files changed, 328 insertions(+), 172 deletions(-) diff --git a/_articles/2020-08-31-the-database-i-wish-i-had.md b/_articles/2020-08-31-the-database-i-wish-i-had.md index a134e2c..7d127c1 100644 --- a/_articles/2020-08-31-the-database-i-wish-i-had.md +++ b/_articles/2020-08-31-the-database-i-wish-i-had.md @@ -5,7 +5,7 @@ updated_at: 2020-09-03 layout: post lang: en ref: the-database-i-wish-i-had -category: mediator +eu_categories: mediator --- I watched the talk diff --git a/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md b/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md index 8f415dc..f23be52 100644 --- a/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md +++ b/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md @@ -4,7 +4,7 @@ date: 2020-10-05 2 layout: post lang: en ref: cargo2nix-dramatically-simpler-rust-in-nix -category: mediator +eu_categories: mediator --- In the same vein of my earlier post on diff --git a/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md b/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md index 439605a..da7a976 100644 --- a/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md +++ b/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md @@ -4,7 +4,7 @@ date: 2020-10-05 1 layout: post lang: en ref: swift2nix-run-swift-inside-nix-builds -category: mediator +eu_categories: mediator --- While working on a Swift project, I didn't find any tool that would allow Swift diff --git a/_articles/2020-10-19-feature-flags-differences-between-backend-frontend-and-mobile.md b/_articles/2020-10-19-feature-flags-differences-between-backend-frontend-and-mobile.md index 49b8dd3..c62c2d1 100644 --- a/_articles/2020-10-19-feature-flags-differences-between-backend-frontend-and-mobile.md +++ b/_articles/2020-10-19-feature-flags-differences-between-backend-frontend-and-mobile.md @@ -5,7 +5,7 @@ updated_at: 2020-11-03 layout: post lang: en ref: feature-flags-differences-between-backend-frontend-and-mobile -category: presentation +eu_categories: presentation --- *This article is derived from a [presentation][presentation] on the same diff --git a/_articles/2020-11-08-the-next-paradigm-shift-in-programming-video-review.md b/_articles/2020-11-08-the-next-paradigm-shift-in-programming-video-review.md index 421f771..c98c131 100644 --- a/_articles/2020-11-08-the-next-paradigm-shift-in-programming-video-review.md +++ b/_articles/2020-11-08-the-next-paradigm-shift-in-programming-video-review.md @@ -10,7 +10,7 @@ lang: en ref: the-next-paradigm-shift-in-programming-video-review -category: video review +eu_categories: video review --- diff --git a/_articles/2020-11-12-durable-persistent-trees-and-parser-combinators-building-a-database.md b/_articles/2020-11-12-durable-persistent-trees-and-parser-combinators-building-a-database.md index d613a28..6e51575 100644 --- a/_articles/2020-11-12-durable-persistent-trees-and-parser-combinators-building-a-database.md +++ b/_articles/2020-11-12-durable-persistent-trees-and-parser-combinators-building-a-database.md @@ -10,7 +10,7 @@ lang: en ref: durable-persistent-trees-and-parser-combinators-building-a-database -category: mediator +eu_categories: mediator --- diff --git a/_includes/categories.html b/_includes/categories.html index 60a6ed6..22e5df3 100644 --- a/_includes/categories.html +++ b/_includes/categories.html @@ -1,18 +1,18 @@ -{% assign articles_with_categories = "" | split:"" %} -{% for article in site.articles %} - {% if article.lang == page.lang %} - {% if article.category %} - {% assign articles_with_categories = articles_with_categories | push:article %} +{% assign entries_with_categories = "" | split:"" %} +{% for entry in site[include.kind] %} + {% if entry.lang == page.lang %} + {% if entry.eu_categories %} + {% assign entries_with_categories = entries_with_categories | push:entry %} {% endif %} {% endif %} {% endfor %} -{% assign articles_with_categories = articles_with_categories | reverse %} +{% assign entries_with_categories = entries_with_categories | reverse %} {% assign categories = "" | split:"" %} -{% for article in articles_with_categories %} - {% assign article_categories = article.category | split:"," %} - {% for article_category in article_categories %} - {% assign categories = categories | push:article_category %} +{% for entry in entries_with_categories %} + {% assign entry_categories = entry.eu_categories | split:"," %} + {% for entry_category in entry_categories %} + {% assign categories = categories | push:entry_category %} {% endfor %} {% endfor %} @@ -22,12 +22,12 @@ {{ category }}: