Skip to content

Commit

Permalink
Merge pull request #2497 from HarHarLinks/patch-42
Browse files Browse the repository at this point in the history
Show all categories on blog.html
  • Loading branch information
MTRNord authored Sep 16, 2024
2 parents cde4017 + 277e857 commit 3b1aad5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
13 changes: 8 additions & 5 deletions templates/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ <h1><a href="{{ page.permalink }}" title="{{ page.title }}">{{ page.title }}</a>
{{ page.date | date(format="%d.%m.%Y %H:%M") }}
{% if page.taxonomies.category -%}
<a href="/category/{{ page.taxonomies.category | first | slugify }}">
{{ page.taxonomies.category | first }}
{% for category in page.taxonomies.category %}
<a href="/category/{{ category | slugify }}">
{{- category -}}
</a>
{% endif -%}
{%- if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{% for author in page.taxonomies.author %}
<a href="/author/{{ author | default(value=['unknown author']) | slugify }}">
{{ author | default(value=["unknown author"]) }}
</a>{% if not loop.last %}, {% endif %}
{{- author | default(value=["unknown author"]) -}}
</a>
{%- if not loop.last %}, {% endif %}
{% endfor %}
</span>
{% if page.updated -%}
Expand Down
16 changes: 10 additions & 6 deletions templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ <h1>{{ page.title }}</h1>
{{ page.date | date(format="%d.%m.%Y %H:%M") }}
{% if page.taxonomies.category %}
{% for category in
page.taxonomies.category %}<a href="/category/{{ category | slugify }}">{{ category }}</a>{% if not
loop.last %}, {% endif %}{% endfor %}
{% for category in page.taxonomies.category %}
<a href="/category/{{ category | slugify }}">
{{- category -}}
</a>
{%- if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{% for author in page.taxonomies.author %}<a
href="/author/{{ author | default (value=['unknown author']) | slugify }}">{{ author | default
(value=["unknown author"]) }}</a>{% if not loop.last %}, {% endif %}
{% for author in page.taxonomies.author %}
<a href="/author/{{ author | default (value=['unknown author']) | slugify }}">
{{- author | default (value=["unknown author"]) -}}
</a>
{%- if not loop.last %}, {% endif %}
{% endfor %}
</span>
{% if page.updated %}
Expand Down

0 comments on commit 3b1aad5

Please sign in to comment.