mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit 'de0df119b504a91c9e1f442b07954f366ffb2932'
This commit is contained in:
@@ -32,9 +32,9 @@ For example:
|
||||
Then call the shortcode in your Markdown:
|
||||
|
||||
{{< code file=content/about.md lang=md >}}
|
||||
{{%/* include "/snippets/services.md" */%}}
|
||||
{{%/* include "/snippets/values.md" */%}}
|
||||
{{%/* include "/snippets/leadership.md" */%}}
|
||||
{{%/* include "/snippets/services" */%}}
|
||||
{{%/* include "/snippets/values" */%}}
|
||||
{{%/* include "/snippets/leadership" */%}}
|
||||
{{< /code >}}
|
||||
|
||||
Each of the included Markdown files can contain calls to other shortcodes.
|
||||
@@ -79,3 +79,14 @@ An *emphasized* word.
|
||||
```
|
||||
|
||||
Note that the shortcode within the content file was rendered, but the surrounding Markdown was preserved.
|
||||
|
||||
|
||||
## Limitations
|
||||
|
||||
The primary use case for `.RenderShortcodes` is inclusion of Markdown content. If you try to use `.RenderShortcodes` inside `HTML` blocks when inside Markdown, you will get a warning similar to this:
|
||||
|
||||
```
|
||||
WARN .RenderShortcodes detected inside HTML block in "/content/mypost.md"; this may not be what you intended ...
|
||||
```
|
||||
|
||||
The above warning can be turned off is this is what you really want.
|
||||
|
Reference in New Issue
Block a user