diff --git a/_config.yml b/_config.yml index 9398803..5389fc2 100644 --- a/_config.yml +++ b/_config.yml @@ -3,3 +3,8 @@ description: Collection of highlights from the books I have read over the years url: "https://books.sayan.ee" markdown: kramdown permalink: /:title +tag_mapping: + 1: "self-help" + 2: "spirituality" + 3: "fiction" + 4: "biography" diff --git a/_includes/tags.html b/_includes/tags.html new file mode 100644 index 0000000..ee7e29d --- /dev/null +++ b/_includes/tags.html @@ -0,0 +1,9 @@ +{% assign tag_mapping = site.tag_mapping %} +{% if post.tags %} +{% for tag_number in post.tags %} +{% assign tag_number = tag_number | plus: 1 | strip %} +{% if tag_mapping[tag_number] %} + {{ tag_mapping[tag_number] }} +{% endif %} +{% endfor %} +{% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index 3014c52..de98bf5 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -36,6 +36,20 @@
{% include info.html %}