From 6d2ea0f7d7e8a54b8edfc36e52ff74266c30dc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 12 Apr 2017 21:01:22 +0200 Subject: [PATCH] hugolib, output: Do not lower case template names This regression was introduced in Hugo 0.20. Fixes #3333 --- hugolib/site_output_test.go | 4 ++++ output/layout_base.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go index 0edd8e1f0..ef2cdf9ad 100644 --- a/hugolib/site_output_test.go +++ b/hugolib/site_output_test.go @@ -114,6 +114,8 @@ other = "Olboge" th, h := newTestSitesFromConfig(t, mf, siteConfig, + // Case issue partials #3333 + "layouts/partials/GoHugo.html", `Go Hugo Partial`, "layouts/_default/baseof.json", `START JSON:{{block "main" .}}default content{{ end }}:END JSON`, "layouts/_default/baseof.html", `START HTML:{{block "main" .}}default content{{ end }}:END HTML`, @@ -137,6 +139,8 @@ List HTML|{{.Title }}| {{- end -}} {{ .Site.Language.Lang }}: {{ T "elbow" -}} +Partial Hugo 1: {{ partial "GoHugo.html" . }} +Partial Hugo 2: {{ partial "GoHugo" . -}} {{ end }} `, ) diff --git a/output/layout_base.go b/output/layout_base.go index 01885474d..a0d2bc4eb 100644 --- a/output/layout_base.go +++ b/output/layout_base.go @@ -101,7 +101,7 @@ func CreateTemplateNames(d TemplateLookupDescriptor) (TemplateNames, error) { filenameNoSuffix := parts[0] id.OverlayFilename = fullPath - id.Name = strings.ToLower(name) + id.Name = name if isPlainText { id.Name = "_text/" + id.Name