mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 18:27:53 -04: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:
parent
9e8c09652a
commit
0cf8dc046c
@ -111,6 +111,8 @@ googleAnalytics: ""
|
||||
# if true, auto-detect Chinese/Japanese/Korean Languages in the content. (.Summary and .WordCount can work properly in CJKLanguage)
|
||||
hasCJKLanguage: false
|
||||
languageCode: ""
|
||||
# the length of text to show in a .Summary
|
||||
summaryLength: 70
|
||||
layoutDir: "layouts"
|
||||
# Enable Logging
|
||||
log: false
|
||||
@ -252,6 +254,8 @@ googleAnalytics = ""
|
||||
# if true, auto-detect Chinese/Japanese/Korean Languages in the content. (.Summary and .WordCount can work properly in CJKLanguage)
|
||||
hasCJKLanguage = false
|
||||
languageCode = ""
|
||||
# the length of text to show in a .Summary
|
||||
summaryLength: 70
|
||||
layoutDir = "layouts"
|
||||
# Enable Logging
|
||||
log = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user