mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-05-18 21:03:29 +02:00
Allow nested folder for reusable slide
This commit is contained in:
@@ -3,7 +3,11 @@
|
|||||||
{{- $content := .Get "content" -}}
|
{{- $content := .Get "content" -}}
|
||||||
{{- if $content -}}
|
{{- if $content -}}
|
||||||
{{- $lookup := split $content "." }}
|
{{- $lookup := split $content "." }}
|
||||||
{{- $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify -}}
|
{{ $markdownContent := .Page.Site.Data }}
|
||||||
|
{{- range $dataPath := $lookup -}}
|
||||||
|
{{- $markdownContent = index $markdownContent $dataPath -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $html := $markdownContent | markdownify -}}
|
||||||
{{- $slides := split $html "<hr />" -}}
|
{{- $slides := split $html "<hr />" -}}
|
||||||
{{- range $slides -}}
|
{{- range $slides -}}
|
||||||
{{- $scratch.Add "slides" . -}}
|
{{- $scratch.Add "slides" . -}}
|
||||||
@@ -55,4 +59,4 @@
|
|||||||
{{- if ne $sindex (sub (len ($scratch.Get "slides")) 1) -}}
|
{{- if ne $sindex (sub (len ($scratch.Get "slides")) 1) -}}
|
||||||
</section>
|
</section>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user