Hugo-theme-stack/layouts/partials/data/description.html
FarisZR 70f431ea18
feat: add a separate configuration field for site description (#672)
* Add an optional site description option

* Add site description to the example site (Chinese Auto-translated)
2022-10-22 11:56:38 +02:00

17 lines
453 B
HTML

<!-- 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 ($description | plainify)}}