Assign template context to var
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
{{ $page := . }}
|
||||
|
||||
<meta charset="utf-8">
|
||||
{{ with partial "paige/func-authors.html" . }}
|
||||
{{ with partial "paige/func-authors.html" $page }}
|
||||
<meta content="{{ . }}" name="author">
|
||||
{{ end }}
|
||||
{{ with .Description }}
|
||||
{{ with $page.Description }}
|
||||
<meta content="{{ . }}" name="description">
|
||||
{{ end }}
|
||||
{{ if or .Keywords .Params.tags .Params.categories }}
|
||||
{{ if or $page.Keywords $page.Params.tags $page.Params.categories }}
|
||||
<meta content="{{ delimit (sort (union (union .Keywords .Params.tags) .Params.categories)) `, ` }}" name="keywords">
|
||||
{{ end }}
|
||||
<meta content="{{ site.Params.paige.color | default `#0d6efd` }}" name="msapplication-TileColor">
|
||||
@@ -14,5 +16,5 @@
|
||||
{{ end }}
|
||||
<meta content="{{ site.Params.paige.color | default `#0d6efd` }}" name="theme-color">
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/opengraph.html" $page }}
|
||||
{{ template "_internal/twitter_cards.html" $page }}
|
||||
|
Reference in New Issue
Block a user