From d216cc497bb103dc49e82671b974300bd0bf0eef Mon Sep 17 00:00:00 2001 From: harish-coeff Date: Thu, 28 Dec 2023 13:20:27 +0530 Subject: [PATCH] for tags taxonomy --- config.toml | 2 ++ templates/macros/macros.html | 17 +++++++++++++++++ templates/taxonomy_list.html | 13 +++++++++++-- templates/taxonomy_single.html | 19 +++---------------- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/config.toml b/config.toml index c8e2ed2a..0357f055 100644 --- a/config.toml +++ b/config.toml @@ -4,6 +4,7 @@ build_search_index = false generate_feed = true compile_sass = true minify_html = true +taxonomies = [{ name = "tags" }] [markdown] highlight_code = true @@ -21,6 +22,7 @@ menu = [ { name = "/posts", url = "/posts", weight = 1 }, { name = "/projects", url = "/projects", weight = 2 }, { name = "/about", url = "/about", weight = 3 }, + { name = "/tags", url = "/tags", weight = 4 }, ] socials = [ diff --git a/templates/macros/macros.html b/templates/macros/macros.html index 48d8ea6e..1e76fcf6 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -1,3 +1,20 @@ +{% macro list_title(pages, tag_name=false) %} + {% if tag_name %} +

Entries tagged - "{{ term.name }}"

+ {% else %} +

All articles

+ {% endif %} + + +{% endmacro list_title %} + {% macro list_posts(pages) %}