Backtestshugorun-20261009-153657#14625

Issue #14625 Merged fix PR #15384 Run 9 Oct 2026 · run-20261009-153657 gohugoio/hugo

Make default baseUrl https://example.org/

Better

Our patch was judged better than the merged fix.

In this judgment, Patch A = our agent, Patch B = the merged fix.

Both patches make the base URL default to https://example.org/. They differ in where the default is applied and in how much unrelated change they carry.

Correctness: Patch A puts the default in newDefaultConfig(). An unset baseURL gets the default, but a user who explicitly sets baseURL = "" still gets empty, root-relative behavior. This is the cleaner semantic: a default is applied, and explicit user input is never overridden. A's own test covers this case. Patch B rewrites any empty BaseURL inside CompileConfig, so an explicit empty value can no longer be expressed. That is why B had to change the TestPermalink cases from "" to "/". It is a broader, more surprising behavior change than the issue asks for.

Tests: Patch A adds a focused TestBaseURLDefault with four cases: no config file (Permalink, absURL, Site.BaseURL and the config value), multilingual without baseURL, explicit baseURL, and explicit empty baseURL. Each tests the new behavior directly. Patch B's TestDefaultBaseURL only checks Site.BaseURL for explicit, absent and "/" values, which is narrower. Both adjust the existing tests that assumed an empty default.

Scope and craft: Patch B includes a large amount of unrelated formatting churn, reflowing dozens of AssertFileContent calls in alias_test.go, embedded_templates_integration_test.go and tplimpl_integration_test.go. This hides the real changes and adds review noise. Patch A is minimal and focused.

Patch A is better on correctness, tests and scope.

The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.

Solve

1h 35m

Wall-clock time in the container

Full test suite

No new failures

2,261 passed · 95 skipped · 2,356 total

Contamination audit

Clean

No sign the agent saw the real fix

Patch size

92vs 284 merged

Changed lines, ours vs merged

If I want to create a very basic site, the only reason I currently need to create a config file is to set the baseUrl.

So, having the baseURL default to https://example.org/ would be a slightly breaking change, but it would solve more issues than it introduces.

The two patches

