summaryrefslogtreecommitdiffstats
path: root/hugolib/taxonomy_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-08 10:03:07 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-08 11:47:26 +0100
commit2d3189b22760e0a8995dae082a6bc5480f770bfe (patch)
tree7f5817ee9fd8ab42764da0c743f069609514a439 /hugolib/taxonomy_test.go
parent4b04db0f0855a1f54895d6c93c52dcea4b1ce3ca (diff)
hugolib: Fix handling of mixed-case taxonomy folders with content file
* We match by path vs taxonomy to determine if we have a content page for that taxonomy * The taxonomy name is (if `preserveTaxonomyNames` is not set) normalized to `maxmustermann` while you have the disk folder called `MaxMustermann`. * This isn't a new issue, but I suspect most people will just name the folder `authors/maxmustermann` and it will just work. * The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win. This fixes that by also normalizing the taxonomy path when doing the comparison. Fixes #4238
Diffstat (limited to 'hugolib/taxonomy_test.go')
-rw-r--r--hugolib/taxonomy_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
index 7d8d50aba..646fdd44f 100644
--- a/hugolib/taxonomy_test.go
+++ b/hugolib/taxonomy_test.go
@@ -116,7 +116,7 @@ permalinkeds:
writeSource(t, fs, "content/p4.md", fmt.Sprintf(pageTemplate, "Hello World", "", "", "- \"Hello Hugo world\"", "- pl1"))
writeNewContentFile(t, fs, "Category Terms", "2017-01-01", "content/categories/_index.md", 10)
- writeNewContentFile(t, fs, "Tag1 List", "2017-01-01", "content/tags/tag1/_index.md", 10)
+ writeNewContentFile(t, fs, "Tag1 List", "2017-01-01", "content/tags/Tag1/_index.md", 10)
err := h.Build(BuildCfg{})