Update for zola v0.15.3+

This commit is contained in:
southerntofu 2022-02-17 15:25:44 +01:00
parent 21e581b9e5
commit 31c7f74320
4 changed files with 28 additions and 15 deletions

View File

@ -3,15 +3,11 @@ theme = "water"
compile_sass = true
highlight_code = false
build_search_index = false
generate_rss = true
generate_feed = true
default_language = "en"
taxonomies = [
{name = "skills", rss = true},
]
languages = [
{code = "fr", rss = true },
{ name = "skills", feed = true }
]
[extra]
@ -29,22 +25,39 @@ browse = "https://tildegit.org/southerntofu/staticadventures/src/branch/master/"
home = "https://tildegit.org/"
name = "tildegit"
# Need to keep this here until zola has support for theme translations
[translations.fr]
[languages.fr]
generate_feed = true # there will be a feed for French content
build_search_index = true
taxonomies = [
{ name = "skills", feed = true }
]
[languages.en]
generate_feed = true
build_search_index = true
taxonomies = [
{ name = "skills", feed = true }
]
# TODO: zola theme translations support?
[extra.translations.fr]
source = "Source de cette page"
readmore = "Lire la suite"
previousPage = "Page précédente"
nextPage = "Page suivante"
dateFormat = "%d/%m/%Y"
nothing_yet = "Il n'y a pas encore d'article dans cette section."
# Custom
skills = "Cet article présume que tu connais : "
[translations.en]
[extra.translations.en]
source = "Source for this page"
readmore = "Read more"
previousPage = "Previous page"
nextPage = "Next page"
dateFormat = "%m/%d/%Y"
nothing_yet = "There is no article in this section yet."
# Custom
skills = "This article assumes you know of: "

View File

@ -5,11 +5,11 @@
<div>
<h1 class="p-name">{{ page.title }}</h1>
<a class="u-url" hidden aria-hidden="true" href="{{ page.permalink }}">Permalink</a>
{%- if page.date -%}<time class="dt-published" datetime="{{ page.date }}">📅&nbsp;{{ page.date | date(format=trans(key="dateFormat", lang=lang)) }}</time>{%- endif -%}
{%- if page.date -%}<time class="dt-published" datetime="{{ page.date }}">📅&nbsp;{{ page.date | date(format=widgets::t(key="dateFormat", lang=lang)) }}</time>{%- endif -%}
</div>
{% if page.taxonomies.skills %}
<aside class="skills">
👍 {{ trans(key="skills", lang=lang) }}{% for skill in page.taxonomies.skills %}<a href="{{ get_taxonomy_url(kind="skills", name=skill) }}">{{ skill }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
👍 {{ widgets::t(key="skills", lang=lang) }}{% for skill in page.taxonomies.skills %}<a href="{{ get_taxonomy_url(kind="skills", name=skill) }}">{{ skill }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
</aside>
{% endif %}
<div class="e-content">{{ page.content | safe }}</div>

View File

@ -2,5 +2,5 @@
{% block main %}
{# HACK: paginator is not set on transparent sections (i.e. blog/2020/_index.md) #}
{{ widgets::section(cur_section=section, full_articles=false, cur_paginator=paginator|default(value=false)) }}
{{ widgets::section(cur_section=section, full_articles=false, cur_paginator=paginator|default(value=false), cur_pages=section.pages) }}
{% endblock main %}

@ -1 +1 @@
Subproject commit a9ce0573982dc47466c335738c4c85f3b67e03d8
Subproject commit e9a1bf2544cbc255de3c3b60161fe973f5f603d3