mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +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 }} |