Skip to content

Commit 6d2ea0f

Browse files
committed
hugolib, output: Do not lower case template names
This regression was introduced in Hugo 0.20. Fixes #3333
1 parent 45c7452 commit 6d2ea0f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎hugolib/site_output_test.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ other = "Olboge"
114114

115115
th, h := newTestSitesFromConfig(t, mf, siteConfig,
116116

117+
// Case issue partials #3333
118+
"layouts/partials/GoHugo.html", `Go Hugo Partial`,
117119
"layouts/_default/baseof.json", `START JSON:{{block "main" .}}default content{{ end }}:END JSON`,
118120
"layouts/_default/baseof.html", `START HTML:{{block "main" .}}default content{{ end }}:END HTML`,
119121

@@ -137,6 +139,8 @@ List HTML|{{.Title }}|
137139
<atom:link href={{ .Permalink }} rel="self" type="{{ .MediaType }}" />
138140
{{- end -}}
139141
{{ .Site.Language.Lang }}: {{ T "elbow" -}}
142+
Partial Hugo 1: {{ partial "GoHugo.html" . }}
143+
Partial Hugo 2: {{ partial "GoHugo" . -}}
140144
{{ end }}
141145
`,
142146
)

‎output/layout_base.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func CreateTemplateNames(d TemplateLookupDescriptor) (TemplateNames, error) {
101101
filenameNoSuffix := parts[0]
102102

103103
id.OverlayFilename = fullPath
104-
id.Name = strings.ToLower(name)
104+
id.Name = name
105105

106106
if isPlainText {
107107
id.Name = "_text/" + id.Name

0 commit comments

Comments
 (0)