Skip to content

Commit

Permalink
fix: update theme for zola 0.17.1 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jieiku authored Mar 13, 2023
1 parent dbaac33 commit 661ecc4
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ feed_limit = 20
# {name = "authors"}, # Basic definition: no feed or pagination
# ]
#
taxonomies = []
taxonomies = [
{name = "tags"},
{name = "categories"},
]

# The additional languages for the site.
# Example:
Expand All @@ -48,7 +51,7 @@ taxonomies = []
# {code = "it"}, # there won't be a feed for Italian content
# ]
#
languages = []
#languages = []

# When set to "true", the Sass files in the `sass` directory in the site root are compiled.
# Sass files in theme directories are always compiled.
Expand Down
16 changes: 16 additions & 0 deletions templates/categories/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "index.html" %}

{% block content %}
<div>
<center>
<h1>{{ terms | length }} Categories</h1>
<p>{% for term in terms -%}[<a href="#{{ term.name }}">{{ term.name }}</a>] &nbsp; {%- endfor %}</p>
</center>
{% for term in terms -%}
<h2 id="{{ term.name }}"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2>
{% for page in term.pages -%}
<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
{% endfor -%}
{% endfor -%}
</div>
{% endblock content %}
13 changes: 13 additions & 0 deletions templates/categories/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "index.html" %}

{% block content %}
<div>
<h2>{{ term.name }}</h2>
{% for year, posts in term.pages | group_by(attribute="year") %}
<h3>{{ year }}</h3>
{% for page in posts %}
<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
{% endfor %}
{% endfor %}
</div>
{% endblock content %}
16 changes: 16 additions & 0 deletions templates/tags/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "index.html" %}

{% block content %}
<div>
<center>
<h1>{{ terms | length }} Tags</h1>
<p>{% for term in terms -%}#<a href="#{{ term.name }}">{{ term.name }}</a> &nbsp; {%- endfor %}</p>
</center>
{% for term in terms -%}
<h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2>
{% for page in term.pages -%}
<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
{% endfor -%}
{% endfor -%}
</div>
{% endblock content %}
13 changes: 13 additions & 0 deletions templates/tags/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "index.html" %}

{% block content %}
<div>
<h2>{{ term.name }}</h2>
{% for year, posts in term.pages | group_by(attribute="year") %}
<h3>{{ year }}</h3>
{% for page in term.pages %}
<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p>
{% endfor %}
{% endfor %}
</div>
{% endblock content %}

0 comments on commit 661ecc4

Please sign in to comment.