hugo-theme-hilfe/layouts/partials/utils/description.html
2022-02-18 14:03:19 +01:00

14 lines
403 B
HTML

{{ $isPage := or (and (ne .Type "posts") (in "section page" .Kind )) (and (eq .Type "posts") (eq .Kind "page")) }}
{{ $description := "" }}
{{ if .Description }}
{{ $description = .Description }}
{{ else }}
{{ if $isPage }}
{{ $description = .Summary }}
{{ else if .Site.Params.description }}
{{ $description = .Site.Params.description }}
{{ end }}
{{ end }}
{{ return $description }}