Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hugolib, output: Do not lower case template names #3335

Merged
merged 1 commit into from
Apr 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hugolib/site_output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`,

Expand All @@ -137,6 +139,8 @@ List HTML|{{.Title }}|
<atom:link href={{ .Permalink }} rel="self" type="{{ .MediaType }}" />
{{- end -}}
{{ .Site.Language.Lang }}: {{ T "elbow" -}}
Partial Hugo 1: {{ partial "GoHugo.html" . }}
Partial Hugo 2: {{ partial "GoHugo" . -}}
{{ end }}
`,
)
Expand Down
2 changes: 1 addition & 1 deletion output/layout_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down