mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-05-18 21:03:29 +02:00
Incorporate content from section _index.md files
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
+++
|
||||
title = "reveal-hugo example presentation"
|
||||
+++
|
||||
|
||||
# reveal-hugo
|
||||
@@ -3,11 +3,14 @@
|
||||
<!-- Any section element inside of this container is displayed as a slide -->
|
||||
<div class="slides">
|
||||
<!-- Find all pages inside of this section -->
|
||||
{{ range .Pages }}
|
||||
<!-- Split the processed content by <hr /> tag -->
|
||||
{{ range (split .Content "<hr />") }}
|
||||
<!-- Output the content as safe -->
|
||||
<section>{{ . | safeHTML }}</section>
|
||||
{{ range union (slice .Page) }}
|
||||
<!-- Don't process empty content files -->
|
||||
{{ if ne (len .Content) 0 }}
|
||||
<!-- Split the processed content by <hr /> tag -->
|
||||
{{ range (split .Content "<hr />") }}
|
||||
<!-- Output the content as safe -->
|
||||
<section>{{ . | safeHTML }}</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
+8
-5
@@ -3,11 +3,14 @@
|
||||
<!-- Any section element inside of this container is displayed as a slide -->
|
||||
<div class="slides">
|
||||
<!-- Find all pages with a type of reveal -->
|
||||
{{ range (where .Data.Pages "Type" "reveal") }}
|
||||
<!-- Split the processed content by <hr /> tag -->
|
||||
{{ range (split .Content "<hr />") }}
|
||||
<!-- Output the content as safe -->
|
||||
<section>{{ . | safeHTML }}</section>
|
||||
{{ range union (slice .Page) (where .Data.Pages "Type" "reveal") }}
|
||||
<!-- Don't process empty content files -->
|
||||
{{ if ne (len .Content) 0 }}
|
||||
<!-- Split the processed content by <hr /> tag -->
|
||||
{{ range (split .Content "<hr />") }}
|
||||
<!-- Output the content as safe -->
|
||||
<section>{{ . | safeHTML }}</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user