Update for zola v0.15.3+

This commit is contained in:
southerntofu 2022-02-17 15:22:41 +01:00
parent 7143d34bf4
commit af9bb6d9d5
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf8">{# TAXONOMY: no section.title here #}
<title>{% block title %}{{ section.title|default(value=taxonomy.name|default(value=config.extra.title|default(value=""))) }}{% endblock %}</title>
{% if generate_rss %}<link rel="alternate" type="application/rss+xml" href="{% if lang %}{{ widgets::i18n_url(path="rss.xml") }}{% else %}{{ get_url(path="rss.xml")}}{% endif %}">
{% if config.generate_feed %}<link rel="alternate" type="application/atom+xml" href="{% if lang %}{{ widgets::i18n_url(path="atom.xml") }}{% else %}{{ get_url(path="atom.xml")}}{% endif %}">
{% endif %}<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ get_url(path="water." ~ config.extra.color ~ ".css") }}" type="text/css">
{%- for stylesheet in config.extra.stylesheets %}
@ -40,7 +40,7 @@
{# TAXONOMY: Please override me or i will crash your site #}
{% if config.extra.home_section %}
{% set home_section = config.extra.home_section ~ "/_index.md" %}{% set i18n_home_section = get_section(path=widgets::i18n_path(path=home_section)) %}
{{ widgets::section(cur_section=i18n_home_section, full_articles=config.extra.home_fullarticles, title=config.extra.home_title, cur_pages=i18n_home_section) }}
{{ widgets::section(cur_section=i18n_home_section, full_articles=config.extra.home_fullarticles, title=config.extra.home_title, cur_pages=i18n_home_section.pages) }}
{% else %}
{% if config.extra.home_title %}<h1 class="p-name">{{ section.title }}</h1>{% endif %}
{{ section.content | markdown | safe }}

View File

@ -64,6 +64,10 @@ author = "kognise"
homepage = "https://kognise.github.io/water.css/"
repo = "https://github.com/kognise/water.css"
# TODO: zola does not support theme translations, so we have to use
# extra.translations as a hack. This way, widgets::t(key="foo", lang=lang)
# can look here, and look for overrides in config.extra also.
[extra.translations.fr]
source = "Source de cette page"
readmore = "Lire la suite"
@ -77,5 +81,4 @@ readmore = "Read more"
previousPage = "Previous page"
nextPage = "Next page"
dateFormat = "%m/%d/%Y"
base_url = "https://staticadventures.netlib.re"
nothing_yet = "There is no article in this section yet."