theme: avoid duplicate title on home page if no file is provided #580

This commit is contained in:
Sören Weber 2023-06-28 20:46:09 +02:00
parent de625fe57b
commit 2835ef004a
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -1,4 +1,4 @@
{{- if or .IsHome (not .Title) }} {{- if not .Title }}
{{- $title := .Site.Title }} {{- $title := .Site.Title }}
{{- partial "heading-pre.html" . }}<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>{{ partial "heading-post.html" . }} {{- partial "heading-pre.html" . }}<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>{{ partial "heading-post.html" . }}
{{- end }} {{- end }}