slides.html 1.0 KB

12345678910111213141516171819202122232425262728
  1. <div class="reveal">
  2. <div class="slides">
  3. {{/* Loop over each page. */}}
  4. {{ range . }}
  5. {{ if ne (len .Content) 0 }}
  6. {{/* Must remove `<hr />` generated by Blackfriday footnotes as conflicts with slide delimiter. */}}
  7. {{/* Commented out workaround as Blackfriday has been superseded by Goldmark in Hugo 0.60. */}}
  8. {{/* TODO: reintroduce a similar workaround if Goldmark requires it. */}}
  9. {{/* $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" */}}
  10. {{ $content := .Content }}{{/* For Goldmark. */}}
  11. {{/* Let `---` delimit slides. In Goldmark, that is `<hr>`. Alternatively, for Blackfriday, use `<hr />`. */}}
  12. {{ range (split $content "<hr>") }}
  13. {{/* Each `<section>` defines a new slide. */}}
  14. {{/* Only begin new slide `<section>` if not already added by custom `slide` shortcode. */}}
  15. {{ if not (in . "data-noprocess") }}
  16. <section>
  17. {{ end }}
  18. {{ . | safeHTML }}
  19. </section>
  20. {{ end }}
  21. {{ end }}
  22. {{ end }}
  23. </div>
  24. </div>