mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-03 12:43:05 +00:00
12 lines
No EOL
325 B
Go Template
12 lines
No EOL
325 B
Go Template
{{- $title := "" }}
|
|
{{- with . }}
|
|
{{- $pagetitle := "" }}
|
|
{{- with .Page }}
|
|
{{- $pagetitle = or .LinkTitle .Title }}
|
|
{{- end }}
|
|
{{- $title = or .Title (.Name | safeHTML) }}
|
|
{{- if and (eq $pagetitle .Title) (ne .Name .Title) }}
|
|
{{- $title = (.Name | safeHTML) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- return $title }} |