Hugo-theme-stack/layouts/partials/data/description.html

17 lines
473 B
HTML
Raw Permalink Normal View History

<!-- Use site subtitle by default -->
{{ $description := .Site.Params.sidebar.subtitle }}
<!-- Seprate description exists -->
{{ if .Site.Params.description }}
{{ $description = .Site.Params.description }}
{{ end }}
{{ if .Description }}
<!-- Page description exists -->
{{ $description = .Description }}
{{ else if .IsPage }}
<!-- Use page summary -->
{{ $description = .Summary }}
{{ end }}
{{ return (replaceRE "\n" " " $description | plainify) }}