On this page
edit_note
Markdownify
A simple shortcode to render content as Markdown.
This shortcode parses its content as markdown.
Usage
The following:
{{< markdownify >}}
**Bold Text**: Above a code block.
```html
<!-- An example HTML code block -->
<h1>Hello World</h1>
{{< /markdownify >}}
Renders:
Bold Text: Above a code block.
<!-- An example HTML code block -->
<h1>Hello World</h1>
Nested Shortcodes
The markdownify
shortcode is especially useful in cases where you require portions of content nested inside another shortcode be parsed as Markdown.
For example, here’s a paragraph of markdown text and a prism
shortcode codeblock nested within a tabs
shortcode:
{{< tabs tabTotal="1" >}}
{{< tab tabName="Tab 1" >}}
{{< markdownify >}}
### Markdownified Text
Some `markdownified` text inside a `tabs` shortcode
{{< /markdownify >}}
{{< prism lang="html" line="3,6" >}}
<html>
<head>
<title>A code block using the Prism Shortcode</title>
</head>
<p>
This shortcode is nested inside a Tabs shortcode
</p>
</html>
{{< /prism >}}
{{< /tab >}}
{{< /tabs >}}
Renders:
Last updated 02 Oct 2023, 21:49 +0100 .
Was this page helpful?