diff options
author | Kostas Chatzikokolakis <kostas@chatzi.org> | 2019-09-12 11:54:32 +0300 |
---|---|---|
committer | Kostas Chatzikokolakis <kostas@chatzi.org> | 2019-09-12 11:57:43 +0300 |
commit | 73800d2881fafa666e9d8c2ff08e9910c2cc0174 (patch) | |
tree | d20df8a05ccea886d240462cea841523558c4186 | |
parent | 68429eccc31d5347a16e13bb14af7c2770d08101 (diff) |
Allow markdown in note shortcodes (fixes #40)
-rw-r--r-- | exampleSite/content/home/shortcodes/other.md | 6 | ||||
-rw-r--r-- | layouts/shortcodes/note.html | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/exampleSite/content/home/shortcodes/other.md b/exampleSite/content/home/shortcodes/other.md index 80b598b..585c05a 100644 --- a/exampleSite/content/home/shortcodes/other.md +++ b/exampleSite/content/home/shortcodes/other.md @@ -4,20 +4,20 @@ weight = 38 ## Notes -Add speaker notes to your presentation with the `note` shortcode. Type 's' to see this slide's speaker notes. +Add speaker notes (with markdown) to your presentation with the `note` shortcode. Type 's' to see this slide's speaker notes. ```markdown --- {{%/* note */%}} -You found the speaker notes! +- You found the **speaker notes**! {{%/* /note */%}} --- ``` {{% note %}} -You found the speaker notes! +- You found the **speaker notes**! {{% /note %}} --- diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index 5d28fce..f5ee55e 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -1 +1,4 @@ +{{/* Markdown is not rendered inside <aside> tags! So we use the following */}} +{{/* config which causes .Inner to be rendered before processing the shortcode. */}} +{{ $_hugo_config := `{ "version": 1 }` }} <aside class="notes">{{ .Inner }}</aside>
\ No newline at end of file |