uci-hugo-doc/layouts/partials/utils/description.html

15 lines
403 B
HTML
Raw Permalink Normal View History

2022-06-11 08:46:13 -07:00
{{ $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 }}