{{/* Loop over each page. */}} {{ range . }} {{ if ne (len .Content) 0 }} {{/* Must remove `
` generated by Blackfriday footnotes as conflicts with slide delimiter. */}} {{/* Commented out workaround as Blackfriday has been superseded by Goldmark in Hugo 0.60. */}} {{/* TODO: reintroduce a similar workaround if Goldmark requires it. */}} {{/* $content := replace .Content "
\n\n
" "
" */}} {{ $content := .Content }}{{/* For Goldmark. */}} {{/* Let `---` delimit slides. In Goldmark, that is `
`. Alternatively, for Blackfriday, use `
`. */}} {{ range (split $content "
") }} {{/* Check if this slide should be hidden using inline comment */}} {{ $isHidden := false }} {{ $slideContent := . }} {{ if in . "" }} {{ $isHidden = true }} {{/* Remove the hide comment from the content */}} {{ $slideContent = replace . "" "" }} {{ end }} {{/* Each `
` defines a new slide. */}} {{/* Only begin new slide `
` if not already added by custom `slide` shortcode. */}} {{ if not (in . "data-noprocess") }} {{/* Parse visibility comments */}} {{ $state := slice }} {{ if in . "" }} {{ $state = $state | append "no-branding" }} {{ end }} {{ if in . "" }} {{ $state = $state | append "no-header" }} {{ end }} {{ if in . "" }} {{ $state = $state | append "no-footer" }} {{ end }} {{ end }} {{ $slideContent | safeHTML }}
{{ end }} {{ end }} {{ end }}
{{/* Branding elements - placed inside .reveal but outside .slides to be persistent and fixed */}} {{/* Branding overlay (logo, title, author) */}} {{ $pageContext := index . 0 }} {{ partial "components/slide-branding" $pageContext }} {{/* Hook: slide-header */}}
{{ partial "functions/slides_get_hook" (dict "hook" "slide-header" "context" $pageContext) }}
{{/* Hook: slide-footer */}}