12345678910111213141516171819202122232425262728 |
- <div class="reveal">
- <div class="slides">
- {{/* Loop over each page. */}}
- {{ range . }}
- {{ if ne (len .Content) 0 }}
- {{/* Must remove `<hr />` 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 "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" */}}
- {{ $content := .Content }}{{/* For Goldmark. */}}
- {{/* Let `---` delimit slides. In Goldmark, that is `<hr>`. Alternatively, for Blackfriday, use `<hr />`. */}}
- {{ range (split $content "<hr>") }}
- {{/* Each `<section>` defines a new slide. */}}
- {{/* Only begin new slide `<section>` if not already added by custom `slide` shortcode. */}}
- {{ if not (in . "data-noprocess") }}
- <section>
- {{ end }}
- {{ . | safeHTML }}
- </section>
- {{ end }}
- {{ end }}
- {{ end }}
- </div>
- </div>
|