MitseaBlog/themes/hugo-theme-stack/layouts/partials/data/description.html

17 lines
473 B
HTML
Raw Normal View History

2022-10-11 17:34:41 +08:00
<!-- Use site subtitle by default -->
{{ $description := .Site.Params.sidebar.subtitle }}
2024-07-31 17:10:56 +08:00
<!-- Seprate description exists -->
{{ if .Site.Params.description }}
{{ $description = .Site.Params.description }}
{{ end }}
2022-10-11 17:34:41 +08:00
{{ if .Description }}
<!-- Page description exists -->
{{ $description = .Description }}
{{ else if .IsPage }}
<!-- Use page summary -->
{{ $description = .Summary }}
{{ end }}
2024-07-31 17:10:56 +08:00
{{ return (replaceRE "\n" " " $description | plainify) }}