summaryrefslogtreecommitdiffstats
path: root/layouts/partials/description.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/description.html')
-rw-r--r--layouts/partials/description.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/partials/description.html b/layouts/partials/description.html
new file mode 100644
index 0000000..e63c0d9
--- /dev/null
+++ b/layouts/partials/description.html
@@ -0,0 +1,15 @@
+{{- $description := "" -}}
+
+{{- if .IsHome -}}
+ {{- $description = site.Params.Description -}}
+{{- else -}}
+ {{- if and (.Params.Description) (ne .Params.Description "") -}}
+ {{- $description = print .Params.Description -}}
+ {{- else if and (.Params.Summary ) (ne .Params.Summary "") -}}
+ {{- $description = print .Params.Summary -}}
+ {{- else -}}
+ {{- $description = print .Summary -}}
+ {{- end -}}
+{{- end -}}
+
+{{- $description | plainify | safeHTML | chomp | truncate 180 -}}