Repository: gohugoio/hugo
Pull request #13787 (2025-06-06 08:59:56)

build(deps): bump golang.org/x/tools from 0.32.0 to 0.34.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.32.0 to 0.34.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/golang/tools/commit/578c1213983a83e6411536ddf6bbf3a1faf97aea"><code>578c121</code></a> go.mod: update golang.org/x dependencies</li>
<li><a href="https://github.com/golang/tools/commit/f114dcf97d4f35feb86030bb9e1c5c8fc6fd8942"><code>f114dcf</code></a> gopls/internal/protocol: refine DocumentURI Clean method and its usages</li>
<li><a href="https://github.com/golang/tools/commit/82ee0fd1228b85b95daadd1901e83a9200d661e6"><code>82ee0fd</code></a> internal/mcp: change paginateList to a generic helper</li>
<li><a href="https://github.com/golang/tools/commit/64bfecc32e163d2684a85b73472919e02da50180"><code>64bfecc</code></a> gopls/internal/golang: fix extract bug with anon functions</li>
<li><a href="https://github.com/golang/tools/commit/4546fbd0b20190ede82382b293ae4440923ecaea"><code>4546fbd</code></a> internal/mcp: unify json tag parsing</li>
<li><a href="https://github.com/golang/tools/commit/82473ce934847055bec96f8a96e4d1fc38ecefa9"><code>82473ce</code></a> gopls/doc/release: tweak v0.19</li>
<li><a href="https://github.com/golang/tools/commit/f3c581ff0cb8b4b87129f04094005c4b0f962bf9"><code>f3c581f</code></a> gopls/internal/protocol: add DocumentURI.Base accessor</li>
<li><a href="https://github.com/golang/tools/commit/d9bacab54dfed6ac3f871f422bb0b2cb5eb5c428"><code>d9bacab</code></a> gopls/internal/server: improve &quot;editing generated file&quot; warning</li>
<li><a href="https://github.com/golang/tools/commit/1afeefa8150f171e0a8f0948015513b31d59d2f3"><code>1afeefa</code></a> internal/mcp: unexport FileResourceHandler</li>
<li><a href="https://github.com/golang/tools/commit/33d59880f345d37e4262f5f8e504ddfb6818266b"><code>33d5988</code></a> gopls/internal/server: Organize Imports of generated files</li>
<li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.32.0...v0.34.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/tools&package-manager=go_modules&previous-version=0.32.0&new-version=0.34.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

jmooring: @dependabot rebase
bep: @dependabot recreate

