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
|
<section data-noprocess data-shortcode-slide
|
||||||
{{- $template := $params.Get "template" -}}
|
{{- $template := $params.Get "template" -}}
|
||||||
{{- if $template -}}
|
{{- if $template -}}
|
||||||
{{- $templateParams := slice $.Site.Params.reveal_hugo.templates ($.Site.GetPage $.Page.Section).Params.reveal_hugo.templates $.Page.Params.reveal_hugo.templates -}}
|
{{- $scratch.Add "templateParams" (slice $.Site.Params.reveal_hugo.templates) -}}
|
||||||
{{- range $templateParams -}}
|
{{- 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) -}}
|
{{- if (ne . nil) -}}
|
||||||
{{- range $key, $value := (index . $template) -}}
|
{{- range $key, $value := (index . $template) -}}
|
||||||
{{- $scratch.SetInMap "template" $key $value | safeHTMLAttr -}}
|
{{- $scratch.SetInMap "template" $key $value | safeHTMLAttr -}}
|
||||||
|
|
Loading…
Reference in New Issue