mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
hugolib: Consider summary in front matter for .Summary
Add the ability to have a `summary` page variable that overrides the auto-generated summary. Logic for obtaining summary becomes: * if summary divider is present in content, use the text above it * if summary variables is present in page metadata, use that * auto-generate summary from first _x_ words of the content Fixes #5800
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
ebab291c0e
commit
3a62d54745
@@ -586,6 +586,7 @@ date = "2012-01-01"
|
||||
publishdate = "2012-01-01"
|
||||
my_param = "baz"
|
||||
my_date = 2010-05-27T07:32:00Z
|
||||
summary = "A _custom_ summary"
|
||||
categories = [ "hugo" ]
|
||||
+++
|
||||
Front Matter with Ordered Pages 4. This is longer content`
|
||||
|
Reference in New Issue
Block a user