hugo/docs/content/en/methods/page/Plain.md
2024-09-04 18:57:34 +02:00

1,002 B

title description categories keywords action
Plain Returns the rendered content of the given page, removing all HTML tags.
related returnType signatures
methods/page/Content
methods/page/Summary
methods/page/ContentWithoutSummary
methods/page/RawContent
methods/page/PlainWords
methods/page/RenderShortcodes
string
PAGE.Plain

The Plain method on a Page object renders Markdown and shortcodes to HTML, then strips the HTML tags. It does not strip HTML entities.

To prevent Go's html/template package from escaping HTML entities, pass the result through the htmlUnescape function.

{{ .Plain | htmlUnescape }}