aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/content/en/methods/page/Summary.md
blob: 37ce865893b6995a1138a5e4a67ddcc205c1ebae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
title: Summary
description: Returns the content summary of the given page.
categories: []
keywords: []
action:
  related:
    - methods/page/Truncated
    - methods/page/Description
  returnType: template.HTML
  signatures: [PAGE.Summary]
---

There are three ways to define the [content summary]:

1. Let Hugo create the summary based on the first 70 words. You can change the number of words by setting the `summaryLength` in your site configuration.
2. Manually split the content with a `<--more-->` tag in markdown. Everything before the tag is included in the summary.
3. Create a `summary` field in front matter.

To list the pages in a section with a summary beneath each link:

```go-html-template
{{ range .Pages }}
  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
  {{ .Summary }}
{{ end }}
```

[content summary]: /content-management/summaries