diff options
author | garhve <git@garhve.com> | 2023-01-02 06:02:01 +0800 |
---|---|---|
committer | garhve <git@garhve.com> | 2023-01-02 06:02:01 +0800 |
commit | be772f40c42711de54a3331db2781b1511acba9d (patch) | |
tree | 0808a7750d3c1055b0e86071c219d872775b1f92 /templates/index.html | |
parent | 3ae5ecf803ed2d4ece2c9da6d91aae0f075c5b0c (diff) |
change to zola
Diffstat (limited to 'templates/index.html')
-rw-r--r-- | templates/index.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..64ac3cd --- /dev/null +++ b/templates/index.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% block content %} + +{% set section = get_section(path="post/_index.md") %} +{% for year, pages in section.pages | group_by(attribute="year") %} + <h3>{{ year}} </h3> + + {% for page in pages %} + <p> + <div class="date"> + {{ page.date }} + </div> + + <div class="title"> + <a href="{{ page.permalink | safe }}">{{ page.title }}</a> + </div> + + <div class="taxonomies_index"> + {% if page.taxonomies.categories %} + {% for category in page.taxonomies.categories %} +  <a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a> + {% endfor %} + {% endif %} + + {% if page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} +  <a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a> + {% endfor %} + {% endif %} + </div> + </p> + {% endfor %} +{% endfor %} + +{% endblock content %} |