diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-04-20 15:19:38 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-04-20 15:19:38 +0200 |
commit | 0508ca1856e57421fca699c6427cc19531b55b7a (patch) | |
tree | db015657f0268054adff358ebec4b4a329d931a0 /docs/content/en/content-management/shortcodes.md | |
parent | c7dd66bfe2e32430f9b1a3126c67014e40d8405e (diff) | |
parent | a0c28c943c2f4714fa340b22a583b96f5013090b (diff) |
Merge commit 'a0c28c943c2f4714fa340b22a583b96f5013090b'
Diffstat (limited to 'docs/content/en/content-management/shortcodes.md')
-rw-r--r-- | docs/content/en/content-management/shortcodes.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md index b719e681d..3be1c6f9e 100644 --- a/docs/content/en/content-management/shortcodes.md +++ b/docs/content/en/content-management/shortcodes.md @@ -53,12 +53,15 @@ The examples above use two different delimiters, the difference being the `%` ch ### Shortcodes with Markdown -The `%` character indicates that the shortcode's inner content---called in the [shortcode template][sctemps] with the [`.Inner` variable][scvars]---needs further processing by the page's rendering processor (i.e. markdown via Blackfriday). In the following example, Blackfriday would convert `**World**` to `<strong>World</strong>`: +In Hugo `0.55` we changed how the `%` delimiter works. Shortcodes using the `%` as the outer-most delimiter will now be fully rendered when sent to the content renderer (e.g. Blackfriday for Markdown), meaning they can be part of the generated table of contents, footnotes, etc. + +If you want the old behavior, you can put the following line in the start of your shortcode template: ``` -{{%/* myshortcode */%}}Hello **World!**{{%/* /myshortcode */%}} +{{ $_hugo_config := `{ "version": 1 }` }} ``` + ### Shortcodes Without Markdown The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without markdown include internal HTML: |