mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-01 15:09:11 -05:00
1,017 B
1,017 B
title | description | categories | keywords | action | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Summary | Returns the content summary of the given page. |
|
There are three ways to define the content summary:
- 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. - Manually split the content with a
<!--more-->
tag in Markdown. Everything before the tag is included in the summary. - Create a
summary
field in front matter.
To list the pages in a section with a summary beneath each link:
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
{{ end }}