# RawContent
> 返回给定页面的原始内容。
- 官方英文原文：https://gohugo.io/methods/page/rawcontent/
- 本页规范地址：https://hugozh.cn/methods/page/rawcontent/
- 最近更新：2026-10-02
- 最后提交：912b1d3 chore(site): 添加 static/CNAME（hugozh.cn），供 GitHub Pages 等平台绑定自定义域名
- 签名：PAGE.RawContent
- 返回类型：string
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译，如有出入以官方英文原文为准

---
`Page` 对象上的 `RawContent` 方法返回原始内容。原始内容不包含前置元数据。

```go-html-template
{{ .RawContent }}
```

在以纯文本[输出格式](g)渲染页面时，这很有用。

> [!NOTE]
> 内容中的[短代码](g)不会被渲染。要获得短代码已渲染后的原始内容，请使用 `Page` 对象上的 [`RenderShortcodes`][] 方法。

[`RenderShortcodes`]: /methods/page/rendershortcodes/

