summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--exampleSite/content/poems/o-captain.md15
-rw-r--r--layouts/shortcodes/html-tag.html4
2 files changed, 12 insertions, 7 deletions
diff --git a/exampleSite/content/poems/o-captain.md b/exampleSite/content/poems/o-captain.md
index 486027b..54383b7 100644
--- a/exampleSite/content/poems/o-captain.md
+++ b/exampleSite/content/poems/o-captain.md
@@ -41,14 +41,15 @@ source: Poetry Foundation
<!-- editorconfig-checker-disable -->
[^1]:
- The author had just landed in La Guardia Airport after the flight captain died. All the passengers stood up to applaud the co-pilot. We have it in good authority that the event in question led Yoko Ono to write her "Letter to John":
+ The author had just landed in La Guardia Airport after the flight captain died. All the passengers stood up to applaud the co-pilot. We have it in good authority that the event in question led Yoko Ono to write her "Letter to John":
+ {{< html-tag tag="blockquote" class="poetry" >}}
+ - On a windy day let's go flying
+ - There may be no trees to rest on
+ - There may be no clouds to ride
+ - But we'll have our wings and the wind will be with us
+ - That's enough for me, that's enough for me.
+ {{< /html-tag >}}
- > - On a windy day let's go flying
- > - There may be no trees to rest on
- > - There may be no clouds to ride
- > - But we'll have our wings and the wind will be with us
- > - That's enough for me, that's enough for me.
- {:.poetry}
<!-- editorconfig-checker-enable -->
[^2]: The bugle is a small trumpet implicated in the military industrial complex.
diff --git a/layouts/shortcodes/html-tag.html b/layouts/shortcodes/html-tag.html
new file mode 100644
index 0000000..15a7814
--- /dev/null
+++ b/layouts/shortcodes/html-tag.html
@@ -0,0 +1,4 @@
+{{ $optBlock := dict "display" "block" }}
+{{ print "<" | safeHTML }}{{ .Get "tag" | default "div" }}{{ with .Get "id" }} id="{{ . }}"{{ end }}{{ with .Get "class" }} class="{{ . }}"{{ end }}{{ with .Get "style" }} style="{{ . | safeCSS }}"{{ end }}{{ print ">" | safeHTML }}
+{{ with .Inner }}{{ . | $.Page.RenderString $optBlock }}{{ end }}
+{{ print "</" | safeHTML }}{{ .Get "tag" | default "div" }}{{ print ">" | safeHTML }}