summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-05-19 11:24:34 -0500
committerToby Vincent <tobyv13@gmail.com>2023-05-19 11:24:34 -0500
commit8d8cad0fa72752130d9ed296b0e154ee377fa1b8 (patch)
tree424e8af69fbe268c75143ae4d30db5bd55b14315
parentc65841d798b9d5318be0db2a4d9983a0c3dfab54 (diff)
fix: fix page title generation
-rw-r--r--templates/index.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/templates/index.html b/templates/index.html
index 8de7317..1f2d933 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -7,12 +7,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex" />
<title>
- {% if this.title %}{{ this.title }} -{% endif %}
- {{ config.title }}
+ {% set this = page | default(value=section) %}
+ {% set len = this.components | length %}
+ {%- if len > 0 -%}
+ {{ this.title }} - {{ config.title }}
+ {%- else -%}
+ {{ config.title }}
+ {%- endif -%}
</title>
- <link rel="icon" type="image/png" href="/avatar.png" />
- <meta name="description"
- content="{{ section.description | default(value=config.description) }}" />
+ <meta name="description" content="{{ config.description }}" />
<meta name="keywords" content="blog" />
<link rel="alternate"
type="application/rss+xml"