markdown - Liquid Filter Reference
On this page
Description
Converts markdown text to HTML using GitHub-Flavored Markdown (GFM).
| Property | Value |
|---|---|
| Return Type | string |
| Category | text |
Examples
liquid
{{ "This is some **bold**, *italic*, and `code` text" | markdown }}
Output: <p>This is some <strong>bold</strong>, <em>italic</em>, and <code>code</code> text</p>\n
liquid
{{ "# Heading 1" | markdown }}
Output: <h1 id="heading-1">Heading 1</h1>\n
liquid
{{ "## Heading 2" | markdown }}
Output: <h2 id="heading-2">Heading 2</h2>\n
liquid
{{ "[Link text](https://example.com)" | markdown }}
Output: <p><a href="https://example.com">Link text</a></p>\n
liquid
{{ "- Item 1\n- Item 2\n- Item 3" | markdown }}
Output: <ul>\n <li>Item 1</li>\n <li>Item 2</li>\n <li>Item 3</li>\n</ul>\n
liquid
{{ "1. First\n2. Second\n3. Third" | markdown }}
Output: <ol>\n <li>First</li>\n <li>Second</li>\n <li>Third</li>\n</ol>\n
liquid
{{ "**Bold text**" | markdown }}
Output: <p><strong>Bold text</strong></p>\n
liquid
{% assign content = "from a variable" %}
{{ "This is using dynamic text: **" | append: content | append: "**" | markdown }}
Output: <p>This is using dynamic text: <strong>from a variable</strong></p>\n