Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/data/description.html')
-rw-r--r--layouts/partials/data/description.html23
1 files changed, 12 insertions, 11 deletions
diff --git a/layouts/partials/data/description.html b/layouts/partials/data/description.html
index 5531ab5..fa9f785 100644
--- a/layouts/partials/data/description.html
+++ b/layouts/partials/data/description.html
@@ -1,11 +1,12 @@
-{{- with .Description -}}
- {{- . -}}
-{{- else -}}
- {{- if .IsPage -}}
- {{- .Summary -}}
- {{- else -}}
- {{- with .Site.Params.subtitle -}}
- {{- . -}}
- {{- end -}}
- {{- end -}}
-{{- end -}} \ No newline at end of file
+<!-- Use site subtitle by default -->
+{{ $description := .Site.Params.subtitle }}
+
+{{ if .Description }}
+ <!-- Page description exists -->
+ {{ $description = .Description }}
+{{ else if .IsPage }}
+ <!-- Use page summary -->
+ {{ $description = .Summary }}
+{{ end }}
+
+{{ return ($description | plainify)}} \ No newline at end of file