WordCount and Summary support CJK Language
authorcoderzh <pythonzh@gmail.com>
Thu, 3 Sep 2015 10:22:20 +0000 (18:22 +0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 7 Oct 2015 13:14:57 +0000 (15:14 +0200)
commit823334875d396bdc15770c335c2029a01a7ef2ce
tree26930dcd01a5433322ed38f63562421fd080a96f
parent2c045ac449fbdca33daae828813a3b4a08224ef7
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
commands/hugo.go
helpers/content.go
helpers/content_test.go
hugolib/page.go
hugolib/page_test.go