mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit '39fd3b557014e339bc6c68a7ff34a7734a735ee0'
This commit is contained in:
@@ -5,6 +5,8 @@ categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Summary
|
||||
- methods/page/ContentWithoutSummary
|
||||
- methods/page/RawContent
|
||||
- methods/page/Plain
|
||||
- methods/page/PlainWords
|
||||
@@ -13,9 +15,7 @@ action:
|
||||
signatures: [PAGE.Content]
|
||||
---
|
||||
|
||||
The `Content` method on a `Page` object renders Markdown and shortcodes to HTML. The content does not include front matter.
|
||||
|
||||
[shortcodes]: /getting-started/glossary/#shortcode
|
||||
The `Content` method on a `Page` object renders Markdown and shortcodes to HTML.
|
||||
|
||||
```go-html-template
|
||||
{{ .Content }}
|
||||
|
28
docs/content/en/methods/page/ContentWithoutSummary.md
Normal file
28
docs/content/en/methods/page/ContentWithoutSummary.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: ContentWithoutSummary
|
||||
description: Returns the rendered content of the given page, excluding the content summary.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Content
|
||||
- methods/page/Summary
|
||||
- methods/page/RawContent
|
||||
- methods/page/Plain
|
||||
- methods/page/PlainWords
|
||||
- methods/page/RenderShortcodes
|
||||
returnType: template.HTML
|
||||
signatures: [PAGE.ContentWithoutSummary]
|
||||
---
|
||||
|
||||
{{< new-in 0.134.0 >}}
|
||||
|
||||
Applicable when using manual or automatic [content summaries], the `ContentWithoutSummary` method on a `Page` object renders Markdown and shortcodes to HTML, excluding the content summary from the result.
|
||||
|
||||
[content summaries]: /content-management/summaries/#manual-summary
|
||||
|
||||
```go-html-template
|
||||
{{ .ContentWithoutSummary }}
|
||||
```
|
||||
|
||||
The `ContentWithoutSummary` method returns an empty string if you define the content summary in front matter.
|
@@ -6,6 +6,8 @@ keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Content
|
||||
- methods/page/Summary
|
||||
- methods/page/ContentWithoutSummary
|
||||
- methods/page/RawContent
|
||||
- methods/page/PlainWords
|
||||
- methods/page/RenderShortcodes
|
||||
@@ -13,7 +15,7 @@ action:
|
||||
signatures: [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]. The plain content does not include front matter.
|
||||
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.
|
||||
|
||||
|
@@ -6,8 +6,11 @@ keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Content
|
||||
- methods/page/Summary
|
||||
- methods/page/ContentWithoutSummary
|
||||
- methods/page/RawContent
|
||||
- methods/page/Plain
|
||||
- methods/page/RenderShortcodes
|
||||
returnType: '[]string'
|
||||
signatures: [PAGE.PlainWords]
|
||||
---
|
||||
|
@@ -6,6 +6,8 @@ keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Content
|
||||
- methods/page/Summary
|
||||
- methods/page/ContentWithoutSummary
|
||||
- methods/page/Plain
|
||||
- methods/page/PlainWords
|
||||
- methods/page/RenderShortcodes
|
||||
|
@@ -5,11 +5,13 @@ categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/RenderString
|
||||
- methods/page/Content
|
||||
- methods/page/Summary
|
||||
- methods/page/ContentWithoutSummary
|
||||
- methods/page/RawContent
|
||||
- methods/page/Plain
|
||||
- methods/page/PlainWords
|
||||
- methods/page/RenderString
|
||||
returnType: template.HTML
|
||||
signatures: [PAGE.RenderShortcodes]
|
||||
toc: true
|
||||
|
Reference in New Issue
Block a user