transform.Markdownify
Returns the given Markdown rendered to HTML.
- Syntax
- transform.Markdownify INPUT
- Returns
- template.HTML
- Alias
- markdownify
Usage
The transform.Markdownify function returns the given Markdown rendered to HTML.
If the resulting HTML is a single paragraph, Hugo removes the wrapping p tags to produce inline HTML. To keep the wrapping p tags for a single paragraph, use the RenderString method on the Page object, setting the display option to block.
Although the transform.Markdownify function honors Markdown render hooks when rendering Markdown to HTML, use the RenderString method instead if a render hook accesses .Page context. See issue #9692 for details.
Examples
{{ transform.Markdownify "An *emphasized* word" }} → An <em>emphasized</em> wordRendering a page title as inline HTML:
<h2>{{ .Title | transform.Markdownify }}</h2>Last updated:
October 21, 2026
:
content: Apply style guide to transform functions (3625f720a)
Improve this page