mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
WordCount and Summary support CJK Language
* add global `hasCJKLanguage` flag, if true, turn on auto-detecting CJKLanguage * add `isCJKLanguage` frontmatter to force specify whether is CJKLanguage or not * For .Summary: If isCJKLanguage is true, use the runes as basis for truncation, else keep as today. * For WordCount: If isCJKLanguage is true, use the runes as basis for calculation, else keep as today. * Unexport RuneCount Fixes #1377
This commit is contained in:
parent
2c045ac449
commit
823334875d
5 changed files with 247 additions and 93 deletions
|
@ -168,6 +168,7 @@ func LoadDefaultSettings() {
|
|||
viper.SetDefault("RSSUri", "index.xml")
|
||||
viper.SetDefault("SectionPagesMenu", "")
|
||||
viper.SetDefault("DisablePathToLower", false)
|
||||
viper.SetDefault("HasCJKLanguage", false)
|
||||
}
|
||||
|
||||
// InitializeConfig initializes a config file with sensible default configuration flags.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue