From ac3fb380804a8811918ea87ccdb0ca848ec36e4f Mon Sep 17 00:00:00 2001 From: Brendan Roy Date: Fri, 29 Sep 2017 17:04:55 +1000 Subject: [PATCH] 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 --- content/getting-started/configuration.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/getting-started/configuration.md b/content/getting-started/configuration.md index b81d878b3..2dafdb52b 100644 --- a/content/getting-started/configuration.md +++ b/content/getting-started/configuration.md @@ -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