Allow a summary to be specified for widget pages (#611)

Enable `summary = "your page summary"` to be set in a widget page's `_index.md`.

This metadata will then be used to enrich SEO, social sharing, and Academic's search.
This commit is contained in:
Dominik Schürmann authored and gcushen committed 2018-08-01 23:33:17 +01:00
1 parent 6f4159976a
commit c777bbdbad
1 file changed
+6 -8
+6 -8
View File
@@ -12,14 +12,12 @@
{{ $scr := .Scratch }}
{{/* Generate page description. */}}
{{ $scr.Set "description" .Site.Params.role }}
{{ if .IsPage }}
{{ if .Params.abstract }}
{{ $scr.Set "description" .Params.abstract }}
{{ else if .Params.summary }}
{{ $scr.Set "description" .Params.summary }}
{{ else }}
{{ $scr.Set "description" .Summary }}
{{ end }}
{{ if .Params.abstract }}
{{ $scr.Set "description" .Params.abstract }}
{{ else if .Params.summary }}
{{ $scr.Set "description" .Params.summary }}
{{ else if .IsPage }}
{{ $scr.Set "description" .Summary }}
{{ end }}
<meta name="description" content="{{ $scr.Get "description" }}">