Implement head partial to include a <meta/> redirect when desired
This commit is contained in:
parent
8e18468f1f
commit
6ebe809abb
|
@ -0,0 +1,9 @@
|
|||
{{- /* handle redirects */}}
|
||||
{{- with index (default dict (index $.Page.Params "values")) "redirect" }}
|
||||
{{- $delay := default 0 (index . "delay") }}
|
||||
{{- $url := index . "url" }}
|
||||
{{- if not $url }}
|
||||
{{- errorf "missing, empty or null value at 'values.redirect.url': %s" .Position }}
|
||||
{{- end }}
|
||||
<meta http-equiv="refresh" content="{{ $delay }}; url={{ $url }}">
|
||||
{{- end }}
|
Reference in New Issue