Unify HTML and RSS titles

This commit is contained in:
Will Faught
2022-12-11 02:01:53 -08:00
parent 10382fed51
commit 602a71e593
6 changed files with 28 additions and 13 deletions

View File

@@ -1,10 +1,14 @@
{{ define "main" }}
{{ if .Title }}
{{ $title := .Title }}
{{ if not $title }}
{{ $title = .Site.Title }}
{{ end }}
{{ if $title }}
<h1 class="display-1 fw-bold text-center">
{{ if .Params.link }}
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
<a href="{{ .Params.link }}">{{ $title | markdownify }}</a>
{{ else }}
{{ .Title | markdownify }}
{{ $title | markdownify }}
{{ end }}
</h1>
{{ end }}