mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-12 18:24:41 -04:00
Update Markdownify.md
This commit is contained in:
parent
0c4bc14477
commit
c9d0dc8fb2
@ -14,15 +14,13 @@ aliases: [/functions/markdownify]
|
|||||||
---
|
---
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ .Title | markdownify }}
|
<h2>{{ .Title | markdownify }}</h2>
|
||||||
```
|
```
|
||||||
|
|
||||||
If the resulting HTML is a single paragraph, Hugo removes the wrapping `p` tags to produce inline HTML as required per the example above.
|
If the resulting HTML is a single paragraph, Hugo removes the wrapping `p` tags to produce inline HTML as required per the example above.
|
||||||
|
|
||||||
To keep the wrapping `p` tags for a single paragraph, use the [`RenderString`] method on the `Page` object, setting the `display` option to `block`.
|
To keep the wrapping `p` tags for a single paragraph, use the [`RenderString`] method on the `Page` object, setting the `display` option to `block`.
|
||||||
|
|
||||||
If the resulting HTML is two or more paragraphs, Hugo leaves the wrapping `p` tags in place.
|
|
||||||
|
|
||||||
[`RenderString`]: /methods/page/renderstring/
|
[`RenderString`]: /methods/page/renderstring/
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user