Don't try to add templates from section for _index.md
Causes a strange segfault otherwise
This commit is contained in:
parent
bf4801d37b
commit
db6d875a3f
|
@ -19,8 +19,12 @@
|
|||
<section data-noprocess data-shortcode-slide
|
||||
{{- $template := $params.Get "template" -}}
|
||||
{{- if $template -}}
|
||||
{{- $templateParams := slice $.Site.Params.reveal_hugo.templates ($.Site.GetPage $.Page.Section).Params.reveal_hugo.templates $.Page.Params.reveal_hugo.templates -}}
|
||||
{{- range $templateParams -}}
|
||||
{{- $scratch.Add "templateParams" (slice $.Site.Params.reveal_hugo.templates) -}}
|
||||
{{- if ne $.Page.File.LogicalName "_index.md" -}}
|
||||
{{- $scratch.Add "templateParams" (slice ($.Site.GetPage $.Page.Section).Params.reveal_hugo.templates) -}}
|
||||
{{- end -}}
|
||||
{{- $scratch.Add "templateParams" (slice $.Page.Params.reveal_hugo.templates) -}}
|
||||
{{- range ($scratch.Get "templateParams") -}}
|
||||
{{- if (ne . nil) -}}
|
||||
{{- range $key, $value := (index . $template) -}}
|
||||
{{- $scratch.SetInMap "template" $key $value | safeHTMLAttr -}}
|
||||
|
|
Loading…
Reference in New Issue