diff options
author | chrongzhang <chrongzhang@tencent.com> | 2015-09-01 20:53:25 +0800 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2015-09-01 15:26:02 +0200 |
commit | 52d94fa67578f6b63035e73b236ca8abd40d0006 (patch) | |
tree | a91a2c1ee95ec979e9d7e92054f4f1cfd712040a /hugolib | |
parent | 49fe04c0bd8111bf686d9205d543f8651ea24cfc (diff) |
Add config option "disablePathToLower"
Enabling this prevents lowercasing of the path/url.
Fixes #557
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/site.go | 4 | ||||
-rw-r--r-- | hugolib/taxonomy.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index a8ca835ef..3ac00d0d7 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -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) diff --git a/hugolib/taxonomy.go b/hugolib/taxonomy.go index 22cdfbbb3..1fd34cadb 100644 --- a/hugolib/taxonomy.go +++ b/hugolib/taxonomy.go @@ -60,7 +60,7 @@ type OrderedTaxonomyEntry struct { // KeyPrep... Taxonomies should be case insensitive. Can make it easily conditional later. func kp(in string) string { - return helpers.MakePathToLower(in) + return helpers.MakePathSanitized(in) } func (i Taxonomy) Get(key string) WeightedPages { return i[kp(key)] } |