diff options
author | Sidharth R <ofw3210@gmail.com> | 2021-10-25 16:32:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 16:32:09 +0300 |
commit | ae30c7d3b85e38ed30866326c412946dd50bfa78 (patch) | |
tree | 89350e1d9e7d43265aa7243bad7dbdbef96dede4 | |
parent | ffdb78849edf02d5e6378fafe5b172150654901f (diff) |
➕ Add support for markdown within notes & warnings (#64)
-rw-r--r-- | exampleSite/content/post/cupper-shortcodes/index.md | 8 | ||||
-rw-r--r-- | layouts/shortcodes/note.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/warning.html | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/exampleSite/content/post/cupper-shortcodes/index.md b/exampleSite/content/post/cupper-shortcodes/index.md index c30eab6..94162e2 100644 --- a/exampleSite/content/post/cupper-shortcodes/index.md +++ b/exampleSite/content/post/cupper-shortcodes/index.md @@ -21,24 +21,24 @@ Even a happy life cannot be without a measure of darkness, and the word happy wo ``` {{</* note */>}} -This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical. +This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical. You can also *include* **markdown** stuffs like `code`. {{</* /note */>}} ``` {{< note >}} -This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical. +This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical. You can also *include* **markdown** stuffs like `code`. {{< /note >}} ## warning note ``` {{</* warning */>}} -This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong. +This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong. You can also *include* **markdown** stuffs like `code`. {{</* /warning */>}} ``` {{< warning >}} -This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong. +This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong. You can also *include* **markdown** stuffs like `code`. {{< /warning >}} ## cmd diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index 5671b72..6494910 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -3,6 +3,6 @@ <svg class="sign" aria-hidden="true" viewBox="0 0 41.667306 41.66729" focusable="false"> <use xlink:href="#info"></use> </svg> - {{ .Inner }} + {{ .Inner | markdownify }} </div> </aside> diff --git a/layouts/shortcodes/warning.html b/layouts/shortcodes/warning.html index 69d1bad..5ca7544 100644 --- a/layouts/shortcodes/warning.html +++ b/layouts/shortcodes/warning.html @@ -3,6 +3,6 @@ <svg class="sign" aria-hidden="true" viewBox="0 0 48.430474 41.646302" focusable="false"> <use xlink:href="#warning"></use> </svg> - {{ .Inner }} + {{ .Inner | markdownify }} </div> </aside> |