From 932b7df85d942b9c0716e0d6a89d0e8d9083070b Mon Sep 17 00:00:00 2001 From: mose Date: Fri, 8 Sep 2017 19:55:04 +0800 Subject: [PATCH] add data for categories --- _data/categories.yml | 5 +++++ pages/cercles.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 _data/categories.yml diff --git a/_data/categories.yml b/_data/categories.yml new file mode 100644 index 0000000..540ebc8 --- /dev/null +++ b/_data/categories.yml @@ -0,0 +1,5 @@ +"Collaboratif": + C'est un texte pour exemple +"Démocratie": + Voila un autre texte + diff --git a/pages/cercles.md b/pages/cercles.md index 54d5308..dbcc7ab 100644 --- a/pages/cercles.md +++ b/pages/cercles.md @@ -13,7 +13,12 @@ category: base {% for item in (0..site.categories.size) %}{% unless forloop.last %} {% capture this_word %}{{ categories_list[item] | strip_newlines }}{% endcapture %} +

{{ this_word }}

+{% if site.data.categories[this_word] %} +
{{ site.data.categories[this_word] }}
+{% endif %} +