Patch:
diff --git a/common/paths/pathparser.go b/common/paths/pathparser.go
index 1cae710e8..8b9259bf7 100644
--- a/common/paths/pathparser.go
+++ b/common/paths/pathparser.go
@@ -640,7 +640,7 @@ func (p *Path) Base() string {
 // For pages with Type set, we treat that as the section.
 func (p *Path) BaseReTyped(typ string) (d string) {
 	base := p.Base()
-	if typ == "" || p.Section() == typ {
+	if p.Section() == typ {
 		return base
 	}
 	d = "/" + typ
diff --git a/deploy/deploy.go b/deploy/deploy.go
index 4b90881a6..57e1f41a2 100644
--- a/deploy/deploy.go
+++ b/deploy/deploy.go
@@ -36,6 +36,7 @@ import (
 	"github.com/dustin/go-humanize"
 	"github.com/gobwas/glob"
 	"github.com/gohugoio/hugo/common/loggers"
+	"github.com/gohugoio/hugo/common/para"
 	"github.com/gohugoio/hugo/config"
 	"github.com/gohugoio/hugo/deploy/deployconfig"
 	"github.com/gohugoio/hugo/media"
@@ -487,7 +488,12 @@ func knownHiddenDirectory(name string) bool {
 // walkLocal walks the source directory and returns a flat list of files,
 // using localFile.SlashPath as the map keys.
 func (d *Deployer) walkLocal(fs afero.Fs, matchers []*deployconfig.Matcher, include, exclude glob.Glob, mediaTypes media.Types, mappath func(string) string) (map[string]*localFile, error) {
-	retval := map[string]*localFile{}
+	retval := make(map[string]*localFile)
+	var mu sync.Mutex
+
+	workers := para.New(d.cfg.Workers)
+	g, _ := workers.Start(context.Background())
+
 	err := afero.Walk(fs, "", func(path string, info os.FileInfo, err error) error {
 		if err != nil {
 			return err
@@ -508,45 +514,54 @@ func (d *Deployer) walkLocal(fs afero.Fs, matchers []*deployconfig.Matcher, incl
 			return nil
 		}
 
-		// When a file system is HFS+, its filepath is in NFD form.
-		if runtime.GOOS == "darwin" {
-			path = norm.NFC.String(path)
-		}
+		// Process each file in a worker
+		g.Run(func() error {
+			// When a file system is HFS+, its filepath is in NFD form.
+			if runtime.GOOS == "darwin" {
+				path = norm.NFC.String(path)
+			}
 
-		// Check include/exclude matchers.
-		slashpath := filepath.ToSlash(path)
-		if include != nil && !include.Match(slashpath) {
-			d.logger.Infof("  dropping %q due to include\n", slashpath)
-			return nil
-		}
-		if exclude != nil && exclude.Match(slashpath) {
-			d.logger.Infof("  dropping %q due to exclude\n", slashpath)
-			return nil
-		}
+			// Check include/exclude matchers.
+			slashpath := filepath.ToSlash(path)
+			if include != nil && !include.Match(slashpath) {
+				d.logger.Infof("  dropping %q due to include\n", slashpath)
+				return nil
+			}
+			if exclude != nil && exclude.Match(slashpath) {
+				d.logger.Infof("  dropping %q due to exclude\n", slashpath)
+				return nil
+			}
 
-		// Find the first matching matcher (if any).
-		var m *deployconfig.Matcher
-		for _, cur := range matchers {
-			if cur.Matches(slashpath) {
-				m = cur
-				break
+			// Find the first matching matcher (if any).
+			var m *deployconfig.Matcher
+			for _, cur := range matchers {
+				if cur.Matches(slashpath) {
+					m = cur
+					break
+				}
 			}
-		}
-		// Apply any additional modifications to the local path, to map it to
-		// the remote path.
-		if mappath != nil {
-			slashpath = mappath(slashpath)
-		}
-		lf, err := newLocalFile(fs, path, slashpath, m, mediaTypes)
-		if err != nil {
-			return err
-		}
-		retval[lf.SlashPath] = lf
+			// Apply any additional modifications to the local path, to map it to
+			// the remote path.
+			if mappath != nil {
+				slashpath = mappath(slashpath)
+			}
+			lf, err := newLocalFile(fs, path, slashpath, m, mediaTypes)
+			if err != nil {
+				return err
+			}
+			mu.Lock()
+			retval[lf.SlashPath] = lf
+			mu.Unlock()
+			return nil
+		})
 		return nil
 	})
 	if err != nil {
 		return nil, err
 	}
+	if err := g.Wait(); err != nil {
+		return nil, err
+	}
 	return retval, nil
 }
 
diff --git a/go.mod b/go.mod
index 1fa93cb5c..4cddbc06b 100644
--- a/go.mod
+++ b/go.mod
@@ -79,7 +79,7 @@ require (
 	golang.org/x/net v0.41.0
 	golang.org/x/sync v0.15.0
 	golang.org/x/text v0.26.0
-	golang.org/x/tools v0.33.0
+	golang.org/x/tools v0.34.0
 	google.golang.org/api v0.237.0
 	gopkg.in/yaml.v2 v2.4.0
 	rsc.io/qr v0.2.0
diff --git a/go.sum b/go.sum
index 4328b73b9..94272ef25 100644
--- a/go.sum
+++ b/go.sum
@@ -794,8 +794,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
 golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
 golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
 golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
-golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
-golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
+golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
+golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/hugolib/page.go b/hugolib/page.go
index bb3835c1e..dc0d9f4bc 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -479,7 +479,7 @@ func (ps *pageState) initCommonProviders(pp pagePaths) error {
 func (po *pageOutput) GetInternalTemplateBasePathAndDescriptor() (string, tplimpl.TemplateDescriptor) {
 	p := po.p
 	f := po.f
-	base := p.PathInfo().BaseReTyped(p.m.pageConfig.Type)
+	base := p.PathInfo().BaseReTyped(p.m.Type())
 	return base, tplimpl.TemplateDescriptor{
 		Kind:           p.Kind(),
 		Lang:           p.Language().Lang,
diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go
index 0d6d22e9a..1af489f18 100644
--- a/hugolib/page__meta.go
+++ b/hugolib/page__meta.go
@@ -29,7 +29,6 @@ import (
 
 	"github.com/gohugoio/hugo/source"
 
-	"github.com/gohugoio/hugo/common/constants"
 	"github.com/gohugoio/hugo/common/hashing"
 	"github.com/gohugoio/hugo/common/hugo"
 	"github.com/gohugoio/hugo/common/loggers"
@@ -647,9 +646,6 @@ params:
 	}
 
 	for k, v := range userParams {
-		if _, found := params[k]; found {
-			p.s.Log.Warnidf(constants.WarnFrontMatterParamsOverrides, "Hugo front matter key %q is overridden in params section.", k)
-		}
 		params[strings.ToLower(k)] = v
 	}
 
diff --git a/hugoreleaser.env b/hugoreleaser.env
index fe49380b0..6da749524 100644
--- a/hugoreleaser.env
+++ b/hugoreleaser.env
@@ -1,7 +1,8 @@
 # Release env. 
 # These will be replaced by script before release.
-HUGORELEASER_TAG=v0.147.8
-HUGORELEASER_COMMITISH=10da2bd765d227761641f94d713d094e88b920ae
+HUGORELEASER_TAG=v0.147.9
+HUGORELEASER_COMMITISH=29bdbde19c288d190e889294a862103c6efb70bf
+
 
 
 
diff --git a/resources/page/page_matcher.go b/resources/page/page_matcher.go
index 306c2d03c..858def5ef 100644
--- a/resources/page/page_matcher.go
+++ b/resources/page/page_matcher.go
@@ -174,6 +174,9 @@ func DecodeCascade(logger loggers.Logger, handleLegacyFormat bool, in any) (*map
 
 func mapToPageMatcherParamsConfig(m map[string]any) (PageMatcherParamsConfig, error) {
 	var pcfg PageMatcherParamsConfig
+	if pcfg.Fields == nil {
+		pcfg.Fields = make(maps.Params)
+	}
 	for k, v := range m {
 		switch strings.ToLower(k) {
 		case "_target", "target":
@@ -193,9 +196,6 @@ func mapToPageMatcherParamsConfig(m map[string]any) (PageMatcherParamsConfig, er
 				}
 			}
 		default:
-			if pcfg.Fields == nil {
-				pcfg.Fields = make(maps.Params)
-			}
 
 			pcfg.Fields[k] = v
 		}
diff --git a/tpl/tplimpl/embedded/templates/_shortcodes/twitter.html b/tpl/tplimpl/embedded/templates/_shortcodes/twitter.html
index 849bad99e..c6200ffd2 100644
--- a/tpl/tplimpl/embedded/templates/_shortcodes/twitter.html
+++ b/tpl/tplimpl/embedded/templates/_shortcodes/twitter.html
@@ -20,7 +20,7 @@
   {{- $request := printf "https://publish.twitter.com/oembed?%s" $query -}}
   {{- with try (resources.GetRemote $request) -}}
     {{- with .Err -}}
-      {{- errorf "%s" . -}}
+      {{- warnidf "shortcode-twitter-getremote" "The %q shortcode was unable to retrieve the remote data: %s. See %s" $.ctx.Name . $.ctx.Position -}}
     {{- else with .Value -}}
       {{- (. | transform.Unmarshal).html | safeHTML -}}
     {{- else -}}
diff --git a/tpl/tplimpl/embedded/templates/_shortcodes/twitter_simple.html b/tpl/tplimpl/embedded/templates/_shortcodes/twitter_simple.html
index e9dcc76ba..34150393d 100644
--- a/tpl/tplimpl/embedded/templates/_shortcodes/twitter_simple.html
+++ b/tpl/tplimpl/embedded/templates/_shortcodes/twitter_simple.html
@@ -16,7 +16,7 @@
   {{- $request := printf "https://publish.twitter.com/oembed?%s" $query -}}
   {{- with try (resources.GetRemote $request) -}}
     {{- with .Err -}}
-      {{- errorf "%s" . -}}
+      {{- warnidf "shortcode-twitter-simple-getremote" "The %q shortcode was unable to retrieve the remote data: %s. See %s" $.ctx.Name . $.ctx.Position -}}
     {{- else with .Value -}}
       {{- if not site.Config.Services.Twitter.DisableInlineCSS }}
         {{- template "__h_simple_twitter_css" (dict "ctx" $.ctx) }}
diff --git a/tpl/tplimpl/embedded/templates/_shortcodes/vimeo_simple.html b/tpl/tplimpl/embedded/templates/_shortcodes/vimeo_simple.html
index 2e5f88282..a00f3e7f6 100644
--- a/tpl/tplimpl/embedded/templates/_shortcodes/vimeo_simple.html
+++ b/tpl/tplimpl/embedded/templates/_shortcodes/vimeo_simple.html
@@ -25,7 +25,7 @@
   {{- $request := printf "https://vimeo.com/api/oembed.json?%s" $query -}}
   {{- with try (resources.GetRemote $request) -}}
     {{- with .Err -}}
-      {{- errorf "%s" . -}}
+      {{- warnidf "shortcode-vimeo-simple" "The %q shortcode was unable to retrieve the remote data: %s. See %s" $.ctx.Name . $.ctx.Position -}}
     {{- else with .Value -}}
       {{- with . | transform.Unmarshal -}}
         {{- $class := printf "%s %s" "s_video_simple" "__h_video" -}}
diff --git a/tpl/tplimpl/embedded/templates/_shortcodes/x.html b/tpl/tplimpl/embedded/templates/_shortcodes/x.html
index 87455530c..38bf0f7b6 100644
--- a/tpl/tplimpl/embedded/templates/_shortcodes/x.html
+++ b/tpl/tplimpl/embedded/templates/_shortcodes/x.html
@@ -19,7 +19,7 @@
   {{- $request := printf "https://publish.x.com/oembed?%s" $query -}}
   {{- with try (resources.GetRemote $request) -}}
     {{- with .Err -}}
-      {{- errorf "%s" . -}}
+      {{- warnidf "shortcode-x-getremote" "The %q shortcode was unable to retrieve the remote data: %s. See %s" $.ctx.Name . $.ctx.Position -}}
     {{- else with .Value -}}
       {{- (. | transform.Unmarshal).html | safeHTML -}}
     {{- else -}}
diff --git a/tpl/tplimpl/embedded/templates/_shortcodes/x_simple.html b/tpl/tplimpl/embedded/templates/_shortcodes/x_simple.html
index be7830668..1e22835f6 100644
--- a/tpl/tplimpl/embedded/templates/_shortcodes/x_simple.html
+++ b/tpl/tplimpl/embedded/templates/_shortcodes/x_simple.html
@@ -15,7 +15,7 @@
   {{- $request := printf "https://publish.x.com/oembed?%s" $query -}}
   {{- with try (resources.GetRemote $request) -}}
     {{- with .Err -}}
-      {{- errorf "%s" . -}}
+      {{- warnidf "shortcode-x-simple-getremote" "The %q shortcode was unable to retrieve the remote data: %s. See %s" $.ctx.Name . $.ctx.Position -}}
     {{- else with .Value -}}
       {{- if not site.Config.Services.X.DisableInlineCSS }}
         {{- template "__h_simple_x_css" (dict "ctx" $.ctx) }}


Test patch:
diff --git a/deploy/deploy_test.go b/deploy/deploy_test.go
index 3bbc9ff70..bdc8299a0 100644
--- a/deploy/deploy_test.go
+++ b/deploy/deploy_test.go
@@ -623,7 +623,7 @@ func TestEndToEndSync(t *testing.T) {
 				localFs:    test.fs,
 				bucket:     test.bucket,
 				mediaTypes: media.DefaultTypes,
-				cfg:        deployconfig.DeployConfig{MaxDeletes: -1},
+				cfg:        deployconfig.DeployConfig{Workers: 2, MaxDeletes: -1},
 			}
 
 			// Initial deployment should sync remote with local.
@@ -706,7 +706,7 @@ func TestMaxDeletes(t *testing.T) {
 				localFs:    test.fs,
 				bucket:     test.bucket,
 				mediaTypes: media.DefaultTypes,
-				cfg:        deployconfig.DeployConfig{MaxDeletes: -1},
+				cfg:        deployconfig.DeployConfig{Workers: 2, MaxDeletes: -1},
 			}
 
 			// Sync remote with local.
@@ -836,7 +836,7 @@ func TestIncludeExclude(t *testing.T) {
 			}
 			deployer := &Deployer{
 				localFs: fsTest.fs,
-				cfg:     deployconfig.DeployConfig{MaxDeletes: -1}, bucket: fsTest.bucket,
+				cfg:     deployconfig.DeployConfig{Workers: 2, MaxDeletes: -1}, bucket: fsTest.bucket,
 				target:     tgt,
 				mediaTypes: media.DefaultTypes,
 			}
@@ -893,7 +893,7 @@ func TestIncludeExcludeRemoteDelete(t *testing.T) {
 			}
 			deployer := &Deployer{
 				localFs: fsTest.fs,
-				cfg:     deployconfig.DeployConfig{MaxDeletes: -1}, bucket: fsTest.bucket,
+				cfg:     deployconfig.DeployConfig{Workers: 2, MaxDeletes: -1}, bucket: fsTest.bucket,
 				mediaTypes: media.DefaultTypes,
 			}
 
@@ -945,7 +945,7 @@ func TestCompression(t *testing.T) {
 			deployer := &Deployer{
 				localFs:    test.fs,
 				bucket:     test.bucket,
-				cfg:        deployconfig.DeployConfig{MaxDeletes: -1, Matchers: []*deployconfig.Matcher{{Pattern: ".*", Gzip: true, Re: regexp.MustCompile(".*")}}},
+				cfg:        deployconfig.DeployConfig{Workers: 2, MaxDeletes: -1, Matchers: []*deployconfig.Matcher{{Pattern: ".*", Gzip: true, Re: regexp.MustCompile(".*")}}},
 				mediaTypes: media.DefaultTypes,
 			}
 
@@ -1000,7 +1000,7 @@ func TestMatching(t *testing.T) {
 			deployer := &Deployer{
 				localFs:    test.fs,
 				bucket:     test.bucket,
-				cfg:        deployconfig.DeployConfig{MaxDeletes: -1, Matchers: []*deployconfig.Matcher{{Pattern: "^subdir/aaa$", Force: true, Re: regexp.MustCompile("^subdir/aaa$")}}},
+				cfg:        deployconfig.DeployConfig{Workers: 2, MaxDeletes: -1, Matchers: []*deployconfig.Matcher{{Pattern: "^subdir/aaa$", Force: true, Re: regexp.MustCompile("^subdir/aaa$")}}},
 				mediaTypes: media.DefaultTypes,
 			}
 
@@ -1097,5 +1097,6 @@ func verifyRemote(ctx context.Context, bucket *blob.Bucket, local []*fileData) (
 func newDeployer() *Deployer {
 	return &Deployer{
 		logger: loggers.NewDefault(),
+		cfg:    deployconfig.DeployConfig{Workers: 2},
 	}
 }
diff --git a/hugolib/cascade_test.go b/hugolib/cascade_test.go
index fb9dffd15..3e3e471b7 100644
--- a/hugolib/cascade_test.go
+++ b/hugolib/cascade_test.go
@@ -938,3 +938,30 @@ path = '/p1'
 
 	b.AssertFileContent("public/p1/index.html", "p1|bar") // actual content is "p1|"
 }
+
+func TestCascadeWarnOverrideIssue13806(t *testing.T) {
+	t.Parallel()
+
+	files := `
+-- hugo.toml --
+disableKinds = ['home','rss','section','sitemap','taxonomy','term']
+[[cascade]]
+[cascade.params]
+searchable = true
+[cascade.target]
+kind = 'page'
+-- content/something.md --
+---
+title: Something
+params:
+  searchable: false
+---
+-- layouts/all.html --
+All.
+
+`
+
+	b := Test(t, files, TestOptWarn())
+
+	b.AssertLogContains("! WARN")
+}
diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index 1da67e58f..d4185531b 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -2000,3 +2000,61 @@ title: home en
 	b.AssertLogContains("Using index.de.md in your content's root directory is usually incorrect for your home page. You should use _index.de.md instead.")
 	b.AssertLogContains("Using index.en.org in your content's root directory is usually incorrect for your home page. You should use _index.en.org instead.")
 }
+
+// Issue 13826
+func TestTemplateSelectionIssue13826(t *testing.T) {
+	t.Parallel()
+
+	files := `
+-- hugo.toml --
+disableKinds = ['home','rss','section','sitemap','taxonomy','term']
+-- content/p1.md --
+---
+title: p1 (type implicitly set to page)
+---
+-- content/p2.md --
+---
+title: p2 (type explicitly set to page)
+type: page
+---
+-- content/p3.md --
+---
+title: p3 (type explicitly set to foo)
+type: foo
+---
+-- content/foo/p4.md --
+---
+title: p4 (type implicitly set to foo)
+---
+-- content/bar/p5.md --
+---
+title: p5 (type explicitly set to foo)
+type: foo
+---
+-- layouts/page/page.html --
+layouts/page/page.html
+-- layouts/foo/page.html --
+layouts/foo/page.html
+-- layouts/page.html --
+layouts/page.html
+`
+
+	b := Test(t, files)
+
+	b.AssertFileContent("public/p1/index.html", "layouts/page/page.html")
+	b.AssertFileContent("public/p2/index.html", "layouts/page/page.html")
+	b.AssertFileContent("public/p3/index.html", "layouts/foo/page.html")
+	b.AssertFileContent("public/foo/p4/index.html", "layouts/foo/page.html")
+	b.AssertFileContent("public/bar/p5/index.html", "layouts/foo/page.html")
+
+	files = strings.ReplaceAll(files, "-- layouts/page/page.html --", "-- delete-me-1.txt --")
+	files = strings.ReplaceAll(files, "-- layouts/foo/page.html --", "-- delete-me-2.txt --")
+
+	b = Test(t, files)
+
+	b.AssertFileContent("public/p1/index.html", "layouts/page.html")
+	b.AssertFileContent("public/p2/index.html", "layouts/page.html")
+	b.AssertFileContent("public/p3/index.html", "layouts/page.html")
+	b.AssertFileContent("public/foo/p4/index.html", "layouts/page.html")
+	b.AssertFileContent("public/bar/p5/index.html", "layouts/page.html")
+}
diff --git a/hugolib/params_test.go b/hugolib/params_test.go
index 94b832b3e..7f7566024 100644
--- a/hugolib/params_test.go
+++ b/hugolib/params_test.go
@@ -94,28 +94,6 @@ a/b pages: {{ range $ab.RegularPages }}{{ .Path }}|{{ .RelPermalink }}|{{ end }}
 	)
 }
 
-func TestFrontMatterTitleOverrideWarn(t *testing.T) {
-	t.Parallel()
-
-	files := `
--- hugo.toml --
-baseURL = "https://example.org/"
-disableKinds = ["taxonomy", "term"]
--- content/p1.md --
----
-title: "My title"
-params:
-  title: "My title from params"
----
-
-
-`
-
-	b := Test(t, files, TestOptWarn())
-
-	b.AssertLogContains("ARN  Hugo front matter key \"title\" is overridden in params section", "You can suppress this warning")
-}
-
 func TestFrontMatterParamsLangNoCascade(t *testing.T) {
 	t.Parallel()
 
diff --git a/resources/page/page_matcher_test.go b/resources/page/page_matcher_test.go
index ad35da43c..7f441d3ab 100644
--- a/resources/page/page_matcher_test.go
+++ b/resources/page/page_matcher_test.go
@@ -99,6 +99,7 @@ func TestPageMatcher(t *testing.T) {
 			Params: maps.Params{
 				"foo": "bar",
 			},
+			Fields: maps.Params{},
 			Target: PageMatcher{Path: "", Kind: "page", Lang: "", Environment: ""},
 		})
 	})
@@ -136,9 +137,10 @@ func TestDecodeCascadeConfig(t *testing.T) {
 	c.Assert(got.SourceStructure, qt.DeepEquals, []PageMatcherParamsConfig{
 		{
 			Params: maps.Params{"a": string("av")},
+			Fields: maps.Params{},
 			Target: PageMatcher{Kind: "page", Environment: "production"},
 		},
-		{Params: maps.Params{"b": string("bv")}, Target: PageMatcher{Kind: "page"}},
+		{Params: maps.Params{"b": string("bv")}, Fields: maps.Params{}, Target: PageMatcher{Kind: "page"}},
 	})
 
 	got, err = DecodeCascadeConfig(loggers.NewDefault(), true, nil)
diff --git a/tpl/tplimpl/templatestore.go b/tpl/tplimpl/templatestore.go
index bbb7f27cc..23c821cac 100644
--- a/tpl/tplimpl/templatestore.go
+++ b/tpl/tplimpl/templatestore.go
@@ -1018,7 +1018,7 @@ func (s *TemplateStore) allRawTemplates() iter.Seq[tpl.Template] {
 }
 
 func (s *TemplateStore) insertEmbedded() error {
-	return fs.WalkDir(embeddedTemplatesFs, ".", func(path string, d fs.DirEntry, err error) error {
+	return fs.WalkDir(embeddedTemplatesFs, ".", func(tpath string, d fs.DirEntry, err error) error {
 		if err != nil {
 			return err
 		}
@@ -1026,7 +1026,7 @@ func (s *TemplateStore) insertEmbedded() error {
 			return nil
 		}
 
-		templb, err := embeddedTemplatesFs.ReadFile(path)
+		templb, err := embeddedTemplatesFs.ReadFile(tpath)
 		if err != nil {
 			return err
 		}
@@ -1034,7 +1034,7 @@ func (s *TemplateStore) insertEmbedded() error {
 		// Get the newlines on Windows in line with how we had it back when we used Go Generate
 		// to write the templates to Go files.
 		templ := string(bytes.ReplaceAll(templb, []byte("\r\n"), []byte("\n")))
-		name := strings.TrimPrefix(filepath.ToSlash(path), "embedded/templates/")
+		name := strings.TrimPrefix(filepath.ToSlash(tpath), "embedded/templates/")
 
 		insertOne := func(name, content string) error {
 			pi := s.opts.PathParser.Parse(files.ComponentFolderLayouts, name)
@@ -1064,6 +1064,19 @@ func (s *TemplateStore) insertEmbedded() error {
 			return nil
 		}
 
+		// Copy the embedded HTML table render hook to each output format.
+		// See https://github.com/gohugoio/hugo/issues/13351.
+		if name == path.Join(containerMarkup, "render-table.html") {
+			for _, of := range s.opts.OutputFormats {
+				path := paths.TrimExt(name) + "." + of.Name + of.MediaType.FirstSuffix.FullSuffix
+				if err := insertOne(path, templ); err != nil {
+					return err
+				}
+			}
+
+			return nil
+		}
+
 		if err := insertOne(name, templ); err != nil {
 			return err
 		}
diff --git a/tpl/tplimpl/templatestore_integration_test.go b/tpl/tplimpl/templatestore_integration_test.go
index 0b3ce7a56..9da959350 100644
--- a/tpl/tplimpl/templatestore_integration_test.go
+++ b/tpl/tplimpl/templatestore_integration_test.go
@@ -1508,3 +1508,43 @@ mytexts|safeHTML: {{ partial "mytext.txt" . | safeHTML }}
 		"mytexts|safeHTML: <div>mytext</div>",
 	)
 }
+
+func TestIssue13351(t *testing.T) {
+	t.Parallel()
+
+	files := `
+-- hugo.toml --
+disableKinds = ['page','rss','section','sitemap','taxonomy','term']
+[outputs]
+home = ['html','json']
+[outputFormats.html]
+weight = 1
+[outputFormats.json]
+weight = 2
+-- content/_index.md --
+---
+title: home
+---
+a|b
+:--|:--
+1|2
+-- layouts/index.html --
+{{ .Content }}
+-- layouts/index.json --
+{{ .Content }}
+`
+
+	b := hugolib.Test(t, files)
+	b.AssertFileContent("public/index.html", "<table>")
+	b.AssertFileContent("public/index.json", "<table>")
+
+	f := strings.ReplaceAll(files, "weight = 1", "weight = 0")
+	b = hugolib.Test(t, f)
+	b.AssertFileContent("public/index.html", "<table>")
+	b.AssertFileContent("public/index.json", "<table>")
+
+	f = strings.ReplaceAll(files, "weight = 1", "")
+	b = hugolib.Test(t, f)
+	b.AssertFileContent("public/index.html", "<table>")
+	b.AssertFileContent("public/index.json", "<table>")
+}