mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Make HTML behave exactly like other content formats (note)
Fixes #11999
This commit is contained in:
@@ -1540,32 +1540,6 @@ CONTENT:{{ .Content }}
|
||||
)
|
||||
}
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5478
|
||||
func TestPageWithCommentedOutFrontMatter(t *testing.T) {
|
||||
b := newTestSitesBuilder(t)
|
||||
b.WithSimpleConfigFile()
|
||||
|
||||
b.WithContent("page.md", `<!--
|
||||
+++
|
||||
title = "hello"
|
||||
+++
|
||||
-->
|
||||
This is the content.
|
||||
`)
|
||||
|
||||
b.WithTemplatesAdded("layouts/_default/single.html", `
|
||||
Title: {{ .Title }}
|
||||
Content:{{ .Content }}
|
||||
`)
|
||||
|
||||
b.CreateSites().Build(BuildCfg{})
|
||||
|
||||
b.AssertFileContent("public/page/index.html",
|
||||
"Title: hello",
|
||||
"Content:<p>This is the content.</p>",
|
||||
)
|
||||
}
|
||||
|
||||
func TestHomePageWithNoTitle(t *testing.T) {
|
||||
b := newTestSitesBuilder(t).WithConfigFile("toml", `
|
||||
title = "Site Title"
|
||||
|
Reference in New Issue
Block a user