Skip to content

Commit

Permalink
hugolib, output: Do not lower case template names
Browse files Browse the repository at this point in the history
This regression was introduced in Hugo 0.20.

Fixes #3333
  • Loading branch information
bep committed Apr 12, 2017
1 parent 45c7452 commit 6d2ea0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions hugolib/site_output_test.go
Expand Up @@ -114,6 +114,8 @@ other = "Olboge"


th, h := newTestSitesFromConfig(t, mf, siteConfig, 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.json", `START JSON:{{block "main" .}}default content{{ end }}:END JSON`,
"layouts/_default/baseof.html", `START HTML:{{block "main" .}}default content{{ end }}:END HTML`, "layouts/_default/baseof.html", `START HTML:{{block "main" .}}default content{{ end }}:END HTML`,


Expand All @@ -137,6 +139,8 @@ List HTML|{{.Title }}|
<atom:link href={{ .Permalink }} rel="self" type="{{ .MediaType }}" /> <atom:link href={{ .Permalink }} rel="self" type="{{ .MediaType }}" />
{{- end -}} {{- end -}}
{{ .Site.Language.Lang }}: {{ T "elbow" -}} {{ .Site.Language.Lang }}: {{ T "elbow" -}}
Partial Hugo 1: {{ partial "GoHugo.html" . }}
Partial Hugo 2: {{ partial "GoHugo" . -}}
{{ end }} {{ end }}
`, `,
) )
Expand Down
2 changes: 1 addition & 1 deletion output/layout_base.go
Expand Up @@ -101,7 +101,7 @@ func CreateTemplateNames(d TemplateLookupDescriptor) (TemplateNames, error) {
filenameNoSuffix := parts[0] filenameNoSuffix := parts[0]


id.OverlayFilename = fullPath id.OverlayFilename = fullPath
id.Name = strings.ToLower(name) id.Name = name


if isPlainText { if isPlainText {
id.Name = "_text/" + id.Name id.Name = "_text/" + id.Name
Expand Down

0 comments on commit 6d2ea0f

Please sign in to comment.