mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 14:14:48 +00:00
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:
1 parent
6f4159976a
commit
c777bbdbad
1 file changed
+6
-8
@@ -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" }}">
|
||||
|
||||
|
||||
Reference in new issue
Block a user