Add config option "disablePathToLower"

Enabling this prevents lowercasing of the path/url.

Fixes #557
This commit is contained in:
chrongzhang
2015-09-01 20:53:25 +08:00
committed by Bjørn Erik Pedersen
parent 49fe04c0bd
commit 52d94fa675
7 changed files with 45 additions and 11 deletions

View File

@@ -1045,7 +1045,7 @@ func (s *Site) newTaxonomyNode(t taxRenderInfo) (*Node, string) {
key := t.key
n := s.NewNode()
if s.Info.preserveTaxonomyNames {
key = helpers.MakePathToLower(key)
key = helpers.MakePathSanitized(key)
// keep as is, just make sure the first char is upper
n.Title = helpers.FirstUpper(t.key)
} else {
@@ -1188,7 +1188,7 @@ func (s *Site) RenderSectionLists() error {
[]string{"section/" + section + ".html", "_default/section.html", "_default/list.html", "indexes/" + section + ".html", "_default/indexes.html"})
if s.Info.preserveTaxonomyNames {
section = helpers.MakePathToLower(section)
section = helpers.MakePathSanitized(section)
}
n := s.newSectionListNode(sectionName, section, data)