hugo/content/en/methods/page/RawContent.md
Bjørn Erik Pedersen 9b0050e9aa Squashed 'docs/' content from commit 5c085a37b
git-subtree-dir: docs
git-subtree-split: 5c085a37b297bf12f59efeaae591418ec025c10d
2024-01-27 10:48:33 +01:00

31 lines
862 B
Markdown

---
title: RawContent
description: Returns the raw content of the given page.
categories: []
keywords: []
action:
related:
- methods/page/Content
- methods/page/Plain
- methods/page/PlainWords
- methods/page/RenderShortcodes
returnType: string
signatures: [PAGE.RawContent]
---
The `RawContent` method on a `Page` object returns the raw content. The raw content does not include front matter.
```go-html-template
{{ .RawContent }}
```
This is useful when rendering a page in a plain text [output format].
{{% note %}}
[Shortcodes] within the content are not rendered. To get the raw content with shortcodes rendered, use the [`RenderShortcodes`] method on a `Page` object.
[shortcodes]: /getting-started/glossary/#shortcode
[`RenderShortcodes`]: /methods/page/rendershortcodes
{{% /note %}}
[output format]: /templates/output-formats