Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -2,14 +2,8 @@
title: Content summaries
linkTitle: Summaries
description: Create and render content summaries.
categories: [content management]
keywords: [summaries,abstracts,read more]
menu:
docs:
parent: content-management
weight: 160
weight: 160
toc: true
categories: []
keywords: []
aliases: [/content/summaries/,/content-management/content-summaries/]
---
@@ -26,7 +20,7 @@ Review the [comparison table](#comparison) below to understand the characteristi
Use a `<!--more-->` divider to indicate the end of the summary. Hugo will not render the summary divider itself.
{{< code file=content/example.md >}}
```text {file="content/example.md"}
+++
title: 'Example'
date: 2024-05-26T09:10:33-07:00
@@ -37,7 +31,7 @@ This is the first paragraph.
<!--more-->
This is the second paragraph.
{{< /code >}}
```
When using the Emacs Org Mode [content format], use a `# more` divider to indicate the end of the summary.
@@ -47,7 +41,7 @@ When using the Emacs Org Mode [content format], use a `# more` divider to indica
Use front matter to define a summary independent of content.
{{< code file=content/example.md >}}
```text {file="content/example.md"}
+++
title: 'Example'
date: 2024-05-26T09:10:33-07:00
@@ -57,15 +51,15 @@ summary: 'This summary is independent of the content.'
This is the first paragraph.
This is the second paragraph.
{{< /code >}}
```
## Automatic summary
If you do not define the summary manually or in front matter, Hugo automatically defines the summary based on the [`summaryLength`] in your site configuration.
[`summaryLength`]: /getting-started/configuration/#summarylength
[`summaryLength`]: /configuration/all/#summarylength
{{< code file=content/example.md >}}
```text {file="content/example.md"}
+++
title: 'Example'
date: 2024-05-26T09:10:33-07:00
@@ -76,7 +70,7 @@ This is the first paragraph.
This is the second paragraph.
This is the third paragraph.
{{< /code >}}
```
For example, with a `summaryLength` of 7, the automatic summary will be: