mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
Update Markdownify.md
This commit is contained in:
1 parent
0c4bc14477
commit
c9d0dc8fb2
1 file changed
+1
-3
@@ -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 %}}
|
||||||
|
|||||||
Reference in new issue
Block a user