Our patch+89 −3
config/allconfig/allconfig.goindex a84545edb..693aaea29 100644@@ -594,7 +594,7 @@ func (c *ConfigCompiled) SetServerInfo(baseURL, baseURLLiveReload urls.BaseURL, // RootConfig holds all the top-level configuration options in Hugo type RootConfig struct { 	// The base URL of the site.-	// Note that the default value is empty, but Hugo requires a valid URL (e.g. "https://example.com/") to work properly.+	// Default is "https://example.org/". 	// <docsmeta>{"identifiers": ["URL"] }</docsmeta> 	BaseURL string @@ -1011,6 +1011,7 @@ func (c Configs) GetByLang(lang string) config.AllProvider {  func newDefaultConfig() *Config { 	return &Config{+		BaseURL:              "https://example.org/", 		Taxonomies:           map[string]string{"tag": "tags", "category": "categories"}, 		Sitemap:              config.SitemapConfig{Priority: -1, Filename: "sitemap.xml"}, 		Environment:          hugo.EnvironmentProduction,config/allconfig/allconfig_integration_test.goindex e6e213b2b..a14aabfe6 100644@@ -421,3 +421,82 @@ func TestLegacyEmbeddedRenderHookEnablement(t *testing.T) { 	b, _ = hugolib.TestE(t, f) 	b.AssertLogContains("ERROR deprecated") }++func TestBaseURLDefault(t *testing.T) {+	t.Parallel()++	t.Run("No config file", func(t *testing.T) {+		files := `+-- content/p1.md --+---+title: "p1"+---+-- layouts/single.html --+Permalink: {{ .Permalink }}|AbsURL: {{ "foo" | absURL }}|Site.BaseURL: {{ site.BaseURL }}|+`+		b := hugolib.Test(t, files)++		b.AssertFileContent("public/p1/index.html", "Permalink: https://example.org/p1/|AbsURL: https://example.org/foo|Site.BaseURL: https://example.org/|")+		b.Assert(b.H.Configs.Base.BaseURL, qt.Equals, "https://example.org/")+	})++	t.Run("Multilingual, no baseURL", func(t *testing.T) {+		files := `+-- hugo.toml --+disableKinds = ["taxonomy", "term", "rss", "sitemap", "robotsTXT", "404"]+defaultContentLanguageInSubdir = true+[languages.en]+weight = 1+title = "English"+[languages.sv]+weight = 2+title = "Svenska"+-- content/p1.md --+---+title: "p1"+---+-- content/p1.sv.md --+---+title: "p1 sv"+---+-- layouts/single.html --+Permalink: {{ .Permalink }}|+`+		b := hugolib.Test(t, files)++		b.AssertFileContent("public/en/p1/index.html", "Permalink: https://example.org/en/p1/|")+		b.AssertFileContent("public/sv/p1/index.html", "Permalink: https://example.org/sv/p1/|")+	})++	t.Run("Explicit baseURL", func(t *testing.T) {+		files := `+-- hugo.toml --+baseURL = "https://example.com/docs/"+-- content/p1.md --+---+title: "p1"+---+-- layouts/single.html --+Permalink: {{ .Permalink }}|+`+		b := hugolib.Test(t, files)++		b.AssertFileContent("public/p1/index.html", "Permalink: https://example.com/docs/p1/|")+	})++	t.Run("Explicit empty baseURL", func(t *testing.T) {+		files := `+-- hugo.toml --+baseURL = ""+-- content/p1.md --+---+title: "p1"+---+-- layouts/single.html --+Permalink: {{ .Permalink }}|+`+		b := hugolib.Test(t, files)++		b.AssertFileContent("public/p1/index.html", "Permalink: /p1/|")+	})+}hugolib/alias_test.goindex e9bfe8e6c..b4344e834 100644@@ -36,8 +36,8 @@ func TestAlias(t *testing.T) { 		{"/index.html", "http://example.com", "/", map[string]any{"baseURL": "http://example.com"}}, 		{"/index.html", "http://example.com/some/path", "/", map[string]any{"baseURL": "http://example.com/some/path"}}, 		{"/index.html", "http://example.com", "/", map[string]any{"baseURL": "http://example.com", "canonifyURLs": true}},-		{"/index.html", "../..", "/", map[string]any{"relativeURLs": true}},-		{".html", "", ".html", map[string]any{"uglyURLs": true}},+		{"/index.html", "../..", "/", map[string]any{"baseURL": "/", "relativeURLs": true}},+		{".html", "", ".html", map[string]any{"baseURL": "/", "uglyURLs": true}}, 	}  	for _, test := range tests {@@ -691,6 +691,7 @@ func TestOutputFormatIsHTMLWithMultilangAliases(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = '/' defaultContentLanguageInSubdir = true disableKinds = ['page', 'section', 'rss', 'sitemap', 'taxonomy', 'term'] @@ -797,6 +798,7 @@ func TestAliasExplicitExtension(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = '/' disableKinds = ['home','rss','section','sitemap','taxonomy','term'] uglyURLs = UGLYURLS tpl/tplimpl/embedded_templates_integration_test.goindex 5790216cc..5286039a7 100644@@ -133,6 +133,7 @@ func TestOpengraphTemplate(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = '/' title = 'My Site' capitalizeListTitles = false disableKinds = ['section','rss','sitemap','taxonomy']@@ -412,6 +413,7 @@ func TestSchemaTemplate(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = '/' capitalizeListTitles = false disableKinds = ['rss','sitemap'] [markup.goldmark.renderer]@@ -540,6 +542,7 @@ func TestTwitterCardsTemplate(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = '/' capitalizeListTitles = false disableKinds = ['rss','sitemap','taxonomy','term'] [markup.goldmark.renderer]tpl/tplimpl/tplimpl_integration_test.goindex 647500207..12d033b63 100644@@ -168,6 +168,7 @@ func TestSitemap(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = '/' disableKinds = ['home','rss','section','taxonomy','term'] [sitemap] disable = true 
Merged fix · PR #15384+196 −88
config/allconfig/allconfig.goindex a84545edb..0cb1f3a6b 100644@@ -357,6 +357,10 @@ func (c *Config) CompileConfig(logger loggers.Logger) error { 		ignoredLogIDs[err] = true 	} +	if c.BaseURL == "" {+		c.BaseURL = "https://example.org/"+	}+ 	baseURL, err := urls.NewBaseURLFromString(c.BaseURL) 	if err != nil { 		return err@@ -594,7 +598,7 @@ func (c *ConfigCompiled) SetServerInfo(baseURL, baseURLLiveReload urls.BaseURL, // RootConfig holds all the top-level configuration options in Hugo type RootConfig struct { 	// The base URL of the site.-	// Note that the default value is empty, but Hugo requires a valid URL (e.g. "https://example.com/") to work properly.+	// It defaults to https://example.org/ 	// <docsmeta>{"identifiers": ["URL"] }</docsmeta> 	BaseURL string hugolib/alias_test.goindex e9bfe8e6c..e7072689e 100644@@ -36,8 +36,8 @@ func TestAlias(t *testing.T) { 		{"/index.html", "http://example.com", "/", map[string]any{"baseURL": "http://example.com"}}, 		{"/index.html", "http://example.com/some/path", "/", map[string]any{"baseURL": "http://example.com/some/path"}}, 		{"/index.html", "http://example.com", "/", map[string]any{"baseURL": "http://example.com", "canonifyURLs": true}},-		{"/index.html", "../..", "/", map[string]any{"relativeURLs": true}},-		{".html", "", ".html", map[string]any{"uglyURLs": true}},+		{"/index.html", "../..", "/", map[string]any{"relativeURLs": true, "baseURL": "/"}},+		{".html", "", ".html", map[string]any{"uglyURLs": true, "baseURL": "/"}}, 	}  	for _, test := range tests {@@ -273,22 +273,26 @@ aliases: [/p2-alias] 	b := Test(t, f)  	// output format: html-	b.AssertFileContent("public/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/foo/s1-alias/index.html", 		`<title>https://example.org/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s1/">`, 	)-	b.AssertFileContent("public/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/foo/s1/p1-alias/index.html", 		`<title>https://example.org/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/s2-alias/index.html",+	b.AssertFileContent(+		"public/s2-alias/index.html", 		`<title>https://example.org/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s2/">`, 	)-	b.AssertFileContent("public/p2-alias/index.html",+	b.AssertFileContent(+		"public/p2-alias/index.html", 		`<title>https://example.org/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s2/p2/">`,@@ -347,44 +351,52 @@ aliases: [/p2-alias] 	b = Test(t, f)  	// output format: html-	b.AssertFileContent("public/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/foo/s1-alias/index.html", 		`<title>https://example.org/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s1/">`, 	)-	b.AssertFileContent("public/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/foo/s1/p1-alias/index.html", 		`<title>https://example.org/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/s2-alias/index.html",+	b.AssertFileContent(+		"public/s2-alias/index.html", 		`<title>https://example.org/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s2/">`, 	)-	b.AssertFileContent("public/p2-alias/index.html",+	b.AssertFileContent(+		"public/p2-alias/index.html", 		`<title>https://example.org/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/foo/s2/p2/">`, 	)  	// output format: print-	b.AssertFileContent("public/print/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/print/foo/s1-alias/index.html", 		`<title>https://example.org/print/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/print/foo/s1/">`, 	)-	b.AssertFileContent("public/print/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/print/foo/s1/p1-alias/index.html", 		`<title>https://example.org/print/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/print/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/print/s2-alias/index.html",+	b.AssertFileContent(+		"public/print/s2-alias/index.html", 		`<title>https://example.org/print/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/print/foo/s2/">`, 	)-	b.AssertFileContent("public/print/p2-alias/index.html",+	b.AssertFileContent(+		"public/print/p2-alias/index.html", 		`<title>https://example.org/print/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/print/foo/s2/p2/">`,@@ -473,88 +485,104 @@ aliases: [/p2-alias] 	b := Test(t, files)  	// language: de, output format: html-	b.AssertFileContent("public/guest/v1.0.0/de/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/foo/s1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/foo/s1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/de/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/foo/s1/p1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/de/s2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/s2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/foo/s2/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/de/p2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/p2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/foo/s2/p2/">`, 	)  	// language: de, output format: print-	b.AssertFileContent("public/guest/v1.0.0/de/print/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/print/foo/s1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/print/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/print/foo/s1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/de/print/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/print/foo/s1/p1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/print/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/print/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/de/print/s2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/print/s2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/print/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/print/foo/s2/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/de/print/p2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/de/print/p2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/de/print/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/de/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/de/print/foo/s2/p2/">`, 	)  	// language: en, output format: html-	b.AssertFileContent("public/guest/v1.0.0/en/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/foo/s1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/foo/s1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/en/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/foo/s1/p1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/en/s2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/s2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/foo/s2/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/en/p2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/p2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/foo/s2/p2/">`, 	)  	// language: en, output format: print-	b.AssertFileContent("public/guest/v1.0.0/en/print/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/print/foo/s1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/print/foo/s1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/print/foo/s1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/en/print/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/print/foo/s1/p1-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/print/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/print/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/en/print/s2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/print/s2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/print/foo/s2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/print/foo/s2/">`, 	)-	b.AssertFileContent("public/guest/v1.0.0/en/print/p2-alias/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/print/p2-alias/index.html", 		`<title>https://example.org/guest/v1.0.0/en/print/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://example.org/guest/v1.0.0/en/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://example.org/guest/v1.0.0/en/print/foo/s2/p2/">`,@@ -568,88 +596,104 @@ aliases: [/p2-alias] 	b = Test(t, files)  	// language: de, output format: html-	b.AssertFileContent("public/de/guest/v1.0.0/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/foo/s1-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/foo/s1/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/foo/s1/">`, 	)-	b.AssertFileContent("public/de/guest/v1.0.0/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/foo/s1/p1-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/de/guest/v1.0.0/s2-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/s2-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/foo/s2/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/foo/s2/">`, 	)-	b.AssertFileContent("public/de/guest/v1.0.0/p2-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/p2-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/foo/s2/p2/">`, 	)  	// language: de, output format: print-	b.AssertFileContent("public/de/guest/v1.0.0/print/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/print/foo/s1-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/print/foo/s1/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/print/foo/s1/">`, 	)-	b.AssertFileContent("public/de/guest/v1.0.0/print/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/print/foo/s1/p1-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/print/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/print/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/de/guest/v1.0.0/print/s2-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/print/s2-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/print/foo/s2/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/print/foo/s2/">`, 	)-	b.AssertFileContent("public/de/guest/v1.0.0/print/p2-alias/index.html",+	b.AssertFileContent(+		"public/de/guest/v1.0.0/print/p2-alias/index.html", 		`<title>https://de.example.org/guest/v1.0.0/print/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://de.example.org/guest/v1.0.0/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://de.example.org/guest/v1.0.0/print/foo/s2/p2/">`, 	)  	// language: en, output format: html-	b.AssertFileContent("public/en/guest/v1.0.0/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/foo/s1-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/foo/s1/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/foo/s1/">`, 	)-	b.AssertFileContent("public/en/guest/v1.0.0/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/foo/s1/p1-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/en/guest/v1.0.0/s2-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/s2-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/foo/s2/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/foo/s2/">`, 	)-	b.AssertFileContent("public/en/guest/v1.0.0/p2-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/p2-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/foo/s2/p2/">`, 	)  	// language: en, output format: print-	b.AssertFileContent("public/en/guest/v1.0.0/print/foo/s1-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/print/foo/s1-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/print/foo/s1/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s1/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/print/foo/s1/">`, 	)-	b.AssertFileContent("public/en/guest/v1.0.0/print/foo/s1/p1-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/print/foo/s1/p1-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/print/foo/s1/p1/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s1/p1/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/print/foo/s1/p1/">`, 	)-	b.AssertFileContent("public/en/guest/v1.0.0/print/s2-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/print/s2-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/print/foo/s2/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s2/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/print/foo/s2/">`, 	)-	b.AssertFileContent("public/en/guest/v1.0.0/print/p2-alias/index.html",+	b.AssertFileContent(+		"public/en/guest/v1.0.0/print/p2-alias/index.html", 		`<title>https://en.example.org/guest/v1.0.0/print/foo/s2/p2/</title>`, 		`<link rel="canonical" href="https://en.example.org/guest/v1.0.0/foo/s2/p2/">`, 		`<meta http-equiv="refresh" content="0; url=https://en.example.org/guest/v1.0.0/print/foo/s2/p2/">`,@@ -679,7 +723,8 @@ Home. ` 	b := Test(t, files) -	b.AssertFileContent("public/guest/v1.0.0/en/index.html",+	b.AssertFileContent(+		"public/guest/v1.0.0/en/index.html", 		"/guest/v1.0.0/en/foo/p2            =>/guest/v1.0.0/en/foo/p1/|", 		"/guest/v1.0.0/en/p3                =>/guest/v1.0.0/en/foo/p1/|", 	)@@ -691,6 +736,7 @@ func TestOutputFormatIsHTMLWithMultilangAliases(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = "/" defaultContentLanguageInSubdir = true disableKinds = ['page', 'section', 'rss', 'sitemap', 'taxonomy', 'term'] @@ -799,6 +845,7 @@ func TestAliasExplicitExtension(t *testing.T) { -- hugo.toml -- disableKinds = ['home','rss','section','sitemap','taxonomy','term'] uglyURLs = UGLYURLS+baseURL = "/"  [mediaTypes]   [mediaTypes.'text/html']hugolib/page_permalink_test.goindex c2fe8f089..d5ae69375 100644@@ -34,17 +34,17 @@ func TestPermalink(t *testing.T) { 		expectedAbs  string 		expectedRel  string 	}{-		{"x/y/z/boofar.md", "", "", "", false, false, "/x/y/z/boofar/", "/x/y/z/boofar/"},-		{"x/y/z/boofar.md", "", "", "", false, false, "/x/y/z/boofar/", "/x/y/z/boofar/"},+		{"x/y/z/boofar.md", "/", "", "", false, false, "/x/y/z/boofar/", "/x/y/z/boofar/"},+		{"x/y/z/boofar.md", "/", "", "", false, false, "/x/y/z/boofar/", "/x/y/z/boofar/"}, 		// Issue #1174 		{"x/y/z/boofar.md", "http://gopher.com/", "", "", false, true, "http://gopher.com/x/y/z/boofar/", "/x/y/z/boofar/"}, 		{"x/y/z/boofar.md", "http://gopher.com/", "", "", true, true, "http://gopher.com/x/y/z/boofar.html", "/x/y/z/boofar.html"},-		{"x/y/z/boofar.md", "", "boofar", "", false, false, "/x/y/z/boofar/", "/x/y/z/boofar/"},+		{"x/y/z/boofar.md", "/", "boofar", "", false, false, "/x/y/z/boofar/", "/x/y/z/boofar/"}, 		{"x/y/z/boofar.md", "http://barnew/", "", "", false, false, "http://barnew/x/y/z/boofar/", "/x/y/z/boofar/"}, 		{"x/y/z/boofar.md", "http://barnew/", "boofar", "", false, false, "http://barnew/x/y/z/boofar/", "/x/y/z/boofar/"},-		{"x/y/z/boofar.md", "", "", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},-		{"x/y/z/boofar.md", "", "", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},-		{"x/y/z/boofar.md", "", "boofar", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},+		{"x/y/z/boofar.md", "/", "", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},+		{"x/y/z/boofar.md", "/", "", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"},+		{"x/y/z/boofar.md", "/", "boofar", "", true, false, "/x/y/z/boofar.html", "/x/y/z/boofar.html"}, 		{"x/y/z/boofar.md", "http://barnew/", "", "", true, false, "http://barnew/x/y/z/boofar.html", "/x/y/z/boofar.html"}, 		{"x/y/z/boofar.md", "http://barnew/", "boofar", "", true, false, "http://barnew/x/y/z/boofar.html", "/x/y/z/boofar.html"}, 		{"x/y/z/boofar.md", "http://barnew/boo/", "booslug", "", true, false, "http://barnew/boo/x/y/z/booslug.html", "/boo/x/y/z/booslug.html"},@@ -56,9 +56,9 @@ func TestPermalink(t *testing.T) { 		{"x/y/z/boo-makeindex.md", "http://barnew/boo", "", "", true, true, "http://barnew/boo/x/y/z/boo-makeindex.html", "/x/y/z/boo-makeindex.html"},  		// test URL overrides-		{"x/y/z/boofar.md", "", "", "/z/y/q/", false, false, "/z/y/q/", "/z/y/q/"},+		{"x/y/z/boofar.md", "/", "", "/z/y/q/", false, false, "/z/y/q/", "/z/y/q/"}, 		// test URL override with expands-		{"x/y/z/boofar.md", "", "test", "/z/:slug/", false, false, "/z/test/", "/z/test/"},+		{"x/y/z/boofar.md", "/", "test", "/z/:slug/", false, false, "/z/test/", "/z/test/"}, 	}  	for i, test := range tests {hugolib/site_url_test.goindex 253969a34..b96dd3de2 100644@@ -14,6 +14,7 @@ package hugolib  import (+	"strings" 	"testing" ) @@ -33,3 +34,25 @@ SectionsEntries: {{ .SectionsEntries }} 	b.AssertFileContent("public/withfile/index.html", "SectionsEntries: [withfile]") 	b.AssertFileContent("public/withoutfile/index.html", "SectionsEntries: [withoutfile]") }++// See #14625.+func TestDefaultBaseURL(t *testing.T) {+	filesTemplate := `+-- hugo.toml --+CONFIG+-- content/_index.md --+-- layouts/list.html --+BaseURL: {{ .Site.BaseURL }}+`+	files := strings.ReplaceAll(filesTemplate, "CONFIG", `baseURL = "https://example.com/"`)+	b := Test(t, files)+	b.AssertFileContent("public/index.html", "BaseURL: https://example.com/")++	files = strings.ReplaceAll(filesTemplate, "CONFIG", "")+	b = Test(t, files)+	b.AssertFileContent("public/index.html", "BaseURL: https://example.org/")++	files = strings.ReplaceAll(filesTemplate, "CONFIG", `baseURL = "/"`)+	b = Test(t, files)+	b.AssertFileContent("public/index.html", "BaseURL: /")+}tpl/tplimpl/embedded_templates_integration_test.goindex 5790216cc..4fa17d71d 100644@@ -47,7 +47,8 @@ disqus_url = 'https://example.com/my-page/'  	b := hugolib.Test(t, files) -	b.AssertFileContent("public/index.html",+	b.AssertFileContent(+		"public/index.html", 		`s.src = '//' + "foo" + '.disqus.com/embed.js';`, 		`this.page.identifier = 'my-identifier';`, 		`this.page.title = 'My Title';`,@@ -88,7 +89,8 @@ title: Home 	// Default respectDoNotTrack value 	f := strings.ReplaceAll(files, "DNT", "") 	b := hugolib.Test(t, f)-	b.AssertFileContent("public/index.html",+	b.AssertFileContent(+		"public/index.html", 		`<script async src="https://www.googletagmanager.com/gtag/js?id=G-0123456789"></script>`, 		`if ( true )`, 	)@@ -96,7 +98,8 @@ title: Home 	// respectDoNotTrack = true 	f = strings.ReplaceAll(files, "DNT", "respectDoNotTrack = true") 	b = hugolib.Test(t, f)-	b.AssertFileContent("public/index.html",+	b.AssertFileContent(+		"public/index.html", 		`<script async src="https://www.googletagmanager.com/gtag/js?id=G-0123456789"></script>`, 		`if ( true )`, 	)@@ -104,7 +107,8 @@ title: Home 	// respectDoNotTrack = false 	f = strings.ReplaceAll(files, "DNT", "respectDoNotTrack = false") 	b = hugolib.Test(t, f)-	b.AssertFileContent("public/index.html",+	b.AssertFileContent(+		"public/index.html", 		`<script async src="https://www.googletagmanager.com/gtag/js?id=G-0123456789"></script>`, 		`if ( false )`, 	)@@ -133,6 +137,7 @@ func TestOpengraphTemplate(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = "/" title = 'My Site' capitalizeListTitles = false disableKinds = ['section','rss','sitemap','taxonomy']@@ -210,7 +215,8 @@ title: p0  	b := hugolib.Test(t, files) -	b.AssertFileContent("public/s1/p1/index.html", `+	b.AssertFileContent(+		"public/s1/p1/index.html", ` 		<meta property="og:url" content="/s1/p1/"> 		<meta property="og:site_name" content="My Site"> 		<meta property="og:title" content="p1">@@ -237,38 +243,45 @@ title: p0 	)  	// Description from content excerpt-	b.AssertFileContent("public/s1/p2/index.html",+	b.AssertFileContent(+		"public/s1/p2/index.html", 		`<meta property="og:description" content="d e and f can’t.">`, 	)  	// Description from front matter summary-	b.AssertFileContent("public/s1/p3/index.html",+	b.AssertFileContent(+		"public/s1/p3/index.html", 		`<meta property="og:description" content="g h and i can’t.">`, 	)  	// The markdown is intentionally not rendered to HTML.-	b.AssertFileContent("public/s1/p4/index.html",+	b.AssertFileContent(+		"public/s1/p4/index.html", 		`<meta property="og:description" content="j k and **l** can&#39;t.">`, 	)  	// The markdown is intentionally not rendered to HTML.-	b.AssertFileContent("public/s1/p5/index.html",+	b.AssertFileContent(+		"public/s1/p5/index.html", 		`<meta property="og:description" content="m n and **o** can&#39;t.">`, 	)  	// og:locale from page front matter-	b.AssertFileContent("public/s1/p6/index.html",+	b.AssertFileContent(+		"public/s1/p6/index.html", 		`<meta property="og:locale" content="fr_FR">`, 	)  	// No article:section for root-level page-	b.AssertFileContent("public/p0/index.html",+	b.AssertFileContent(+		"public/p0/index.html", 		`<meta property="og:type" content="article">`, 		`! article:section`, 	)  	// Term page-	b.AssertFileContent("public/series/series-1/index.html",+	b.AssertFileContent(+		"public/series/series-1/index.html", 		`<meta property="og:url" content="/series/series-1/">`, 		`<meta property="og:title" content="series-1">`, 		`<meta property="og:type" content="website">`,@@ -280,13 +293,15 @@ title: p0 	// facebook_app_id takes precedence over facebook_admin 	f := strings.ReplaceAll(files, "facebook_admin = 'foo'", "facebook_app_id = 'bar'") 	b = hugolib.Test(t, f)-	b.AssertFileContent("public/s1/p1/index.html",+	b.AssertFileContent(+		"public/s1/p1/index.html", 		`<meta property="fb:app_id" content="bar">`, 		`! fb:admins`, 	)  	// Issue 14433-	b.AssertFileContent("public/index.html",+	b.AssertFileContent(+		"public/index.html", 		`<meta property="og:title" content="Home">`, 		`<meta property="og:locale" content="en_US">`, 		`<meta property="og:type" content="website">`,@@ -365,7 +380,8 @@ title: p10 	// Default format, last page: active First and Prev, disabled Next and Last 	f := strings.ReplaceAll(files, "PARTIAL", `{{ partial "pagination.html" . }}`) 	b := hugolib.Test(t, f)-	b.AssertFileContent("public/page/10/index.html",+	b.AssertFileContent(+		"public/page/10/index.html", 		`<a href="/" aria-label="First" class="page-link" role="button">`, 		`<a href="/page/9/" aria-label="Previous" class="page-link" role="button">`, 		`aria-disabled="true" aria-label="Next"`,@@ -375,7 +391,8 @@ title: p10 	// Terse format, last page: First and Prev shown, Next and Last hidden 	f = strings.ReplaceAll(files, "PARTIAL", `{{ partial "pagination.html" (dict "page" . "format" "terse") }}`) 	b = hugolib.Test(t, f)-	b.AssertFileContent("public/page/10/index.html",+	b.AssertFileContent(+		"public/page/10/index.html", 		`<a href="/" aria-label="First" class="page-link" role="button">`, 		`<a href="/page/9/" aria-label="Previous" class="page-link" role="button">`, 		`! aria-label="Next"`,@@ -412,6 +429,7 @@ func TestSchemaTemplate(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = "/" capitalizeListTitles = false disableKinds = ['rss','sitemap'] [markup.goldmark.renderer]@@ -462,7 +480,8 @@ keywords: [k1,k2]  	b := hugolib.Test(t, files) -	b.AssertFileContent("public/s1/p1/index.html", `+	b.AssertFileContent(+		"public/s1/p1/index.html", ` 		<meta itemprop="name" content="p1"> 		<meta itemprop="description" content="a b and c can’t."> 		<meta itemprop="datePublished" content="2024-04-24T08:00:00-07:00">@@ -475,27 +494,32 @@ keywords: [k1,k2] 	)  	// Description from content excerpt-	b.AssertFileContent("public/s1/p2/index.html",+	b.AssertFileContent(+		"public/s1/p2/index.html", 		`<meta itemprop="description" content="d e and f can’t.">`, 	)  	// Description from front matter summary-	b.AssertFileContent("public/s1/p3/index.html",+	b.AssertFileContent(+		"public/s1/p3/index.html", 		`<meta itemprop="description" content="g h and i can’t.">`, 	)  	// The markdown is intentionally not rendered to HTML.-	b.AssertFileContent("public/s1/p4/index.html",+	b.AssertFileContent(+		"public/s1/p4/index.html", 		`<meta itemprop="description" content="j k and **l** can&#39;t.">`, 	)  	// The markdown is intentionally not rendered to HTML.-	b.AssertFileContent("public/s1/p5/index.html",+	b.AssertFileContent(+		"public/s1/p5/index.html", 		`<meta itemprop="description" content="m n and **o** can&#39;t.">`, 	)  	// Front matter keywords-	b.AssertFileContent("public/s1/p6/index.html",+	b.AssertFileContent(+		"public/s1/p6/index.html", 		`<meta itemprop="keywords" content="k1,k2">`, 	) @@ -586,9 +610,10 @@ title: ''  	b := hugolib.Test(t, files) -	b.AssertFileContent("public/s1/p1/index.html", `+	b.AssertFileContent(+		"public/s1/p1/index.html", ` 		<meta name="twitter:card" content="summary_large_image">-		<meta name="twitter:image" content="/a.jpg">+		<meta name="twitter:image" content="https://example.org/a.jpg"> 		<meta name="twitter:title" content="p1"> 		<meta name="twitter:description" content="a b and c can’t."> 		<meta name="twitter:site" content="@foo">@@ -596,23 +621,27 @@ title: '' 	)  	// Description from content excerpt-	b.AssertFileContent("public/s1/p2/index.html",+	b.AssertFileContent(+		"public/s1/p2/index.html", 		`<meta name="twitter:card" content="summary">`, 		`<meta name="twitter:description" content="d e and f can’t.">`, 	)  	// Description from front matter summary-	b.AssertFileContent("public/s1/p3/index.html",+	b.AssertFileContent(+		"public/s1/p3/index.html", 		`<meta name="twitter:description" content="g h and i can’t.">`, 	)  	// The markdown is intentionally not rendered to HTML.-	b.AssertFileContent("public/s1/p4/index.html",+	b.AssertFileContent(+		"public/s1/p4/index.html", 		`<meta name="twitter:description" content="j k and **l** can&#39;t.">`, 	)  	// The markdown is intentionally not rendered to HTML.-	b.AssertFileContent("public/s1/p5/index.html",+	b.AssertFileContent(+		"public/s1/p5/index.html", 		`<meta name="twitter:description" content="m n and **o** can&#39;t.">`, 	) tpl/tplimpl/tplimpl_integration_test.goindex 647500207..b1f03a50a 100644@@ -168,6 +168,7 @@ func TestSitemap(t *testing.T) {  	files := ` -- hugo.toml --+baseURL = "/" disableKinds = ['home','rss','section','taxonomy','term'] [sitemap] disable = true@@ -188,28 +189,32 @@ title: p2  	// Test A: Exclude all pages via project config. 	b := hugolib.Test(t, files)-	b.AssertFileContentExact("public/sitemap.xml",+	b.AssertFileContentExact(+		"public/sitemap.xml", 		"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n  xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\n  \n</urlset>\n", 	)  	// Test B: Include all pages via project config. 	files_b := strings.ReplaceAll(files, "disable = true", "disable = false") 	b = hugolib.Test(t, files_b)-	b.AssertFileContentExact("public/sitemap.xml",+	b.AssertFileContentExact(+		"public/sitemap.xml", 		"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n  xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\n  <url>\n    <loc>/p1/</loc>\n  </url><url>\n    <loc>/p2/</loc>\n  </url>\n</urlset>\n", 	)  	// Test C: Exclude all pages via project config, but include p1 via front matter. 	files_c := strings.ReplaceAll(files, "p1_disable: foo", "disable: false") 	b = hugolib.Test(t, files_c)-	b.AssertFileContentExact("public/sitemap.xml",+	b.AssertFileContentExact(+		"public/sitemap.xml", 		"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n  xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\n  <url>\n    <loc>/p1/</loc>\n  </url>\n</urlset>\n", 	)  	// Test D:  Include all pages via project config, but exclude p1 via front matter. 	files_d := strings.ReplaceAll(files_b, "p1_disable: foo", "disable: true") 	b = hugolib.Test(t, files_d)-	b.AssertFileContentExact("public/sitemap.xml",+	b.AssertFileContentExact(+		"public/sitemap.xml", 		"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n  xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\n  <url>\n    <loc>/p2/</loc>\n  </url>\n</urlset>\n", 	) }