summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-06 10:24:47 +0800
committerEltrac <hi@guhub.cn>2025-11-06 10:24:47 +0800
commit80eb9daba825a915cc9be40e8930ad815c6db9e4 (patch)
treeb31fee6fcce5841c1ee7bed0b11fe022550ff885
parent1e846b520b306a2573853bd1263eef34a0cd3f9e (diff)
feat: show page title instead of site title when not in home
-rw-r--r--layouts/_partials/header.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html
index df956db8..9ef52b42 100644
--- a/layouts/_partials/header.html
+++ b/layouts/_partials/header.html
@@ -6,7 +6,13 @@
<a class="text-8 font-900 text-center tracking-widest
xerox hover:no-underline"
href="{{ .Site.LanguagePrefix }}/"
- >{{ .Site.Title }}</a
+ >
+ {{ if .IsHome }}
+ {{ .Site.Title }}
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+ </a
>
</div>
<!-- Navigation -->