🐛 fix: use set_title macro to set proper titles

Fixes #33
This commit is contained in:
welpo
2023-02-22 23:28:14 +01:00
parent 872992b426
commit 53d2624133
3 changed files with 31 additions and 13 deletions

View File

@@ -4,30 +4,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{# Site title #}
{% set current_path = current_path | default(value="/") %}
{% if current_path == "/" %}
<title>
{{ config.title | default(value="Home") }}
</title>
{% else %}
<title>
{{ page.title | default(value=config.title) | default(value="Post") }}
</title>
{% endif %}
<title>{{ macros_set_title::set_title(title="") }}</title>
{# Favicon #}
{% if config.extra.favicon %}
<link rel="icon" type="image/png" href={{ config.extra.favicon }} />
{% endif %}
{# RSS #}
<link rel="alternate" type="application/atom+xml" title="{{ config.title }}" href="{{ get_url(path="atom.xml",
trailing_slash=false) }}">
<link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="main.css" ) }} />
{% if config.extra.stylesheets %}
{% for stylesheet in config.extra.stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=stylesheet) }}">