mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
Change SummaryLength to be configurable (#3924)
Move SummaryLength into the ContentSpec struct and refactor the relevant summary functions to be methods of ContentSpec. The new summaryLength struct member is configurable by the summaryLength config value, and the default remains 70. Also updates hugolib/page to use the refactored methods. Resolves #3734
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
2818878994
commit
8717a60cc0
@@ -135,6 +135,7 @@ func loadDefaultSettingsFor(v *viper.Viper) error {
|
||||
v.SetDefault("newContentEditor", "")
|
||||
v.SetDefault("paginate", 10)
|
||||
v.SetDefault("paginatePath", "page")
|
||||
v.SetDefault("summaryLength", 70)
|
||||
v.SetDefault("blackfriday", c.NewBlackfriday())
|
||||
v.SetDefault("rSSUri", "index.xml")
|
||||
v.SetDefault("rssLimit", -1)
|
||||
|
Reference in New Issue
Block a user