mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
31
docs/content/en/methods/page/RawContent.md
Normal file
31
docs/content/en/methods/page/RawContent.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
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
|
Reference in New Issue
Block a user