diff options
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/hugo_sites.go | 6 | ||||
-rw-r--r-- | hugolib/taxonomy_test.go | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 4211e91f6..fbaf27aa4 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -440,7 +440,11 @@ func (h *HugoSites) createMissingPages() error { key = s.PathSpec.MakePathSanitized(key) } for _, p := range taxonomyPages { - if p.sections[0] == plural && p.sections[1] == key { + // Some people may have /authors/MaxMustermann etc. as paths. + // p.sections contains the raw values from the file system. + // See https://github.com/gohugoio/hugo/issues/4238 + singularKey := s.PathSpec.MakePathSanitized(p.sections[1]) + if p.sections[0] == plural && singularKey == key { foundTaxonomyPage = true break } 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{}) |