From 00a186d12a2ad530a39fafe726150d67a212ecbf Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 16 Jun 2021 13:58:12 +0200 Subject: templates: Do not show slogan on all pages Currently we show the slogan both on the index as well as all sub-pages. This needs some special handling in the template, since the page description for the index is empty (the slogan takes its place). Simplify the template further by making sure description is always set, and set it to the slogan only on the index page. --- templates/base.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'templates/base.html') diff --git a/templates/base.html b/templates/base.html index 8c42d17..9190f0e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,17 +1,16 @@ {% import "macros.html" as macros -%} +{%- set description = config.description -%} + {%- if page -%} - {%- set description = "post № " ~ page.slug -%} - {%- set title = page.title | default(value=description) -%} + {%- set description = page.title | default(value="post № " ~ page.slug) -%} {%- elif term -%} {%- set description = "posts tagged with #" ~ term.name -%} - {%- set title = description -%} {%- elif terms -%} {%- set description = "all tags" -%} - {%- set title = description -%} {%- endif -%} -{%- set title = title | default(value=config.description) -%} +{%- set title = title | default(value=description) -%} @@ -33,7 +32,7 @@

{{ config.title }}