From 46a4814400126555170c480215a4b44a7bc737bc Mon Sep 17 00:00:00 2001 From: 1peter10 Date: Sat, 6 Apr 2024 18:59:54 +0200 Subject: macros.html: Add divider if a post has mulitple categories (#166) Co-authored-by: Peter --- templates/macros/macros.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/macros/macros.html b/templates/macros/macros.html index d39b1cd..0473399 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -89,7 +89,7 @@ {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}{%- endif %}{% endif %} {#- Categories #} - {%- if page.taxonomies.categories %} {%- if config.extra.icon_info %} {% endif %} [{% for cat in page.taxonomies.categories %}{{ cat }}{% endfor %}]{% endif %} + {%- if page.taxonomies.categories %} {%- if config.extra.icon_info %} {% endif %} [{% for cat in page.taxonomies.categories %}{{ cat }}{%- if not loop.last %}, {% endif %}{% endfor %}]{% endif %} {#- Tags #} {%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #{{ tag }} {% endfor -%}{%- endif %} @@ -163,7 +163,7 @@ {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}{%- endif %}{% endif %} {#- Categories #} - {%- if page.taxonomies.categories %} {%- if config.extra.icon_info %} {% endif %} [{% for cat in page.taxonomies.categories %}{{ cat }}{% endfor %}]{% endif %} + {%- if page.taxonomies.categories %} {%- if config.extra.icon_info %} {% endif %} [{% for cat in page.taxonomies.categories %}{{ cat }}{%- if not loop.last %}, {% endif %}{% endfor %}]{% endif %} {#- Tags #} {%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #{{ tag }} {% endfor -%}{%- endif %} -- cgit v1.3.1