]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
testing: Port integration tests to new templates structure
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 27 Nov 2025 09:42:29 +0000 (10:42 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 27 Nov 2025 11:00:15 +0000 (12:00 +0100)
As introduced in  v0.146.0. Keep some legecy test to preserve backwards compatibility.

110 files changed:
cache/filecache/filecache_integration_test.go
common/htime/htime_integration_test.go
common/hugo/hugo_integration_test.go
common/paths/paths_integration_test.go
config/allconfig/allconfig_integration_test.go
hugolib/404_test.go
hugolib/alias_test.go
hugolib/cascade_test.go
hugolib/config_test.go
hugolib/configdir_test.go
hugolib/content_map_test.go
hugolib/content_render_hooks_test.go
hugolib/datafiles_test.go
hugolib/dates_test.go
hugolib/disableKinds_test.go
hugolib/embedded_templates_test.go
hugolib/filesystems/basefs_test.go
hugolib/frontmatter_test.go
hugolib/hugo_modules_test.go
hugolib/hugo_sites_build_errors_test.go
hugolib/hugo_sites_build_test.go
hugolib/hugo_sites_multihost_test.go
hugolib/hugo_sites_test.go
hugolib/hugo_smoke_test.go
hugolib/hugolib_integration_test.go
hugolib/language_content_dir_test.go
hugolib/language_test.go
hugolib/menu_test.go
hugolib/minify_publisher_test.go
hugolib/mount_filters_test.go
hugolib/page__fragments_test.go
hugolib/page__meta_test.go
hugolib/page_permalink_test.go
hugolib/page_test.go
hugolib/pagebundler_test.go
hugolib/pagecollections_test.go
hugolib/pages_language_merge_test.go
hugolib/pagesfromdata/pagesfromgotmpl_integration_test.go
hugolib/paginator_test.go
hugolib/params_test.go
hugolib/rebuild_test.go
hugolib/rendershortcodes_test.go
hugolib/renderstring_test.go
hugolib/resource_chain_test.go
hugolib/rss_test.go
hugolib/securitypolicies_test.go
hugolib/segments/segments_integration_test.go
hugolib/siteJSONEncode_test.go
hugolib/site_sections_test.go
hugolib/site_stats_test.go
hugolib/site_test.go
hugolib/site_url_test.go
hugolib/sitemap_test.go
hugolib/taxonomy_test.go
hugolib/template_test.go
internal/js/esbuild/batch_integration_test.go
langs/i18n/i18n_integration_test.go
main_test.go
markup/goldmark/blockquotes/blockquotes_integration_test.go
markup/goldmark/codeblocks/codeblocks_integration_test.go
markup/goldmark/goldmark_integration_test.go
markup/goldmark/images/images_integration_test.go
markup/goldmark/internal/extensions/attributes/attributes_integration_test.go
markup/goldmark/passthrough/passthrough_integration_test.go
markup/goldmark/tables/tables_integration_test.go
markup/goldmark/toc_integration_test.go
markup/highlight/highlight_integration_test.go
markup/tableofcontents/tableofcontents_integration_test.go
related/related_integration_test.go
resources/images/images_golden_integration_test.go
resources/images/images_integration_test.go
resources/page/page_integration_test.go
resources/page/page_markup_integration_test.go
resources/page/pagemeta/pagemeta_integration_test.go
resources/page/pages_prev_next_integration_test.go
resources/page/path_integration_test.go
resources/page/permalinks_integration_test.go
resources/page/site_integration_test.go
resources/page/taxonomy_integration_test.go
resources/resource/resources_integration_test.go
resources/resource_factories/create/create_integration_test.go
resources/resource_transformers/babel/babel_integration_test.go
resources/resource_transformers/cssjs/postcss_integration_test.go
resources/resource_transformers/cssjs/tailwindcss_integration_test.go
resources/resource_transformers/js/js_integration_test.go
resources/resource_transformers/minifier/minifier_integration_test.go
resources/resource_transformers/templates/templates_integration_test.go
resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go
resources/resource_transformers/tocss/scss/scss_integration_test.go
resources/resources_integration_test.go
resources/transform_integration_test.go
tpl/collections/collections_integration_test.go
tpl/debug/debug_integration_test.go
tpl/fmt/fmt_integration_test.go
tpl/images/images_integration_test.go
tpl/os/os_integration_test.go
tpl/page/page_integration_test.go
tpl/partials/partials_integration_test.go
tpl/resources/resources_integration_test.go
tpl/templates/defer_integration_test.go
tpl/templates/init.go
tpl/templates/templates_integration_test.go
tpl/tplimpl/legacy_integration_test.go [deleted file]
tpl/tplimpl/render_hook_integration_test.go
tpl/tplimpl/shortcodes_integration_test.go
tpl/tplimpl/template_funcs_test.go
tpl/tplimpl/templatestore_integration_test.go
tpl/tplimpl/templatestore_legacy1_integration_test.go [new file with mode: 0644]
tpl/tplimpl/tplimpl_integration_test.go
tpl/transform/transform_integration_test.go

index 1e920c29f28722cb55f6c3b251acf57730da4402..d17c4367bcd92fcdf6a503fcb8d090f41a9c9962 100644 (file)
@@ -67,7 +67,7 @@ title: "Home"
 ---
 -- assets/a/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{ warnf "HOME!" }}
 {{ $img := resources.GetMatch "**.png" }}
 {{ $img = $img.Resize "3x3" }}
index 8090add12c31a97a5f13d0142bfdaa4a46d25ed4..596e9f130457ab154fa1a35d2d0e3f6de4324498 100644 (file)
@@ -26,7 +26,7 @@ func TestApplyWithContext(t *testing.T) {
        files := `
 -- config.toml --
 defaultContentLanguage = 'it'
--- layouts/index.html --
+-- layouts/home.html --
 {{ $dates := slice
   "2022-01-03"
   "2022-02-01"
index 77dbb5c9119eadbccb7d3272f6914023620ea416..93860019960d638a39883d9345f8dcb860ce40ba 100644 (file)
@@ -35,7 +35,7 @@ baseURL = 'https://en.example.org/'
 ---
 title: home
 ---
--- layouts/index.html --
+-- layouts/home.html --
 multilingual={{ hugo.IsMultilingual }}
 multihost={{ hugo.IsMultihost }}
   `
index f5ea3066ac99c908300211b1742b113a90122fc8..3f3f786f9f5b0bc95a7c0fc1e50e8d1b1d827a04 100644 (file)
@@ -35,9 +35,9 @@ weight = 2
 removePathAccents = true
 -- content/διακριτικός.md --
 -- content/διακριτικός.fr.md --
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Language.Lang }}|Single.
--- layouts/_default/list.html --
+-- layouts/list.html --
 List
 `
        b := hugolib.Test(t, files)
@@ -64,9 +64,9 @@ disablePathToLower = true
 -- content/MySection/MyPage.fr.md --
 -- content/MySection/MyBundle/index.md --
 -- content/MySection/MyBundle/index.fr.md --
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Language.Lang }}|Single.
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Language.Lang }}|List.
 `
        b := hugolib.Test(t, files)
index 54a2cc091fb8b70c1dd0cda1e14577d0796edfb6..6899cf21cc9e54c27baa51272d061ecc69ca8128 100644 (file)
@@ -39,7 +39,7 @@ title: "p1"
 ---
 title: "p1"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Title: {{ .Title }}
        `
 
@@ -141,7 +141,7 @@ disableKinds = ["taxonomy", "term"]
 [pagination]
 disableAliases = true
 pagerSize = 2
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ $paginator := .Paginate  site.RegularPages }}
 {{ template "_internal/pagination.html" . }}
 {{ range $paginator.Pages }}
@@ -191,7 +191,7 @@ func TestInvalidOutputFormat(t *testing.T) {
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 [outputs]
 home = ['html','foo']
--- layouts/index.html --
+-- layouts/home.html --
 x
 `
 
index 36738e4281c2d9d1b853cd8621c70cccc4016977..90e804c2d5bea59d0106ab04b77dee7982afd515 100644 (file)
@@ -72,7 +72,7 @@ baseURL = "http://example.com/"
 disableLiveReload = true
 [internal]
 fastRenderMode = true
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Base: {{ block "main" . }}{{ end }}
 -- layouts/404.html --
 {{ define "main" }}
index 32a95d60895b31a77208ac62a9ce5bc037d579ef..b7944b597f817d89086d271e6e22cea91681368d 100644 (file)
@@ -72,11 +72,11 @@ func TestAliasMultipleOutputFormats(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/single.amp.html --
+-- layouts/single.amp.html --
 {{ .Content }}
--- layouts/_default/single.json --
+-- layouts/single.json --
 {{ .Content }}
 -- content/blog/page.md --
 ---
index d9d915a42e9de54ecc0a1251045e532cf148d86d..fa8e5e4345e4c4ae3135dd902dab02c40a205439 100644 (file)
@@ -83,9 +83,9 @@ title: P1
 title: P2
 tags: [t1, t2]
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ len .Pages }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: Tags: {{ site.Taxonomies.tags }}|
 `
 
@@ -105,9 +105,9 @@ func TestCascadeEditIssue12449(t *testing.T) {
 baseURL = "https://example.com"
 disableKinds = ['sitemap','rss', 'home', 'taxonomy','term']
 disableLiveReload = true
--- layouts/_default/list.html --
+-- layouts/list.html --
 Title: {{ .Title }}|{{ .Content }}|cascadeparam: {{ .Params.cascadeparam }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Title: {{ .Title }}|{{ .Content }}|cascadeparam: {{ .Params.cascadeparam }}|
 -- content/mysect/_index.md --
 ---
@@ -160,9 +160,9 @@ path = '/s1**'
 ---
 title: p1
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|
   `
        b := Test(t, files)
@@ -195,9 +195,9 @@ cascade:
 ---
 title: p1
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Background: {{ .Params.background }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|
   `
 
@@ -214,9 +214,9 @@ func TestCascadeOverlap(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['home','rss','sitemap','taxonomy','term']
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 -- content/s/_index.md --
 ---
index 70b49f806710f4de4fc03c3608977b9382ad1bd1..3f1e7e6e90d64f089e24388840eb9fa26f3bf46d 100644 (file)
@@ -163,7 +163,7 @@ p2 = "p2base"
 [params.pm2]
 pm21 = "pm21base"
 pm22 = "pm22base"
--- layouts/index.html --
+-- layouts/home.html --
 p1: {{ .Site.Params.p1 }}
 p2: {{ .Site.Params.p2 }}
 pm21: {{ .Site.Params.pm2.pm21 }}
@@ -212,7 +212,7 @@ p2 = "p2en"
 sub1 = "sub1en"
 [languages.sv]
 title = "Svensk Title Theme"
--- layouts/index.html --
+-- layouts/home.html --
 title: {{ .Title }}|
 p1: {{ .Site.Params.p1 }}|
 p2: {{ .Site.Params.p2 }}|
@@ -244,7 +244,7 @@ weight = 2
 [languages.no]
 weight = 3
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 `
 
@@ -522,7 +522,7 @@ t3 = "tv3d"
 -- themes/test-theme/config/production/config.toml --
 [params]
 t3 = "tv3p"
--- layouts/index.html --
+-- layouts/home.html --
 m1: {{ .Site.Params.m1 }}
 m2: {{ .Site.Params.m2 }}
 t1: {{ .Site.Params.t1 }}
@@ -551,7 +551,7 @@ func TestPrivacyConfig(t *testing.T) {
 someOtherValue = "foo"
 [privacy.youtube]
 privacyEnhanced = true
--- layouts/index.html --
+-- layouts/home.html --
 Privacy Enhanced: {{ .Site.Config.Privacy.YouTube.PrivacyEnhanced }}
 `
        b := Test(t, files)
@@ -645,7 +645,7 @@ func TestInvalidDefaultMarkdownHandler(t *testing.T) {
 defaultMarkdownHandler = 'blackfriday'
 -- content/_index.md --
 ## Foo
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 
 `
@@ -677,7 +677,7 @@ themeconfigdirparam = "themeconfigdirvalue"
 -- themes/mytheme/hugo.toml --
 [params]
 themeparam = "themevalue"
--- layouts/index.html --
+-- layouts/home.html --
 rootparam: {{ site.Params.rootparam }}
 rootconfigparam: {{ site.Params.rootconfigparam }}
 themeparam: {{ site.Params.themeparam }}
@@ -725,9 +725,9 @@ weigHt = WEIGHT_EN
 title = "Swedish"
 wEight =  WEIGHT_SV
 disableKinds = ["page"]
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ .Lang}}|{{ len site.RegularPages }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 -- content/p1.en.md --
 -- content/p2.en.md --
@@ -792,7 +792,7 @@ mediaType = 'text/html'
 [outputFormats.myformat]
 baseName = 'myindex'
 mediaType = 'text/html'
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 
@@ -827,7 +827,7 @@ myparam = "enParamValue"
 title = "Svensk Title"
 [languages.sv.params]
 myparam = "svParamValue"
--- layouts/index.html --
+-- layouts/home.html --
 MyParam: {{ site.Params.myparam }}
 ThisIsAParam: {{ site.Params.thisIsAParam }}
 
@@ -873,7 +873,7 @@ title: "My English Section"
 ---
 title: "My Swedish Section"
 ---
--- layouts/index.html --
+-- layouts/home.html --
 LanguageCode: {{ eq site.LanguageCode site.Language.LanguageCode }}|{{ site.Language.LanguageCode }}|
 {{ range $i, $e := (slice site .Site) }}
 {{ $i }}|AllPages: {{ len .AllPages }}|Sections: {{ if .Sections }}true{{ end }}|BuildDrafts: {{ .BuildDrafts }}|Param: {{ .Language.Params.myparam }}|Language string: {{ .Language }}|Languages: {{ .Languages }}
@@ -914,7 +914,7 @@ params:
   mainSections:
 -- content/mysection/_index.md --
 -- content/mysection/mycontent.md --
--- layouts/index.html --
+-- layouts/home.html --
 mainSections: {{ site.Params.mainSections }}
 
 `
@@ -930,7 +930,7 @@ func TestConfigHugoWorkingDir(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 WorkingDir: {{ hugo.WorkingDir }}|
 
 `
@@ -971,7 +971,7 @@ p1 = "p1de"
 [languages.de.markup.goldmark.extensions.typographer]
 leftDoubleQuote = '&laquo;'   # default &ldquo;
 rightDoubleQuote = '&raquo;'  # default &rdquo;
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 p1: {{ site.Params.p1 }}|
 -- content/_index.en.md --
@@ -1002,7 +1002,7 @@ func TestConfigLegacyValues(t *testing.T) {
 # taxonomyTerm was renamed to taxonomy in Hugo 0.60.0.
 disableKinds = ["taxonomyTerm"]
 
--- layouts/index.html --
+-- layouts/home.html --
 Home
 
 `
@@ -1042,9 +1042,9 @@ notAlternative = true
 ---
 outputs: ["html", "htaccess"]
 ---
--- layouts/index.html --
+-- layouts/home.html --
 HTML.
--- layouts/_default/list.htaccess --
+-- layouts/list.htaccess --
 HTACCESS.
 
 
@@ -1061,7 +1061,7 @@ func TestConfigLanguageCodeTopLevel(t *testing.T) {
        files := `
 -- hugo.toml --
 languageCode = "en-US"
--- layouts/index.html --
+-- layouts/home.html --
 LanguageCode: {{ .Site.LanguageCode }}|{{ site.Language.LanguageCode }}|
 
 
@@ -1087,7 +1087,7 @@ path = "foo"
 [languages.sv.mediatypes."text/html"]
 suffixes = ["bar"]
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 
@@ -1115,7 +1115,7 @@ func TestConfigMiscPanics(t *testing.T) {
                files := `
 -- hugo.yaml --
 params:
--- layouts/index.html --
+-- layouts/home.html --
 Foo: {{ site.Params.foo }}|
 
 
@@ -1139,7 +1139,7 @@ defaultContentLanguage = "en"
        lang = "en"
        languageName = "English"
        weight = 1
--- layouts/index.html --
+-- layouts/home.html --
 Foo: {{ site.Params.foo }}|
 
 
@@ -1191,7 +1191,7 @@ func TestConfigModuleDefaultMountsInConfig(t *testing.T) {
 -- hugo.toml --
 baseURL = "https://example.org"
 contentDir = "mycontent"
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 
@@ -1216,7 +1216,7 @@ defaultContentLanguageInSubdir = true
 disableKinds = ["taxonomy", "term", "page", "section"]
 -- content/foo/bar.txt --
 Foo.
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 `
                b := Test(t, files)
@@ -1244,7 +1244,7 @@ title = "English Title"
 title = "Swedish Title"
 -- content/foo/bar.txt --
 Foo.
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 `
                b := Test(t, files)
@@ -1272,7 +1272,7 @@ title = "English Title"
 title = "Swedish Title"
 -- content/foo/bar.txt --
 Foo.
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 `
                b := Test(t, files)
@@ -1295,7 +1295,7 @@ title = "English Title"
 [languages.sv]
 title = "Swedish Title"
 disabled = true
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 
@@ -1317,7 +1317,7 @@ disableDefaultLanguageRedirect = true
 title = "English Title"
 [languages.sv]
 title = "Swedish Title"
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 
@@ -1450,9 +1450,9 @@ category = 'categories'
 title: "P1"
 categories: ["c1"]
 ---
--- layouts/index.html --
+-- layouts/home.html --
 Home.
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
 
 
@@ -1473,7 +1473,7 @@ func TestKindsUnknown(t *testing.T) {
 disableKinds = ['foo', 'home']
 [outputs]
 foo = ['HTML', 'AMP', 'RSS']
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
 
 
@@ -1499,7 +1499,7 @@ func TestDeprecateTaxonomyTerm(t *testing.T) {
 disableKinds = ['taxonomyTerm']
 [outputs]
 taxonomyterm = ['HTML', 'AMP', 'RSS']
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
 
 
@@ -1530,7 +1530,7 @@ title = "English"
 [languages.pt]
 weight = 2
 title = "Portuguese"
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 -- content/custom/index.br.md --
 ---
index 39505563d8222ca642d7af376cbb562fddfc43b6..e47b75cee81bf1696e83a5163def0a29ea2bc75d 100644 (file)
@@ -35,7 +35,7 @@ ignoreErrors = ["error-missing-instagram-accesstoken"]
 a = "a1"
 b = "b1"
 c = "c1"
--- layouts/index.html --
+-- layouts/home.html --
 Params: {{ site.Params}}
 `
        b := Test(t, files)
index 2be88a78e58eeb32ccfa8504a5e31552d4113187..92196b67fbc516984204365b1d97946141a828bd 100644 (file)
@@ -54,7 +54,7 @@ draft: true
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/index.html --
+-- layouts/home.html --
 Num Regular: {{ len .Site.RegularPages }}|{{ range .Site.RegularPages }}{{ .RelPermalink }}|{{ end }}$
 Main Sections: {{ .Site.Params.mainSections }}
 Pag Num Pages: {{ len .Paginator.Pages }}
@@ -205,7 +205,7 @@ func TestIntegrationTestTemplate(t *testing.T) {
 -- config.toml --
 title = "Integration Test"
 disableKinds=["page", "section", "taxonomy", "term", "sitemap", "robotsTXT", "RSS"]
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ .Title }}|
 
        `
@@ -235,7 +235,7 @@ weight = 1
 weight = 2
 [languages.de]
 weight = 3
--- layouts/index.html --
+-- layouts/home.html --
 {{ $bundle := site.GetPage "bundle" }}
 {{ $r := $bundle.Resources.GetMatch "*.txt" }}
 {{ .Language.Lang }}: {{ with $r }}{{ .RelPermalink }}|{{ .Content }}{{ end}}
@@ -276,7 +276,7 @@ disableKinds = ["taxonomy", "term"]
 -- content/bundle/index.md --
 -- content/bundle/data with Spaces.txt --
 Data.
--- layouts/index.html --
+-- layouts/home.html --
 {{ $bundle := site.GetPage "bundle" }}
 {{ $r := $bundle.Resources.Get "data with Spaces.txt" }}
 R: {{ with $r }}{{ .Content }}{{ end }}|
@@ -300,7 +300,7 @@ data 1.txt
 Data 1.txt
 -- content/bundle/Data-1.txt --
 Data-1.txt
--- layouts/index.html --
+-- layouts/home.html --
 {{ $bundle := site.GetPage "bundle" }}
 {{ $r := $bundle.Resources.Get "data-1.txt" }}
 R: {{ with $r }}{{ .Content }}{{ end }}|Len: {{ len $bundle.Resources }}|$
@@ -329,9 +329,9 @@ foo.txt
 p1.txt
 -- content/s1/p1-foo.txt --
 p1-foo.txt
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{.Title }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{.Title }}|
        `
 
@@ -361,7 +361,7 @@ title: s1
 ---
 -- content/s1x/a.txt --
 a.txt
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ range .Resources.Match "**" }}
   {{ .Name }}|
@@ -386,7 +386,7 @@ defaultContentLanguageInSubdir = true
 [languages.en]
 [sitemap]
 filename = 'foo.xml'
--- layouts/index.html --
+-- layouts/home.html --
 irrelevant
 `
 
@@ -497,7 +497,7 @@ title: p1
 <p>b</p>
 -- content/p1/c.html --
 <p>c</p>
--- layouts/_default/single.html --
+-- layouts/single.html --
 Path: {{ .Path }}|{{.Kind }}
 |{{ (.Resources.Get "a.html").RelPermalink -}}
 |{{ (.Resources.Get "b.html").RelPermalink -}}
index 063d695da704df363453cf6aaeda336d615b228e..f6015ad22da1e02b34b742ff9d22a350a1e69204 100644 (file)
@@ -26,7 +26,7 @@ func TestRenderHooksRSS(t *testing.T) {
 -- hugo.toml --
 baseURL = "https://example.org"
 disableKinds = ["taxonomy", "term"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p := site.GetPage "p1.md" }}
 {{ $p2 := site.GetPage "p2.md" }}
 P1: {{ $p.Content }}
@@ -36,13 +36,13 @@ P2: {{ $p2.Content }}
 {{ $p3 := site.GetPage "p3.md" }}
 P2: {{ $p2.Content }}
 P3: {{ $p3.Content }}
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 html-link: {{ .Destination | safeURL }}|
--- layouts/_default/_markup/render-link.rss.xml --
+-- layouts/_markup/render-link.rss.xml --
 xml-link: {{ .Destination | safeURL }}|
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 html-heading: {{ .Text }}|
--- layouts/_default/_markup/render-heading.rss.xml --
+-- layouts/_markup/render-heading.rss.xml --
 xml-heading: {{ .Text }}|
 -- content/p1.md --
 ---
@@ -87,7 +87,7 @@ func TestRenderHooksRSSOnly(t *testing.T) {
 -- hugo.toml --
 baseURL = "https://example.org"
 disableKinds = ["taxonomy", "term"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p := site.GetPage "p1.md" }}
 {{ $p2 := site.GetPage "p2.md" }}
 P1: {{ $p.Content }}
@@ -97,9 +97,9 @@ P2: {{ $p2.Content }}
 {{ $p3 := site.GetPage "p3.md" }}
 P2: {{ $p2.Content }}
 P3: {{ $p3.Content }}
--- layouts/_default/_markup/render-link.rss.xml --
+-- layouts/_markup/render-link.rss.xml --
 xml-link: {{ .Destination | safeURL }}|
--- layouts/_default/_markup/render-heading.rss.xml --
+-- layouts/_markup/render-heading.rss.xml --
 xml-heading: {{ .Text }}|
 -- content/p1.md --
 ---
@@ -150,12 +150,12 @@ baseURL="https://example.org"
   [markup.goldmark]
     [markup.goldmark.renderer]
       unsafe = true
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p := site.GetPage "p1.md" }}
 P1: {{ $p.Content }}
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 html-link: {{ .Destination | safeURL }}|Text: {{ .Text }}|Plain: {{ .PlainText | safeHTML }}
--- layouts/_default/_markup/render-image.html --
+-- layouts/_markup/render-image.html --
 html-image: {{ .Destination | safeURL }}|Text: {{ .Text }}|Plain: {{ .PlainText | safeHTML }}
 -- content/p1.md --
 ---
@@ -203,7 +203,7 @@ title: "p2"
 ## E
 ## F
 
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 Heading: {{ .Text }}|
 {{ with .Page }}
 Self Fragments: {{ .Fragments.Identifiers }}|
@@ -211,7 +211,7 @@ Self Fragments: {{ .Fragments.Identifiers }}|
 {{ with (site.GetPage "p1.md") }}
 P1 Fragments: {{ .Fragments.Identifiers }}|
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content}}
 `
 
@@ -276,7 +276,7 @@ title: "p2 en"
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
 -- content/p2/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .Content }}|$
 
 `
@@ -322,7 +322,7 @@ Link: [text-"<>&](/destination-"<> 'title-"<>&')
 Image: ![alt-"<>&](/destination-"<> 'title-"<>&')
 {class="><script>alert()</script>" id="baz"}
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 `
 
@@ -362,9 +362,9 @@ title: "p1"
 First line.
 Second line.
 ----------------
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 Plain text: {{ .PlainText }}|Text: {{ .Text }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content}}|
 }
 `
@@ -379,13 +379,13 @@ Content: {{ .Content}}|
 func TestContentOutputReuseRenderHooksAndShortcodesHTMLOnly(t *testing.T) {
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 HTML: {{ .Title }}|{{ .Content }}|
 -- layouts/index.xml --
 XML: {{ .Title }}|{{ .Content }}|
 -- layouts/_markup/render-heading.html --
 Render heading.
--- layouts/shortcodes/myshortcode.html --
+-- layouts/_shortcodes/myshortcode.html --
 My shortcode.
 -- content/_index.md --
 ---
@@ -407,7 +407,7 @@ func TestContentOutputNoReuseRenderHooksInBothHTMLAnXML(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ["taxonomy", "term"]
--- layouts/index.html --
+-- layouts/home.html --
 HTML: {{ .Title }}|{{ .Content }}|
 -- layouts/index.xml --
 XML: {{ .Title }}|{{ .Content }}|
@@ -435,16 +435,16 @@ func TestContentOutputNoReuseShortcodesInBothHTMLAnXML(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ["taxonomy", "term"]
--- layouts/index.html --
+-- layouts/home.html --
 HTML: {{ .Title }}|{{ .Content }}|
 -- layouts/index.xml --
 XML: {{ .Title }}|{{ .Content }}|
 -- layouts/_markup/render-heading.html --
 Render heading.
 
--- layouts/shortcodes/myshortcode.html --
+-- layouts/_shortcodes/myshortcode.html --
 My shortcode HTML.
--- layouts/shortcodes/myshortcode.xml --
+-- layouts/_shortcodes/myshortcode.xml --
 My shortcode XML.
 -- content/_index.md --
 ---
index 657e6020cf1d479a5f44609a5b135d560de37f60..4b1b6739f90798e8c2b0902f214a45adbe6ae56d 100644 (file)
@@ -36,7 +36,7 @@ v1: c_d_v1
 v1 = "a_v1_theme"
 -- themes/mytheme/data/d.toml --
 v1 = "d_v1_theme"
--- layouts/index.html --
+-- layouts/home.html --
 a: {{  site.Data.a.v1 }}|
 b: {{  site.Data.b.v1 }}|
 cd: {{ site.Data.c.d.v1 }}|
@@ -56,7 +56,7 @@ func TestDataMixedCaseFolders(t *testing.T) {
 baseURL = "https://example.com"
 -- data/MyFolder/MyData.toml --
 v1 = "my_v1"
--- layouts/index.html --
+-- layouts/home.html --
 {{ site.Data }}
 v1: {{  site.Data.MyFolder.MyData.v1 }}|
 `
@@ -74,7 +74,7 @@ func TestDataNoAssets(t *testing.T) {
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 -- assets/data/foo.toml --
 content = "I am assets/data/foo.toml"
--- layouts/index.html --
+-- layouts/home.html --
 |{{ site.Data.foo.content }}|
        `
 
index c99545e8aac1f4c5e02586e706900b8d79986636..64c9e3dfba71e977dd62d8c72432a32c8e76b593 100644 (file)
@@ -44,7 +44,7 @@ date: 2021-07-18
 title: Page
 date: 2021-07-18
 ---
--- layouts/index.html --
+-- layouts/home.html --
 Date: {{ .Date | time.Format ":date_long" }}
 `
 
@@ -111,7 +111,7 @@ weight=10
 [languages.nn]
 timeZone="America/Antigua"
 weight=20
--- layouts/_default/single.html --
+-- layouts/single.html --
 Date: {{ .Date | safeHTML  }}
 Lastmod: {{ .Lastmod | safeHTML  }}
 PublishDate: {{ .PublishDate | safeHTML  }}
@@ -192,7 +192,7 @@ func TestTimeOnError(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 time: {{ time "2020-10-20" "invalid-timezone" }}
 -- content/p1.md --
 `
@@ -228,7 +228,7 @@ talks = [
        { date = 2050-02-12, name = "Future talk 1" },
        { date = 2050-02-13, name = "Future talk 2" },
 ]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $futureTalks := where site.Data.mydata.talks "date" ">" now }}
 {{ $pastTalks := where site.Data.mydata.talks "date" "<" now }}
 
@@ -266,11 +266,11 @@ func TestPublisDateRollupIssue12438(t *testing.T) {
 disableKinds = ['home','rss','sitemap']
 [taxonomies]
 tag = 'tags'
--- layouts/_default/list.html --
+-- layouts/list.html --
 Date: {{ .Date.Format "2006-01-02" }}
 PublishDate: {{ .PublishDate.Format "2006-01-02" }}
 Lastmod: {{ .Lastmod.Format "2006-01-02" }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 -- content/s1/p1.md --
 ---
index 1ee312347c237f551d5645255b8dd70514ce324d..25a8c94f6b6b9be603f19861e0f927b4aa49bf06 100644 (file)
@@ -28,7 +28,7 @@ baseURL = "http://example.com/blog"
 enableRobotsTXT = true
 ignoreErrors = ["error-disable-taxonomy"]
 disableKinds = ["%s"]
--- layouts/_default/single.html --
+-- layouts/single.html --
 single
 -- content/sect/page.md --
 ---
@@ -209,7 +209,7 @@ func TestDisableRSSWithRSSInCustomOutputs(t *testing.T) {
 disableKinds = ["term", "taxonomy", "RSS"]
 [outputs]
 home = [ "HTML", "RSS" ]
--- layouts/index.html --
+-- layouts/home.html --
 Home
 `
        b := Test(t, files)
@@ -224,7 +224,7 @@ func TestBundleNoPublishResources(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $bundle := site.GetPage "section/bundle-false" }}
 {{ $data1 := $bundle.Resources.GetMatch "data1*" }}
 Data1: {{ $data1.RelPermalink }}
@@ -256,7 +256,7 @@ func TestNoRenderAndNoPublishResources(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $page := site.GetPage "sect/no-render" }}
 {{ $sect := site.GetPage "sect-no-render" }}
 
@@ -321,7 +321,7 @@ title: "Page 1 en"
 ---
 title: "Page 2 nn"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 `
        b := Test(t, files)
index 80f77309912c61068f408e6007ae250b10b7c693..c93ccdf9fa36837dcc3dca025e37f71d6a45ee93 100644 (file)
@@ -41,7 +41,7 @@ lastmod: 2021-05-22T19:25:00+01:00
 ---
 title: My Site
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 
 {{ template "_internal/twitter_cards.html" . }}
 {{ template "_internal/opengraph.html" . }}
@@ -138,7 +138,7 @@ title: p09
 ---
 title: p10
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Paginate (where site.RegularPages "Section" "s1") }}` + variant + `
 `
                b := Test(t, files)
index 4a6e0bbaf41dcc21e3da0bdac1be5b5c8880f11a..6f02f2c7f4fb754675e6af8eea06f857f757515c 100644 (file)
@@ -480,7 +480,7 @@ target = "content/posts"
 [[module.mounts]]
 source = "docs"
 target = "content/mydocs"
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 `
@@ -554,7 +554,7 @@ JS.
 body { color: red; }
 -- assets/scss/app.scss --
 body { color: blue; }
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 SCSS: {{ with resources.Get "scss/app.scss" }}{{ .RelPermalink }}|{{ .Content }}{{ end }}|
 # Note that the pattern below will match 2 resources, which doesn't make much sense,
index c4cbfa72ea7f9c0ad375bb01e64a3fd6c3e8ac1f..8b8937f49d0dbe45ad79bc70a96db38e9f9434f0 100644 (file)
@@ -26,7 +26,7 @@ ints: [1, 2, 3]
 mixed: ["1", 2, 3]
 strings: ["1", "2","3"]
 ---    
--- layouts/_default/single.html --
+-- layouts/single.html --
 Ints: {{ printf "%T" .Params.ints }} {{ range .Params.ints }}Int: {{ fmt.Printf "%[1]v (%[1]T)" . }}|{{ end }}
 Mixed: {{ printf "%T" .Params.mixed }} {{ range .Params.mixed }}Mixed: {{ fmt.Printf "%[1]v (%[1]T)" . }}|{{ end }}
 Strings: {{ printf "%T" .Params.strings }} {{ range .Params.strings }}Strings: {{ fmt.Printf "%[1]v (%[1]T)" . }}|{{ end }}
index 03c70239d0526e97312b104b3665e7256e0072ad..84c41a216bf323791ffd3f8c21ae25ca55fe8c21 100644 (file)
@@ -82,7 +82,7 @@ languageName = "French"
 weight = 4
 title = "French Title"
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ range .Site.RegularPages }}
 |{{ .Title }}|{{ .RelPermalink }}|{{ .Plain }}
 {{ end }}
@@ -158,7 +158,7 @@ ignoreConfig=true
 -- themes/a/config.toml --
 [params]
 a = "Should Be Ignored!"
--- layouts/index.html --
+-- layouts/home.html --
 Params: {{ .Site.Params }}
 `
        Test(t, files).AssertFileContent("public/index.html", "! Ignored")
@@ -182,7 +182,7 @@ a = "A param"
 -- themes/b/config.toml --
 [params]
 b = "B param"
--- layouts/index.html --
+-- layouts/home.html --
 Params: {{ .Site.Params }}
 `
        Test(t, files).AssertFileContent("public/index.html", "A param", "! B param")
@@ -236,7 +236,7 @@ baseURL="https://example.org"
 [[module.mounts]]
 source="mycontent"
 target="content"
--- layouts/_default/single.html --
+-- layouts/single.html --
 Permalink: {{ .Permalink }}|
 -- mycontent/mypage.md --
 ---
@@ -260,7 +260,7 @@ source = "README.md"
 target = "content/_index.md"   
 -- README.md --
 # Hello World
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ .Title }}|{{ .Content }}|
 `
        b := Test(t, files)
@@ -303,7 +303,7 @@ target = "content/resources-a"
 [[module.mounts]]
 source = "extra-content"
 target = "content/resources-b"
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single
 -- content/p1.md --
 -- extra-content/_index.md --
@@ -332,7 +332,7 @@ source = "extra-data"
 target = "data/extra"
 -- extra-data/test.yaml --
 message: Hugo Rocks
--- layouts/index.html --
+-- layouts/home.html --
 {{ site.Data.extra.test.message }}
 `
 
index 709f1c34d5a09a23299cfe06461cff40cd4023ec..345790dc6a96a81255386df97dbbe787e2429724 100644 (file)
@@ -62,13 +62,13 @@ func TestSiteBuildErrors(t *testing.T) {
                return `
 -- hugo.toml --
 baseURL = "https://example.com"
--- layouts/shortcodes/sc.html --
+-- layouts/_shortcodes/sc.html --
 ` + f(shortcode, `SHORTCODE L1
 SHORTCODE L2
 SHORTCODE L3:
 SHORTCODE L4: {{ .Page.Title }}
 `) + `
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 ` + f(base, `BASEOF L1
 BASEOF L2
 BASEOF L3
@@ -76,7 +76,7 @@ BASEOF L4{{ if .Title }}{{ end }}
 {{block "main" .}}This is the main content.{{end}}
 BASEOF L6
 `) + `
--- layouts/_default/single.html --
+-- layouts/single.html --
 ` + f(single, `{{ define "main" }}
 SINGLE L2:
 SINGLE L3:
@@ -169,7 +169,7 @@ Some content.
                                fe := a.getFileError(err)
                                a.c.Assert(fe.Position().LineNumber, qt.Equals, 5)
                                a.c.Assert(fe.Position().ColumnNumber, qt.Equals, 14)
-                               a.assertErrorMessage("\"layouts/_default/single.html:5:14\": execute of template failed", fe.Error())
+                               a.assertErrorMessage("\"layouts/single.html:5:14\": execute of template failed", fe.Error())
                        },
                },
                {
@@ -182,7 +182,7 @@ Some content.
                                fe := a.getFileError(err)
                                a.c.Assert(fe.Position().LineNumber, qt.Equals, 5)
                                a.c.Assert(fe.Position().ColumnNumber, qt.Equals, 14)
-                               a.assertErrorMessage("\"layouts/_default/single.html:5:14\": execute of template failed", fe.Error())
+                               a.assertErrorMessage("\"layouts/single.html:5:14\": execute of template failed", fe.Error())
                        },
                },
                {
@@ -204,7 +204,7 @@ Some content.
                        assertErr: func(a testSiteBuildErrorAsserter, err error) {
                                fe := a.getFileError(err)
                                // Make sure that it contains both the content file and template
-                               a.assertErrorMessage(`"content/myyaml.md:7:10": failed to render shortcode "sc": failed to process shortcode: "layouts/shortcodes/sc.html:4:22": execute of template failed: template: shortcodes/sc.html:4:22: executing "shortcodes/sc.html" at <.Page.Titles>: can't evaluate field Titles in type page.Page`, fe.Error())
+                               a.assertErrorMessage(`"content/myyaml.md:7:10": failed to render shortcode "sc": failed to process shortcode: "layouts/_shortcodes/sc.html:4:22": execute of template failed: template: shortcodes/sc.html:4:22: executing "shortcodes/sc.html" at <.Page.Titles>: can't evaluate field Titles in type page.Page`, fe.Error())
                                a.c.Assert(fe.Position().LineNumber, qt.Equals, 7)
                        },
                },
@@ -309,7 +309,7 @@ func TestErrorMinify(t *testing.T) {
 [minify]
 minifyOutput = true
 
--- layouts/index.html --
+-- layouts/home.html --
 <body>
 <script>=;</script>
 </body>
@@ -338,16 +338,16 @@ func TestErrorNestedRender(t *testing.T) {
 ---
 title: "Home"
 ---
--- layouts/index.html --
+-- layouts/home.html --
 line 1
 line 2
 1{{ .Render "myview" }}
--- layouts/_default/myview.html --
+-- layouts/myview.html --
 line 1
 12{{ partial "foo.html" . }}
 line 4
 line 5
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 line 1
 line 2
 123{{ .ThisDoesNotExist }}
@@ -361,7 +361,7 @@ line 4
        b.Assert(errors, qt.HasLen, 4)
        b.Assert(errors[0].Position().LineNumber, qt.Equals, 3)
        b.Assert(errors[0].Position().ColumnNumber, qt.Equals, 4)
-       b.Assert(errors[0].Error(), qt.Contains, filepath.FromSlash(`"/layouts/index.html:3:4": execute of template failed`))
+       b.Assert(errors[0].Error(), qt.Contains, filepath.FromSlash(`"/layouts/home.html:3:4": execute of template failed`))
        b.Assert(errors[0].ErrorContext().Lines, qt.DeepEquals, []string{"line 1", "line 2", "1{{ .Render \"myview\" }}"})
        b.Assert(errors[2].Position().LineNumber, qt.Equals, 2)
        b.Assert(errors[2].Position().ColumnNumber, qt.Equals, 5)
@@ -385,17 +385,17 @@ title: "Home"
 ## Hello
 {{< hello >}}
 
--- layouts/index.html --
+-- layouts/home.html --
 line 1
 line 2
 {{ .Content }}
 line 5
--- layouts/shortcodes/hello.html --
+-- layouts/_shortcodes/hello.html --
 line 1
 12{{ partial "foo.html" . }}
 line 4
 line 5
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 line 1
 line 2
 123{{ .ThisDoesNotExist }}
@@ -412,7 +412,7 @@ line 4
        b.Assert(errors[1].Position().LineNumber, qt.Equals, 6)
        b.Assert(errors[1].Position().ColumnNumber, qt.Equals, 1)
        b.Assert(errors[1].ErrorContext().ChromaLexer, qt.Equals, "md")
-       b.Assert(errors[1].Error(), qt.Contains, filepath.FromSlash(`"/content/_index.md:6:1": failed to render shortcode "hello": failed to process shortcode: "/layouts/shortcodes/hello.html:2:5":`))
+       b.Assert(errors[1].Error(), qt.Contains, filepath.FromSlash(`"/content/_index.md:6:1": failed to render shortcode "hello": failed to process shortcode: "/layouts/_shortcodes/hello.html:2:5":`))
        b.Assert(errors[1].ErrorContext().Lines, qt.DeepEquals, []string{"", "## Hello", "{{< hello >}}", ""})
        b.Assert(errors[2].ErrorContext().Lines, qt.DeepEquals, []string{"line 1", "12{{ partial \"foo.html\" . }}", "line 4", "line 5"})
        b.Assert(errors[3].Position().LineNumber, qt.Equals, 3)
@@ -432,12 +432,12 @@ title: "Home"
 
 ## Hello
 
--- layouts/index.html --
+-- layouts/home.html --
 line 1
 line 2
 {{ .Content }}
 line 5
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 line 1
 12{{ .Levels }}
 line 4
@@ -450,7 +450,7 @@ line 5
        errors := herrors.UnwrapFileErrorsWithErrorContext(err)
 
        b.Assert(errors, qt.HasLen, 3)
-       b.Assert(errors[0].Error(), qt.Contains, filepath.FromSlash(`"/content/_index.md:2:5": "/layouts/_default/_markup/render-heading.html:2:5": execute of template failed`))
+       b.Assert(errors[0].Error(), qt.Contains, filepath.FromSlash(`"/content/_index.md:2:5": "/layouts/_markup/render-heading.html:2:5": execute of template failed`))
 }
 
 func TestErrorRenderHookCodeblock(t *testing.T) {
@@ -470,12 +470,12 @@ bar
 §§§
 
 
--- layouts/index.html --
+-- layouts/home.html --
 line 1
 line 2
 {{ .Content }}
 line 5
--- layouts/_default/_markup/render-codeblock-foo.html --
+-- layouts/_markup/render-codeblock-foo.html --
 line 1
 12{{ .Foo }}
 line 4
@@ -489,7 +489,7 @@ line 5
 
        b.Assert(errors, qt.HasLen, 3)
        first := errors[0]
-       b.Assert(first.Error(), qt.Contains, filepath.FromSlash(`"/content/_index.md:7:1": "/layouts/_default/_markup/render-codeblock-foo.html:2:5": execute of template failed`))
+       b.Assert(first.Error(), qt.Contains, filepath.FromSlash(`"/content/_index.md:7:1": "/layouts/_markup/render-codeblock-foo.html:2:5": execute of template failed`))
 }
 
 func TestErrorInBaseTemplate(t *testing.T) {
@@ -507,7 +507,7 @@ line 2 base
 {{ block "main" . }}empty{{ end }}
 line 4 base
 {{ block "toc" . }}empty{{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 line 2 index
 line 3 index
@@ -516,7 +516,7 @@ line 4 index
 {{ define "toc" }}
 TOC: {{ partial "toc.html" . }}
 {{ end }}
--- layouts/partials/toc.html --
+-- layouts/_partials/toc.html --
 toc line 1
 toc line 2
 toc line 3
@@ -534,13 +534,13 @@ toc line 4
                b.Assert(err.Error(), qt.Contains, `baseof.html:4:6`)
        })
 
-       t.Run("index template", func(t *testing.T) {
+       t.Run("home template", func(t *testing.T) {
                files := strings.Replace(filesTemplate, "line 3 index", "1234{{ .ThisDoesNotExist \"abc\" }}", 1)
 
                b, err := TestE(t, files)
 
                b.Assert(err, qt.IsNotNil)
-               b.Assert(err.Error(), qt.Contains, `index.html:3:7"`)
+               b.Assert(err.Error(), qt.Contains, `home.html:3:7"`)
        })
 
        t.Run("partial from define", func(t *testing.T) {
@@ -561,9 +561,9 @@ func TestSiteBuildTimeout(t *testing.T) {
        filesBuilder.WriteString(`
 -- hugo.toml --
 timeout = 5
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .WordCount }}
--- layouts/shortcodes/c.html --
+-- layouts/_shortcodes/c.html --
 {{ range .Page.Site.RegularPages }}
 {{ .WordCount }}
 {{ end }}
@@ -591,7 +591,7 @@ func TestErrorTemplateRuntime(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ .ThisDoesNotExist }}
  `
@@ -599,7 +599,7 @@ Home.
        b, err := TestE(t, files)
 
        b.Assert(err, qt.Not(qt.IsNil))
-       b.Assert(err.Error(), qt.Contains, filepath.FromSlash(`/layouts/index.html:2:3`))
+       b.Assert(err.Error(), qt.Contains, filepath.FromSlash(`/layouts/home.html:2:3`))
        b.Assert(err.Error(), qt.Contains, `can't evaluate field ThisDoesNotExist`)
 }
 
index b32d6b2d8dfb62e31b383e8466da574690942435..d4456aebb2a137bd20a329f557ff64a51ffb04cc 100644 (file)
@@ -33,7 +33,7 @@ title: doc1 en
 title: doc1 fr
 slug: doc1-fr
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Lang }}|{{ .RelPermalink }}|
 
 `
index 738aa4b34ba55d6cb547add5fe1b680f1b2897b4..e090e03cc81fb1c8e685681186fd1ead0c988bdd 100644 (file)
@@ -54,9 +54,9 @@ title: "My Bundle en"
 My Bundle
 -- content/mysect/mybundle/foo.txt --
 Foo
--- layouts/_default/list.html --
+-- layouts/list.html --
 List|{{ .Title }}|{{ .Lang }}|{{ .Permalink}}|{{ .RelPermalink }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single|{{ .Title }}|{{ .Lang }}|{{ .Permalink}}|{{ .RelPermalink }}|
 {{ $foo := .Resources.Get "foo.txt" | fingerprint }}
 Foo: {{ $foo.Permalink }}|
@@ -147,7 +147,7 @@ title: "Mybundle fr"
 .body {
        color: french;
 }
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ $data := .Resources.GetMatch "styles*" | minify }}
 {{ .Lang }}: {{ $data.Content}}|{{ $data.RelPermalink }}|
 
@@ -191,7 +191,7 @@ iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAA
 ---
 title: mybundle-en
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ with .Resources.Get "pixel.png" }}
   {{ with .Resize "2x2" }}
     {{ .RelPermalink }}|
@@ -240,7 +240,7 @@ File 1 fr.
 File 1 en.
 -- content/en/section/mybundle/file2.txt --
 File 2 en.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ $files := .Resources.Match "file*" }}
 Files: {{ range $files }}{{ .Permalink }}|{{ end }}$
 
@@ -274,7 +274,7 @@ baseURL = "https://example.fr"
 weight = 2
 --  assets/css/main.css --
 body { color: red; }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $css := resources.Get "css/main.css" | minify }}
 CSS: {{ $css.Permalink }}|{{ $css.RelPermalink }}|
 `
index 6b076ee7133cb1303c19adecb9a413b9264a1da3..4bdcfa7ee0028989deb9276b174c2d95368e8276 100644 (file)
@@ -27,7 +27,7 @@ weight = 1
 weight = 2
 [languages.de]
 weight = 3
--- layouts/index.html --
+-- layouts/home.html --
 {{ $bundle := site.GetPage "bundle" }}
 Bundle all translations: {{ range $bundle.AllTranslations }}{{ .Lang }}|{{ end }}$
 Bundle translations: {{ range $bundle.Translations }}{{ .Lang }}|{{ end }}$
index f8ae8a80ad60e3401aeca4f5d5cabf0e867646a7..923827d2d0043ce7c4bee03f513bc4feed230ae3 100644 (file)
@@ -34,7 +34,7 @@ disableKinds = ["term", "taxonomy", "section", "page"]
 ---
 title: Page
 ---
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ .Title }}
 `
 
@@ -135,9 +135,9 @@ Rotate(language): {{ range .Rotate "language" }}{{ .Lang }}|{{ .Title }}|{{ end
 mytext.txt: {{ with .Resources.GetMatch "**.txt" }}{{ .Content }}|{{ .RelPermalink }}{{ end }}|
 mypage.md: {{ with .Resources.GetMatch "**.md" }}{{ .Content }}|{{ .RelPermalink }}{{ end }}|
 RenderString with shortcode: {{ .RenderString "{{< myshortcode >}}" }}|
--- layouts/shortcodes/myshortcode.html --
+-- layouts/_shortcodes/myshortcode.html --
 myshortcode.html
--- layouts/shortcodes/myshortcode.en.html --
+-- layouts/_shortcodes/myshortcode.en.html --
 myshortcode.en.html
 `
 
@@ -322,11 +322,11 @@ title: Page
 ---
 Page.
 
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .RelPermalink}}|{{ range .OutputFormats }}{{ .Name }}: {{ .RelPermalink }}|{{ end }}$
--- layouts/_default/list.xml --
+-- layouts/list.xml --
 List xml: {{ .Title }}|{{ .RelPermalink}}|{{ range .OutputFormats }}{{ .Name }}: {{ .RelPermalink }}|{{ end }}$
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .RelPermalink}}|{{ range .OutputFormats }}{{ .Name }}: {{ .RelPermalink }}|{{ end }}$
 
 `
@@ -387,7 +387,7 @@ hugo = "Rules!"
 
 [outputs]
   home = ["html", "json", "rss"]
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ .Lang}}|{{ .Kind }}|{{ .RelPermalink }}|{{ .Title }}|{{ .Content }}|Len Resources: {{ len .Resources }}|HTML
 Resources: {{ range .Resources }}{{ .ResourceType }}|{{ .RelPermalink }}|{{ .MediaType }} - {{ end }}|
 Site last mod: {{ site.Lastmod.Format "2006-02-01" }}|
@@ -403,7 +403,7 @@ RenderString with shortcode: {{ .RenderString "{{% hello %}}" }}|
 Paginate: {{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }}|
 -- layouts/index.json --
 Home:{{ .Lang}}|{{ .Kind }}|{{ .RelPermalink }}|{{ .Title }}|{{ .Content }}|Len Resources: {{ len .Resources }}|JSON
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Lang}}|{{ .Kind }}|{{ .RelPermalink }}|{{ .Title }}|{{ .Content }}|Len Resources: {{ len .Resources }}|
 Resources: {{ range .Resources }}{{ .ResourceType }}|{{ .RelPermalink }}|{{ .MediaType }} - {{ end }}
 Pages Length: {{ len .Pages }}
@@ -414,7 +414,7 @@ Background: {{ .Params.background }}|
 Kind: {{ .Kind }}
 Type: {{ .Type }}
 Paginate: {{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Lang}}|{{ .Kind }}|{{ .RelPermalink }}|{{ .Title }}|{{ .Content }}|Len Resources: {{ len .Resources }}|Background: {{ .Params.background }}|
 Resources: {{ range .Resources }}{{ .ResourceType }}|{{ .RelPermalink }}|{{ .MediaType }}|{{ .Params }} - {{ end }}
 {{ $textResource := .Resources.GetMatch "**.txt" }}
@@ -426,7 +426,7 @@ Icon fingerprinted: {{ with $textResourceFingerprinted }}{{ .Params.icon }}|{{ .
 NextInSection: {{ with .NextInSection }}{{ .RelPermalink }}|{{ .Title }}{{ end }}|
 PrevInSection: {{ with .PrevInSection }}{{ .RelPermalink }}|{{ .Title }}{{ end }}|
 GetTerms: {{ range .GetTerms "tags" }}name: {{ .Name }}, title: {{ .Title }}|{{ end }}
--- layouts/shortcodes/hello.html --
+-- layouts/_shortcodes/hello.html --
 Hello.
 -- content/_index.md --
 ---
@@ -630,7 +630,7 @@ target = "content"
 lang = "nn"
 [[module.imports]]
 path = "mytheme"
--- layouts/index.html --
+-- layouts/home.html --
 i18n s1: {{ i18n "s1" }}|
 i18n s2: {{ i18n "s2" }}|
 data s1: {{ site.Data.d1.s1 }}|
@@ -716,9 +716,9 @@ mediaType = "text/csv"
 isPlainText = true
 isHTML = false
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 HTML Single: {{ .Data.Pages }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 HTML List: {{ .Data.Pages }}
 -- content/_index.md --
 ---
@@ -820,13 +820,13 @@ weight = 3
 [languages.sv]
 title = "Svenska"
 weight = 4
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}
 {{ .Content }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 {{ .Content }}
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 {{ .Inner }}
 `
 
index 250c7bcec6e01c2671f1102f69c81198ebb1f47e..0293e34d1c0c60ab892ead7e6e521b3778f6e515 100644 (file)
@@ -52,9 +52,9 @@ tags: ['T1']
 title: P1
 tags: ['T1']
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 <ul>{{ range .AllTranslations }}<li>{{ .Title }}-{{ .Lang }}</li>{{ end }}</ul>
--- layouts/_default/list.html --
+-- layouts/list.html --
 <ul>{{ range .AllTranslations }}<li>{{ .Title }}-{{ .Lang }}</li>{{ end }}</ul>
        `
 
@@ -93,7 +93,7 @@ func TestRenderStringBadMarkupOpt(t *testing.T) {
        t.Parallel()
 
        files := `
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "markup" "foo" }}
 {{ "something" | .RenderString $opts }}
        `
@@ -129,7 +129,7 @@ tags: [fiction]
 ---
 title: Films
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{ (site.GetPage "/tags").Title }}
 {{ (site.GetPage "/tags/fiction").Title }}
 {{ (site.GetPage "/books").Title }}
index c79ab99b0187a2a1a350dfd41c607a6188ab0983..b0c1c2dbf8f03f8fcc4c5ae9b86c981320d72f5d 100644 (file)
@@ -44,7 +44,7 @@ file 1 en
 file 2 en
 -- content/nn/myfiles/file1.txt --
 file 1 nn
--- layouts/index.html --
+-- layouts/home.html --
 Title: {{ .Title }}|
 Len Resources: {{ len .Resources }}|
 {{ range $i, $e := .Resources }}
index ac07d9b660e52cb291361835d61728797b6d72d2..eb7f218f8bc9a1a3878a2e00d529f006ab96ec62 100644 (file)
@@ -50,7 +50,7 @@ defaultContentLanguage = "%s"
 weight = 1
 -- i18n/%s.toml --
 hello.one = "Hello"
--- layouts/index.html --
+-- layouts/home.html --
 Hello: {{ i18n "hello" 1 }}
 -- content/p1.md --
 `, tc.langCode, tc.langCode, tc.langCode)
@@ -96,7 +96,7 @@ timeZone="UTC"
 weight=10
 [languages.nn]
 weight=20
--- layouts/index.html --
+-- layouts/home.html --
 
 FormatNumber: {{ 512.5032 | lang.FormatNumber 2 }}
 FormatPercent: {{ 512.5032 | lang.FormatPercent 2 }}
index c241c92997809515c0858cbb77333e57c7438709..418de943a66c04106d64ea9b3ab7e02227302271 100644 (file)
@@ -27,7 +27,7 @@ func TestMenusSectionPagesMenu(t *testing.T) {
 baseurl = "http://example.com/"
 title = "Section Menu"
 sectionPagesMenu = "sect"
--- layouts/partials/menu.html --
+-- layouts/_partials/menu.html --
 {{- $p := .page -}}
 {{- $m := .menu -}}
 {{ range (index $p.Site.Menus $m) -}}
@@ -35,11 +35,11 @@ sectionPagesMenu = "sect"
 {{- if $p.IsMenuCurrent $m . }}IsMenuCurrent{{ else }}-{{ end -}}|
 {{- if $p.HasMenuCurrent $m . }}HasMenuCurrent{{ else }}-{{ end -}}|
 {{- end -}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single|{{ .Title }}
 Menu Sect:  {{ partial "menu.html" (dict "page" . "menu" "sect") }}
 Menu Main:  {{ partial "menu.html" (dict "page" . "menu" "main") }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 List|{{ .Title }}|{{ .Content }}
 -- content/sect1/p1.md --
 ---
@@ -143,7 +143,7 @@ func TestMenusFrontMatter(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 Main: {{ len .Site.Menus.main }}
 Other: {{ len .Site.Menus.other }}
 {{ range .Site.Menus.main }}
@@ -193,7 +193,7 @@ baseURL = "https://example.com"
 mediaType = "text/html"
 path = "damp"
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ range .Site.Menus.main }}{{ .Title }}|{{ .URL }}|{{ end }}
 -- content/_index.md --
 ---
@@ -235,7 +235,7 @@ func TestMenusPageSortByDate(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ range .Site.Menus.main }}{{ .Title }}|Children:
 {{- $children := sort .Children ".Page.Date" "desc" }}{{ range $children }}{{ .Title }}|{{ end }}{{ end }}
 
@@ -288,7 +288,7 @@ weight = 300
 foo = "foo_config"
 key2 = "key2_config"
 camelCase = "camelCase_config"
--- layouts/index.html --
+-- layouts/home.html --
 Main: {{ len .Site.Menus.main }}
 {{ range .Site.Menus.main }}
 foo: {{ .Params.foo }}
@@ -337,13 +337,13 @@ pageRef = "/blog/post3"
 title = "My Post 3"
 url = "/blog/post3"
 
--- layouts/index.html --
+-- layouts/home.html --
 Main: {{ len .Site.Menus.main }}
 {{ range .Site.Menus.main }}
 {{ .Title }}|HasMenuCurrent: {{ $.HasMenuCurrent "main" . }}|Page: {{ .Page.Path }}
 {{ .Title }}|IsMenuCurrent: {{ $.IsMenuCurrent "main" . }}|Page: {{ .Page.Path }}
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Main: {{ len .Site.Menus.main }}
 {{ range .Site.Menus.main }}
 {{ .Title }}|HasMenuCurrent: {{ $.HasMenuCurrent "main" . }}|Page: {{ .Page.Path }}
@@ -444,7 +444,7 @@ weight = 1
 ---
 title: "Test 1"
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ range site.Menus.main }}
 {{ .Name }}|{{ .URL }}|IsMenuCurrent = {{ $.IsMenuCurrent "main" . }}|HasMenuCurrent = {{ $.HasMenuCurrent "main" . }}|
 {{ range .Children }}
@@ -491,7 +491,7 @@ url = "/"
 pre = "<span>"
 post = "</span>"
 weight = 1
--- layouts/index.html --
+-- layouts/home.html --
 {{ range $i, $e := site.Menus.main }}
 Menu Item: {{ $i }}: {{ .Pre }}{{ .Name }}{{ .Post }}|{{ .URL }}|
 {{ end }}
@@ -517,7 +517,7 @@ title = "Hugo Menu Test"
 name = "Posts"
 url = "/posts"
 weight = 1
--- layouts/index.html --
+-- layouts/home.html --
 {{ range $i, $e := site.Menus.main }}
 Menu Item: {{ $i }}|{{ .URL }}|
 {{ end }}
@@ -540,11 +540,11 @@ defaultContentLanguageInSubdir = true
 sectionPagesMenu = "main"
 [languages.en]
 [languages.fr]
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{- range site.Menus.main -}}
   <a href="{{ .URL }}">{{ .Name }}</a>
 {{- end -}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 -- content/p1.en.md --
 ---
@@ -592,9 +592,9 @@ menus: main
 ---
 title: p3
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ range site.Menus.main }}<a href="{{ .URL }}">{{ .Name }}</a>{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 `
 
@@ -659,11 +659,11 @@ title: S2_Title
 title: S3_Title
 linkTitle: S3_LinkTitle
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Content }}
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{- range site.Menus.main }}
 URL: {{ .URL }}| Name: {{ .Name }}| Title: {{ .Title }}| PageRef: {{ .PageRef }}| Page.Title: {{ .Page.Title }}| Page.LinkTitle: {{ .Page.LinkTitle }}|
 {{- end }}
index eea267eafc8eb54b0c3d6d556a6f4ac494518e22..6b479d6c6e8309028429a9a1b552db120407b589 100644 (file)
@@ -25,7 +25,7 @@ func TestMinifyPublisher(t *testing.T) {
 baseURL = "https://example.org/"
 [minify]
 minifyOutput = true
--- layouts/index.html --
+-- layouts/home.html --
 <!DOCTYPE html>
 <html lang="en">
 <head>
index 8f785aa4e9e1137228072088f835a7d64e9c6e23..6bb4870a3028579aa12afffeebef4347790082cb 100644 (file)
@@ -49,7 +49,7 @@ target = 'i18n'
 [[module.mounts]]
 source = 'archetypes'
 target = 'archetypes'
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single page.
 -- content/a/b/p1.md --
 ---
@@ -63,7 +63,7 @@ title: Exclude
 b1='bval'
 -- data/nodata/c.toml --
 c1='bval'
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 foo
 -- assets/exclude.txt --
 foo
@@ -71,7 +71,7 @@ foo
 foo
 -- assets/js/include.js --
 foo
--- layouts/index.html --
+-- layouts/home.html --
 Data: {{ site.Data }}:END
 
 Template: {{ templates.Exists "partials/foo.html" }}:END
index c30fa829e7276f744bd31a51873304307a75e4b8..0e4fd1c6056c2a4f449f34b679e5bc37dbc11672 100644 (file)
@@ -43,9 +43,9 @@ outputs: ["HTML", "JSON"]
 ---
 
 ## Heading 1 FR
--- layouts/_default/single.html --
+-- layouts/single.html --
 HTML
--- layouts/_default/single.json --
+-- layouts/single.json --
 {{ $secondSite := index .Sites 1 }}
 {{ $p1 := $secondSite.GetPage "p1" }}
 ToC: {{ $p1.TableOfContents }}
@@ -89,9 +89,9 @@ title: "P2"
 ### Heading P2 1
 ### Heading P2 2
 
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ with site.GetPage (.Get 0) }}{{ .RawContent }}{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Fragments: {{ .Fragments.Identifiers }}|
 
 
index 58d29464d9a0431eae0c724f5afcbad290778d73..8447c0c7e00547667338a97868e5c5e0a9a4ed7d 100644 (file)
@@ -35,9 +35,9 @@ tag = 'tags'
 title: page-1
 tags: 'tag-a'
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
        `
 
@@ -73,7 +73,7 @@ weight = 2
 title: "p2"
 draft: true
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 `
        b := Test(t, files)
index edb03f4eefbd8fb0b16ada4ef48e45d3e9149667..66281b5b58c413b3cade0c24294e5cbca2e19c99 100644 (file)
@@ -117,9 +117,9 @@ contentDir = "content/en"
 [Languages.nn]
 weight = 20
 contentDir = "content/nn"
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|Hello|{{ .Lang }}|RelPermalink: {{ .RelPermalink }}|Permalink: {{ .Permalink }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 List Page 1|{{ .Title }}|Hello|{{ .Permalink }}|
 -- content/en/blog/page1.md --
 ---
index 0f7ac65e6c5a6f0bed0133d74416d7050bdb1c3a..56bb4001131a866e3ad086df59d3862a0730acd5 100644 (file)
@@ -454,7 +454,7 @@ tags: ["a", "c"]
 categories: ["c", "e"]
 ---
 p2
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|Date: {{ .Date.Format "2006-01-02" }}|Lastmod: {{ .Lastmod.Format "2006-01-02" }}|
 
 `
@@ -662,7 +662,7 @@ title: "basic"
 ---
 title: "empty"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 |{{ .RawContent }}|
 `
 
@@ -720,7 +720,7 @@ title: Simple
 summary: "Front **matter** summary"
 ---
 Simple Page
--- layouts/_default/single.html --
+-- layouts/single.html --
 Summary: {{ .Summary }}|Truncated: {{ .Truncated }}|
 
 `).AssertFileContent("public/simple/index.html", "Summary: Front <strong>matter</strong> summary|", "Truncated: false")
@@ -737,7 +737,7 @@ title: Simple
 This is **summary**.
 <!--more-->
 This is **content**.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Summary: {{ .Summary }}|Truncated: {{ .Truncated }}|
 Content: {{ .Content }}|
 
@@ -763,7 +763,7 @@ This is <b>summary</b>.
 <div>
 This is <b>content</b>.
 </div>
--- layouts/_default/single.html --
+-- layouts/single.html --
 Summary: {{ .Summary }}|Truncated: {{ .Truncated }}|
 Content: {{ .Content }}|
 
@@ -785,7 +785,7 @@ This is *even more summary**.
 This is **more summary**.
 
 This is **content**.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Summary: {{ .Summary }}|Truncated: {{ .Truncated }}|
 Content: {{ .Content }}|
 
@@ -841,14 +841,14 @@ contentDir = 'content/en'
 
 [outputs]
 home = ["HTML", "JSON"]
--- layouts/index.html --
+-- layouts/home.html --
 {{- range .Site.Home.Translations -}}
        <p>{{- .RenderString "foo" -}}</p>
 {{- end -}}
 {{- range .Site.Home.AllTranslations -}}
        <p>{{- .RenderString "bar" -}}</p>
 {{- end -}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- layouts/index.json --
 {"Title": "My Site"}
@@ -921,7 +921,7 @@ defaultContentLanguage = "en"
 <li>Len: {{ .Len }}</li>
 {{ end }}
 </ul>
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 <html>
 
 <body>
@@ -929,7 +929,7 @@ defaultContentLanguage = "en"
 </body>
 
 </html>
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{ define "main" }}
 <h2>Translations</h2>
 <ul>
@@ -1300,7 +1300,7 @@ title: "p1 en"
 translationkey: "adfasdf"
 title: "p1 nn"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Title: {{ .Title }}|TranslationKey: {{ .TranslationKey }}|
 Translations: {{ range .Translations }}{{ .Language.Lang }}|{{ end }}|
 AllTranslations: {{ range .AllTranslations }}{{ .Language.Lang }}|{{ end }}|
@@ -1334,9 +1334,9 @@ weight = 1
 weight = 2
 [taxonomies]
 category = 'categories'
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .IsTranslated }}|{{ range .Translations }}{{ .RelPermalink }}|{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|
 -- content/p1.en.md --
 ---
@@ -1393,7 +1393,7 @@ title: "mybundle nn"
 ---
 -- content/sect/mybundle_nn/f2.nn.txt --
 f2.nn
--- layouts/_default/single.html --
+-- layouts/single.html --
 Title: {{ .Title }}|TranslationKey: {{ .TranslationKey }}|
 Resources: {{ range .Resources }}{{ .RelPermalink }}|{{ .Content }}|{{ end }}|
 
@@ -1515,9 +1515,9 @@ Summary.
 # more
 
 Content.
--- layouts/shortcodes/sc.html --
+-- layouts/_shortcodes/sc.html --
 a shortcode
--- layouts/_default/single.html --
+-- layouts/single.html --
 SUMMARY:{{ .Summary }}:END
 --------------------------
 CONTENT:{{ .Content }}
@@ -1561,7 +1561,7 @@ func TestHomePageWithNoTitle(t *testing.T) {
 -- hugo.toml --
 baseURL = "http://example.com/"
 title = "Site Title"
--- layouts/index.html --
+-- layouts/home.html --
 Title|{{ with .Title }}{{ . }}{{ end }}|
 -- content/_index.md --
 ---
@@ -1700,7 +1700,7 @@ title: "Pag.E4"
 slug: "PaGe4"
 ---
 p4.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title}}|{{ .RelPermalink }}|{{ .Path }}|
 `
        b := Test(t, files)
@@ -1716,13 +1716,13 @@ func TestScratch(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Scratch.Set "b" "bv" }}
 B: {{ .Scratch.Get "b" }}
--- layouts/shortcodes/scratch.html --
+-- layouts/_shortcodes/scratch.html --
 {{ .Scratch.Set "c" "cv" }}
 C: {{ .Scratch.Get "c" }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/scratchme.md --
 ---
@@ -1753,7 +1753,7 @@ func TestScratchAliasToStore(t *testing.T) {
 -- hugo.toml --
 disableKinds = ["taxonomy", "term", "page", "section"]
 disableLiveReload = true
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Scratch.Set "a" "b" }}
 {{ .Store.Set "c" "d" }}
 .Scratch eq .Store: {{ eq .Scratch .Store }}
@@ -1781,7 +1781,7 @@ baseURL = "https://example.org"
 [params]
 [params.author]
   name = "Kurt Vonnegut"
--- layouts/index.html --
+-- layouts/home.html --
 
 {{ $withParam := .Site.GetPage "withparam" }}
 {{ $noParam := .Site.GetPage "noparam" }}
@@ -1868,13 +1868,13 @@ defaultMarkdownHandler="goldmark"
 unsafe = false
 [markup.highlight]
 noClasses=false
--- layouts/_default/single.html --
+-- layouts/single.html --
 Title: {{ .Title }}
 ToC: {{ .TableOfContents }}
 Content: {{ .Content }}
--- layouts/shortcodes/t.html --
+-- layouts/_shortcodes/t.html --
 T-SHORT
--- layouts/shortcodes/s.html --
+-- layouts/_shortcodes/s.html --
 ## Code
 {{ .Inner }}
 -- content/page.md --
@@ -1939,7 +1939,7 @@ func TestRenderWithoutArgument(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Render }}
 `
 
@@ -1966,10 +1966,10 @@ disableLiveReload = true
 title: "Home"
 ---
 {{< s >}}
--- layouts/shortcodes/s.html --
+-- layouts/_shortcodes/s.html --
 {{ if not (.Store.Get "Shortcode") }}{{ .Store.Set "Shortcode" (printf "sh-%s" $.Page.Title) }}{{ end }}
 Shortcode: {{ .Store.Get "Shortcode" }}|
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 {{ if not (.Store.Get "Page") }}{{ .Store.Set "Page" (printf "p-%s" $.Title) }}{{ end }}
 {{ if not (hugo.Store.Get "Hugo") }}{{ hugo.Store.Set "Hugo" (printf "h-%s" $.Title) }}{{ end }}
index 399a1b0220e6e2a2f07b0f9786ec6fe83ad53aab..7ec749877ccae8c4945078b43a0558bcc89c412c 100644 (file)
@@ -64,7 +64,7 @@ disableKinds = ["taxonomy", "term"]
 ---
 title: "Root"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Basic: {{ .Title }}|{{ .Kind }}|{{ .BundleType }}|{{ .RelPermalink }}|
 Tree: Section: {{ .Section }}|CurrentSection: {{ .CurrentSection.RelPermalink }}|Parent: {{ .Parent.RelPermalink }}|FirstSection: {{ .FirstSection.RelPermalink }}
 `
@@ -95,9 +95,9 @@ P1 content.
 
 {{< myShort >}}
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 Bundled page: {{ .RelPermalink}}|{{ with .Resources.Get "p1.md" }}Title: {{ .Title }}|Content: {{ .Content }}{{ end }}|
--- layouts/shortcodes/myShort.html --
+-- layouts/_shortcodes/myShort.html --
 MyShort.
 
 `
@@ -133,14 +133,14 @@ P1.
 
 {{< hello >}}
 
--- layouts/shortcodes/hello.html --
+-- layouts/_shortcodes/hello.html --
 Hello HTML.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Basic: {{ .Title }}|{{ .Kind }}|{{ .BundleType }}|{{ .RelPermalink }}|
 Resources: {{ range .Resources }}RelPermalink: {{ .RelPermalink }}|Content: {{ .Content }}|{{ end }}|
--- layouts/shortcodes/hello.cpath --
+-- layouts/_shortcodes/hello.cpath --
 Hello CPATH.
--- layouts/_default/single.cpath --
+-- layouts/single.cpath --
 Basic: {{ .Title }}|{{ .Kind }}|{{ .BundleType }}|{{ .RelPermalink }}|
 Resources: {{ range .Resources }}RelPermalink: {{ .RelPermalink }}|Content: {{ .Content }}|{{ end }}|
 `
@@ -185,7 +185,7 @@ F1
 F2
 -- content/mybundle/f2.nn.txt --
 F2 nn.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .RelPermalink }}|{{ .Lang }}|
 Resources: {{ range .Resources }}RelPermalink: {{ .RelPermalink }}|Content: {{ .Content }}|{{ end }}|
 
@@ -229,11 +229,11 @@ title: "My Sect Nn"
 title: "P1nn"
 ---
 P1nn
--- layouts/index.html --
+-- layouts/home.html --
 Len RegularPages: {{ len .Site.RegularPages }}|RegularPages: {{ range site.RegularPages }}{{ .RelPermalink }}: {{ .Title }}|{{ end }}|
 Len Pages: {{ len .Site.Pages }}|
 Len Sites: {{ len .Site.Sites }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .Content }}|{{ .Lang }}|
 
 `
@@ -289,11 +289,11 @@ title: "My Sect Nn"
 title: "P1nn"
 ---
 P1nn
--- layouts/index.html --
+-- layouts/home.html --
 Len RegularPages: {{ len .Site.RegularPages }}|RegularPages: {{ range site.RegularPages }}{{ .RelPermalink }}: {{ .Title }}|{{ end }}|
 Len Pages: {{ len .Site.Pages }}|
 Len Sites: {{ len .Site.Sites }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .Content }}|{{ .Lang }}|
 
 `
@@ -325,7 +325,7 @@ title: P1
 title: My Headless Bundle2
 headless: true
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{ $headless1 := .Site.GetPage "headless/h1" }}
 {{ $headless2 := .Site.GetPage "headless/h2" }}
 
@@ -395,9 +395,9 @@ Date: 2018-02-01
 ---
 
 Single content.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .Content }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|{{ .Content }}
 `
        b := Test(t, files)
@@ -458,10 +458,10 @@ F1 en.
 F2 en.
 -- content/mybundle/f2.nn.txt --
 F2 nn.
--- layouts/shortcodes/getresource.html --
+-- layouts/_shortcodes/getresource.html --
 {{ $r := .Page.Resources.Get (.Get 0)}}
 Resource: {{ (.Get 0) }}|{{ with $r }}{{ .RelPermalink }}|{{ .Content }}|{{ else }}Not found.{{ end}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .RelPermalink }}|{{ .Lang }}|{{ .Content }}|
 `
        b := Test(t, files)
@@ -507,7 +507,7 @@ title: Page
 ---
 -- content/mybundle/data.json --
 MyData
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ range .Resources }}
 {{ .ResourceType }}|{{ .Title }}|
 {{ end }}
@@ -549,7 +549,7 @@ title: "Bundled page en"
 title: "Bundled page nn"
 ---
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 Bundled page: {{ .RelPermalink}}|Len resources: {{ len .Resources }}|
 
 
@@ -570,7 +570,7 @@ func TestBundleIndexInSubFolder(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "https://example.com"
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ range .Resources }}
 {{ .ResourceType }}|{{ .Title }}|
 {{ end }}
@@ -616,9 +616,9 @@ title: Home
 ![Alt text](image.jpg)
 -- content/data.json --
 DATA
--- layouts/index.html --
+-- layouts/home.html --
 Title: {{ .Title }}|First Resource: {{ index .Resources 0 }}|Content: {{ .Content }}
--- layouts/_default/_markup/render-image.html --
+-- layouts/_markup/render-image.html --
 Hook Len Page Resources {{ len .Page.Resources }}
 `
        b := Test(t, files)
@@ -675,9 +675,9 @@ title: "HTML with commented out frontmatter"
 ---
 -->
 <html>hello</html>
--- layouts/index.html --
+-- layouts/home.html --
 {{ range site.RegularPages }}{{ .RelPermalink }}|{{ end }}$
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .RelPermalink }}Resources: {{ range .Resources }}{{ .Name }}|{{ end }}$
 
 `
@@ -731,9 +731,9 @@ Section data TXT.
 -- content/mysection/p2.md --
 -- content/mysection/p2.html --
 -- content/mysection/foo/p2.md --
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single:{{ .Title }}|{{ .Path }}|File LogicalName: {{ with .File }}{{ .LogicalName }}{{ end }}||{{ .RelPermalink }}|{{ .Kind }}|Resources: {{ range .Resources}}{{ .Name }}: {{ .Content }}|{{ end }}$
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .Path }}|File LogicalName: {{ with .File }}{{ .LogicalName }}{{ end }}|{{ .RelPermalink }}|{{ .Kind }}|Resources: {{ range .Resources}}{{ .Name }}: {{ .Content }}|{{ end }}$
 RegularPages: {{ range .RegularPages }}{{ .RelPermalink }}|File LogicalName: {{ with .File }}{{ .LogicalName }}|{{ end }}{{ end }}$
 `
@@ -754,7 +754,7 @@ baseURL = "https://example.com"
 -- content/mybundle/index.md --
 -- content/mybundle/f1.en.txt --
 F1.
--- layouts/_default/single.html --
+-- layouts/single.html --
 GetMatch: {{ with .Resources.GetMatch "f1.en.*" }}{{ .Name }}: {{ .Content }}|{{ end }}
 Match: {{ range .Resources.Match "f1.En.*" }}{{ .Name }}: {{ .Content }}|{{ end }}
 `
@@ -781,7 +781,7 @@ draft: true
 ---
 -- content/mybundle/f1.en.txt --
 F1.
--- layouts/_default/single.html --
+-- layouts/single.html --
 GetMatch: {{ with .Resources.GetMatch "f1.*" }}{{ .Name }}: {{ .Content }}|{{ end }}$
 `
 
@@ -812,9 +812,9 @@ title: p1
 ---
 p1.txt
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|
 `
 
index 71ae2a200a062dfb989af23e3d3abf37139a9d82..d8b5186262f2c95fc655c13ec5d22d99b185b85a 100644 (file)
@@ -54,9 +54,9 @@ func TestGetPage(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}
 
 -- content/_index.md --
@@ -321,7 +321,7 @@ disableKinds = ["taxonomy", "term"]
 ---
 title: "Mysect Index"
 ---
--- layouts/index.html --
+-- layouts/home.html --
 GetPage 1: {{ with site.GetPage "mysect/index/index.md" }}{{ .Title }}|{{ .RelPermalink }}|{{ .Path }}{{ end }}|
 GetPage 2: {{ with site.GetPage "mysect/index" }}{{ .Title }}|{{ .RelPermalink }}|{{ .Path }}{{ end }}|
 `
@@ -358,7 +358,7 @@ draft: false
 ---title: members who
 draft: true
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ with .GetPage "members.md" }}
     Members: {{ .Title }}
 {{ else }}
@@ -382,7 +382,7 @@ title: p1
 ---
 -- p1/p1.xyz --
 xyz.
--- layouts/index.html --
+-- layouts/home.html --
 Home. {{ with .Page.GetPage "p1.xyz" }}{{ else }}OK 1{{ end }} {{ with .Site.GetPage "p1.xyz" }}{{ else }}OK 2{{ end }}
 `
 
@@ -406,9 +406,9 @@ layout: p1
 title: p2
 layout: p2
 ---
--- layouts/_default/p1.html --
+-- layouts/p1.html --
 {{ (.GetPage "p2.md").Title }}|
--- layouts/_default/p2.html --
+-- layouts/p2.html --
 {{ (.GetPage "p1").Title }}|
 `
 
@@ -430,7 +430,7 @@ disableKinds = ['rss','section','sitemap']
 title: p1
 tags: [news]
 ---
--- layouts/index.html --
+-- layouts/home.html --
 /tags/news: {{ with .Site.GetPage "/tags/news" }}{{ .Title }}{{ end }}|
 news: {{ with .Site.GetPage "news" }}{{ .Title }}{{ end }}|
 /news: {{ with .Site.GetPage "/news" }}{{ .Title }}{{ end }}|
@@ -457,7 +457,7 @@ title: p1
 ---
 title: p2
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ with .GetPage "p2" }}
   OK: {{ .LinkTitle }}
 {{ else }}
@@ -493,14 +493,14 @@ title: p3
 ---
 title: p2_root
 ---
--- layouts/index.html --
+-- layouts/home.html --
 /s1: {{ with .GetPage "/s1" }}{{ .Title }}{{ end }}|
 /s1/: {{ with .GetPage "/s1/" }}{{ .Title }}{{ end }}|
 /s1/p2.md: {{ with .GetPage "/s1/p2.md" }}{{ .Title }}{{ end }}|
 /s1/p2: {{ with .GetPage "/s1/p2" }}{{ .Title }}{{ end }}|
 /s1/p1/index.md: {{ with .GetPage "/s1/p1/index.md" }}{{ .Title }}{{ end }}|
 /s1/p1: {{ with .GetPage "/s1/p1" }}{{ .Title }}{{ end }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 ../p2: {{ with .GetPage "../p2" }}{{ .Title }}{{ end }}|
 ../p2.md: {{ with .GetPage "../p2.md" }}{{ .Title }}{{ end }}|
 p1/index.md: {{ with .GetPage "p1/index.md" }}{{ .Title }}{{ end }}|
@@ -570,16 +570,16 @@ title: b2
 ---
 title: d1
 ---
--- layouts/shortcodes/ref.html --
+-- layouts/_shortcodes/ref.html --
 {{ $ref := .Get 0 }}
 .Page.GetPage({{ $ref }}).Title: {{ with .Page.GetPage $ref }}{{ .Title }}{{ end }}|
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 /blog/b1.md: {{ with .GetPage "/blog/b1.md" }}{{ .Title }}{{ end }}|
 /blog/b2/index.md: {{ with .GetPage "/blog/b2/index.md" }}{{ .Title }}{{ end }}|
 /docs/d1.md: {{ with .GetPage "/docs/d1.md" }}{{ .Title }}{{ end }}|
 /README.md: {{ with .GetPage "/README.md" }}{{ .Title }}{{ end }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 /README.md: {{ with .GetPage "/README.md" }}{{ .Title }}{{ end }}|
 {{ .Content }}
@@ -642,7 +642,7 @@ title: about1
 ---
 title: about1en
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{ with site.GetPage "docs/1" }}
     Docs p1: {{ .Title }}
 {{ else }}
@@ -708,7 +708,7 @@ title: docs_sect2_ps2
 ---
 title: news1
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{ $sect1 := site.GetPage "sect1" }}
 
 Sect1 RegularPagesRecursive: {{ range $sect1.RegularPagesRecursive }}{{ .Kind }}:{{ .RelPermalink}}|{{ end }}|End.
@@ -733,7 +733,7 @@ func TestRegularPagesRecursiveHome(t *testing.T) {
 -- hugo.toml --
 -- content/p1.md --
 -- content/post/p2.md --
--- layouts/index.html --
+-- layouts/home.html --
 RegularPagesRecursive: {{ range .RegularPagesRecursive }}{{ .Kind }}:{{ .RelPermalink}}|{{ end }}|End.
 `
 
@@ -764,7 +764,7 @@ draft: true
 -- content/s1-foo/s2/p3.md --
 -- content/s1-foo/s2-foo/_index.md --
 -- content/s1-foo/s2-foo/p4.md --
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .RelPermalink }}: Pages: {{ range .Pages }}{{ .RelPermalink }}|{{ end }}$
 
 `
@@ -782,12 +782,12 @@ func TestGetPageContentAdapterBaseIssue12561(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 Test A: {{ (site.GetPage "/s1/p1").Title }}
 Test B: {{ (site.GetPage "p1").Title }}
 Test C: {{ (site.GetPage "/s2/p2").Title }}
 Test D: {{ (site.GetPage "p2").Title }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 -- content/s1/p1.md --
 ---
index 952a124fe83391411c0fe6a663fd04d1f93c9bc7..b9e889155c1d5d2e0936262804c320cd7fa106ac 100644 (file)
@@ -109,9 +109,9 @@ Pages2: {{ range $i, $p := $pages2 }}{{ add $i 1 }}: {{ .Title }} {{ .Language.L
 {{ $nil := resources.Get "asdfasdfasdf" }}
 Pages3: {{ $frSite.RegularPages | lang.Merge  $nil }}
 Pages4: {{  $nil | lang.Merge $frSite.RegularPages }}
--- layouts/shortcodes/shortcode.html --
+-- layouts/_shortcodes/shortcode.html --
 MyShort
--- layouts/shortcodes/lingo.html --
+-- layouts/_shortcodes/lingo.html --
 MyLingo
 `
        b := Test(t, files)
@@ -187,9 +187,9 @@ date: "2018-02-28"
 
        // Add shortcode templates
        b.WriteString(`
--- layouts/shortcodes/shortcode.html --
+-- layouts/_shortcodes/shortcode.html --
 MyShort
--- layouts/shortcodes/lingo.html --
+-- layouts/_shortcodes/lingo.html --
 MyLingo
 `)
 
index b0c611c503022a8b02f964f078900f1874fe792c..cb42e46f9b90f69d4732c02913834ff572d0c140 100644 (file)
@@ -36,13 +36,13 @@ iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAA
 -- assets/mydata.yaml --
 p1: "p1"
 draft: false
--- layouts/partials/get-value.html --
+-- layouts/_partials/get-value.html --
 {{ $val := "p1" }}
 {{ return $val }}
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Baseof:
 {{ block "main" . }}{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 Single: {{ .Title }}|{{ .Content }}|Params: {{ .Params.param1 }}|Path: {{ .Path }}|
 Dates: Date: {{ .Date.Format "2006-01-02" }}|Lastmod: {{ .Lastmod.Format "2006-01-02" }}|PublishDate: {{ .PublishDate.Format "2006-01-02" }}|ExpiryDate: {{ .ExpiryDate.Format "2006-01-02" }}|
@@ -55,7 +55,7 @@ Resized Featured Image: {{ .RelPermalink }}|{{ .Width }}|
 {{ end}}
 {{ end }}
 {{ end }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .Content }}|
 RegularPagesRecursive: {{ range .RegularPagesRecursive }}{{ .Title }}:{{ .Path }}|{{ end }}$
 Sections: {{ range .Sections }}{{ .Title }}:{{ .Path }}|{{ end }}$
@@ -140,7 +140,7 @@ baseURL = "https://example.com"
 [security]
 [security.exec]
 allow = ['asciidoctor', 'pandoc','rst2html', 'python']
--- layouts/_default/single.html --
+-- layouts/single.html --
 |Content: {{ .Content }}|Title: {{ .Title }}|Path: {{ .Path }}|
 -- content/docs/_content.gotmpl --
 {{ $.AddPage (dict "path" "asciidoc" "content" (dict "value" "Mark my words, #automation is essential#." "mediaType" "text/asciidoc" )) }}
@@ -239,7 +239,7 @@ func TestPagesFromGoTmplEditDataResource(t *testing.T) {
 func TestPagesFromGoTmplEditPartial(t *testing.T) {
        t.Parallel()
        b := hugolib.TestRunning(t, filesPagesFromDataTempleBasic)
-       b.EditFileReplaceAll("layouts/partials/get-value.html", "p1", "p1edited").Build()
+       b.EditFileReplaceAll("layouts/_partials/get-value.html", "p1", "p1edited").Build()
        b.AssertFileContent("public/docs/p1/index.html", "Single: p1:p1edited|")
        b.AssertFileContent("public/docs/index.html", "p1edited")
 }
@@ -370,7 +370,7 @@ title = "Title"
 weight = 2
 title = "Titre"
 disabled = DISABLE
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
 -- content/docs/_content.gotmpl --
 {{ $.AddPage  (dict "kind" "page" "path" "p1" "title" "Title" ) }}
@@ -395,7 +395,7 @@ func TestPagesFromGoTmplDefaultPageSort(t *testing.T) {
        files := `
 -- hugo.toml --
 defaultContentLanguage = "en"
--- layouts/index.html --
+-- layouts/home.html --
 {{ range site.RegularPages }}{{ .RelPermalink }}|{{ end}}
 -- content/_content.gotmpl --
 {{ $.AddPage  (dict "kind" "page" "path" "docs/_p22" "title" "A" ) }}
@@ -464,7 +464,7 @@ func TestPagesFromGoTmplMarkdownify(t *testing.T) {
 -- hugo.toml --
 disableKinds = ["taxonomy", "term", "rss", "sitemap"]
 baseURL = "https://example.com"
--- layouts/_default/single.html --
+-- layouts/single.html --
 |Content: {{ .Content }}|Title: {{ .Title }}|Path: {{ .Path }}|
 -- content/docs/_content.gotmpl --
 {{ $content := "**Hello World**" | markdownify }}
@@ -485,7 +485,7 @@ func TestPagesFromGoTmplResourceWithoutExtensionWithMediaTypeProvided(t *testing
 -- hugo.toml --
 disableKinds = ["taxonomy", "term", "rss", "sitemap"]
 baseURL = "https://example.com"
--- layouts/_default/single.html --
+-- layouts/single.html --
 |Content: {{ .Content }}|Title: {{ .Title }}|Path: {{ .Path }}|
 {{ range .Resources }}
 |RelPermalink: {{ .RelPermalink }}|Name: {{ .Name }}|Title: {{ .Title }}|Params: {{ .Params }}|MediaType: {{ .MediaType }}|
@@ -507,7 +507,7 @@ func TestPagesFromGoTmplCascade(t *testing.T) {
 -- hugo.toml --
 disableKinds = ["taxonomy", "term", "rss", "sitemap"]
 baseURL = "https://example.com"
--- layouts/_default/single.html --
+-- layouts/single.html --
 |Content: {{ .Content }}|Title: {{ .Title }}|Path: {{ .Path }}|Params: {{ .Params }}|
 -- content/_content.gotmpl --
 {{ $cascade := dict "params" (dict "cascadeparam1" "cascadeparam1value" ) }}
@@ -527,7 +527,7 @@ func TestPagesFromGoBuildOptions(t *testing.T) {
 -- hugo.toml --
 disableKinds = ["taxonomy", "term", "rss", "sitemap"]
 baseURL = "https://example.com"
--- layouts/_default/single.html --
+-- layouts/single.html --
 |Content: {{ .Content }}|Title: {{ .Title }}|Path: {{ .Path }}|Params: {{ .Params }}|
 -- content/_content.gotmpl --
 {{ $.AddPage (dict "path" "docs/p1" "content" (dict "value" "**Hello World**" "mediaType" "text/markdown" )) }}
@@ -550,7 +550,7 @@ func TestPagesFromGoPathsWithDotsIssue12493(t *testing.T) {
 disableKinds = ['home','section','rss','sitemap','taxonomy','term']
 -- content/_content.gotmpl --
 {{ .AddPage (dict "path" "s-1.2.3/p-4.5.6" "title" "p-4.5.6") }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 `
 
@@ -568,7 +568,7 @@ disableKinds = ['home','section','rss','sitemap','taxonomy','term']
 -- content/_content.gotmpl --
 {{ .AddPage (dict "path" "p1" "title" "p1" "params" (dict "paraM1" "param1v" )) }}
 {{ .AddResource (dict "path" "p1/data1.yaml" "content" (dict "value" "data1" ) "params" (dict "paraM1" "param1v" )) }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .Params.paraM1 }}
 {{ range .Resources }}
 {{ .Name }}|{{ .Params.paraM1 }}
@@ -595,9 +595,9 @@ disableKinds = ['home','rss','section','sitemap','taxonomy','term']
 
 {{ $content := dict "mediaType" "text/html" "value" "{{< sc >}}" }}
 {{ .AddPage (dict "content" $content "path" "b") }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 |{{ .Content }}|
--- layouts/shortcodes/sc.html --
+-- layouts/_shortcodes/sc.html --
 foo
 {{- /**/ -}}
 `
@@ -623,7 +623,7 @@ name = "Footer"
 -- content/_content.gotmpl --
 {{ .AddPage (dict "path" "p1" "title" "p1" "menus" "main" ) }}
 {{ .AddPage (dict "path" "p2" "title" "p2" "menus" (slice "main" "footer")) }}
--- layouts/index.html --
+-- layouts/home.html --
 Main: {{ range index site.Menus.main }}{{ .Name }}|{{ end }}|
 Footer: {{ range index site.Menus.footer }}{{ .Name }}|{{ end }}|
 
@@ -655,7 +655,7 @@ disableKinds = ['rss','section','sitemap','taxonomy','term']
 {{ $menus := dict "m1" $menu1 "m2" $menu2 }}
 {{ .AddPage (dict "path" "p1" "title" "p1" "menus" $menus ) }}
 
--- layouts/index.html --
+-- layouts/home.html --
 Menus: {{ range $k, $v := site.Menus }}{{ $k }}|{{ end }}
 
 `
@@ -679,7 +679,7 @@ unsafe = true
        "path" "p1"
   }}
   {{ .AddPage $page }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 summary: {{ .Summary }}|content: {{ .Content}}
 `
 
@@ -709,9 +709,9 @@ tags: ["mytag"]
 -- content/tags/_content.gotmpl --
 {{ .AddPage (dict "path" "mothertag" "title" "My title" "kind" "term") }}
 --
--- layouts/_default/taxonomy.html --
+-- layouts/taxonomy.html --
 Terms: {{ range .Data.Terms.ByCount }}{{ .Name }}: {{ .Count }}|{{ end }}§s
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 `
 
index 942e231a86ecd90123eeec7dd53832e06dc6ae3d..0b74a0ea58d98a250162550fcef45914b228cb2d 100644 (file)
@@ -58,7 +58,7 @@ Content.
        }
 
        files += `
--- layouts/index.html --
+-- layouts/home.html --
 {{ $pag := $.Paginator }}
 Total: {{ $pag.TotalPages }}
 First: {{ $pag.First.URL }}
@@ -179,7 +179,7 @@ func TestPaginatorEmptyPageGroups(t *testing.T) {
 baseURL = "https://example.com/"
 -- content/p1.md --
 -- content/p2.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $empty := site.RegularPages | complement site.RegularPages }}
 Len: {{ len $empty }}: Type: {{ printf "%T" $empty }}
 {{ $pgs := $empty.GroupByPublishDate "January 2006" }}
@@ -197,7 +197,7 @@ func TestPaginatorNodePagesOnly(t *testing.T) {
 [pagination]
 pagerSize = 1
 -- content/p1.md --
--- layouts/_default/single.html --
+-- layouts/single.html --
 Paginator: {{ .Paginator }}
 `
        b, err := TestE(t, files)
@@ -209,7 +209,7 @@ func TestNilPointerErrorMessage(t *testing.T) {
        files := `
 -- hugo.toml --        
 -- content/p1.md --
--- layouts/_default/single.html --
+-- layouts/single.html --
 Home Filename: {{ site.Home.File.Filename }}
 `
        b, err := TestE(t, files)
index 2fa4f77528365c5e1322b325513207862d2c89d1..344e862f2134f7a3606d5f8fccad7d210205f42f 100644 (file)
@@ -44,7 +44,7 @@ params:
    a: "p1-a"
    summary: "params.summary"
 ---    
--- layouts/_default/single.html --
+-- layouts/single.html --
 Params: {{ range $k, $v := .Params }}{{ $k }}: {{ $v }}|{{ end }}$
 Summary: {{ .Summary }}|
 `
@@ -69,7 +69,7 @@ baseURL = "https://example.org/"
 title: "P1"
 build: "foo"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Params: {{ range $k, $v := .Params }}{{ $k }}: {{ $v }}|{{ end }}$
 `
        b, err := TestE(t, files)
index c79bc5c5783fd3dfaed19469753b5c5abfcbab11..751547f1224063455a8964a8d6caedb711ab212f 100644 (file)
@@ -80,21 +80,21 @@ Assets My Text.
 Assets My Shortcode Text.
 -- assets/myothertext.txt --
 Assets My Other Text.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}$
 Resources: {{ range $i, $e := .Resources }}{{ $i }}:{{ .RelPermalink }}|{{ .Content }}|{{ end }}$
 Len Resources: {{ len .Resources }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .Content }}$
 Len Resources: {{ len .Resources }}|
 Resources: {{ range $i, $e := .Resources }}{{ $i }}:{{ .RelPermalink }}|{{ .Content }}|{{ end }}$
--- layouts/shortcodes/foo.html --
+-- layouts/_shortcodes/foo.html --
 Foo.
--- layouts/shortcodes/myshortcodetext.html --
+-- layouts/_shortcodes/myshortcodetext.html --
 {{ warnf "mytext %s" now}}
 {{ $r := resources.Get "myshortcodetext.txt" }}
 My Shortcode Text: {{ $r.Content }}|{{ $r.Permalink }}|
--- layouts/_default/_markup/render-codeblock-myothertext.html --
+-- layouts/_markup/render-codeblock-myothertext.html --
 {{ $r := resources.Get "myothertext.txt" }}
 My Other Text: {{ $r.Content }}|{{ $r.Permalink }}|
 
@@ -181,7 +181,7 @@ disableKinds = ["taxonomy", "term", "sitemap", "robotsTXT", "404", "rss"]
 -- content/mybundle/index.md --
 -- content/mybundle/mydata.yml --
 foo: bar
--- layouts/_default/single.html --
+-- layouts/single.html --
 MyData: {{ .Resources.Get "mydata.yml" | transform.Unmarshal }}|
 `
        b := TestRunning(t, files)
@@ -298,7 +298,7 @@ disableLiveReload = true
 ---
 title: "P1"
 ---
--- layouts/index.html --
+-- layouts/home.html --
 Pages: {{ range .Site.RegularPages }}{{ .RelPermalink }}|{{ end }}$
 `
        b := TestRunning(t, files)
@@ -357,7 +357,7 @@ weight = 13
 -- content/foo/p1.h.md --
 -- content/foo/p1.i.md --
 -- content/foo/p1.j.md --
--- layouts/index.html --
+-- layouts/home.html --
 RegularPages: {{ range .Site.RegularPages }}{{ .RelPermalink }}|{{ end }}$
 `
        b := TestRunning(t, files)
@@ -410,9 +410,9 @@ disableLiveReload = true
 title: "P1"
 weight: 1
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
--- layouts/index.html --
+-- layouts/home.html --
 Pages: {{ range .RegularPages }}{{ .RelPermalink }}|{{ end }}$
 `
 
@@ -433,9 +433,9 @@ disableLiveReload = true
 title: "P1"
 weight: 1
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
--- layouts/index.html --
+-- layouts/home.html --
 Pages: {{ range .RegularPages }}{{ .RelPermalink }}|{{ end }}$
 `
 
@@ -459,11 +459,11 @@ outputs: ["html", "json"]
 P1 Content.
 
 {{< myshort >}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single HTML: {{ .Title }}|{{ .Content }}|
--- layouts/_default/single.json --
+-- layouts/single.json --
 Single JSON: {{ .Title }}|{{ .Content }}|
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 My short.
 `
        b := Test(t, files, TestOptRunning())
@@ -471,12 +471,12 @@ My short.
        b.AssertRenderCountContent(1)
        b.AssertFileContent("public/p1/index.html", "Single HTML: P1|<p>P1 Content.</p>\n")
        b.AssertFileContent("public/p1/index.json", "Single JSON: P1|<p>P1 Content.</p>\n")
-       b.EditFileReplaceAll("layouts/_default/single.html", "Single HTML", "Single HTML Edited").Build()
+       b.EditFileReplaceAll("layouts/single.html", "Single HTML", "Single HTML Edited").Build()
        b.AssertFileContent("public/p1/index.html", "Single HTML Edited: P1|<p>P1 Content.</p>\n")
        b.AssertRenderCountPage(1)
 
        // Edit shortcode. Note that this is reused across all output formats.
-       b.EditFileReplaceAll("layouts/shortcodes/myshort.html", "My short", "My short edited").Build()
+       b.EditFileReplaceAll("layouts/_shortcodes/myshort.html", "My short", "My short edited").Build()
        b.AssertFileContent("public/p1/index.html", "My short edited")
        b.AssertFileContent("public/p1/index.json", "My short edited")
        b.AssertRenderCountPage(3) // rss (uses .Content) + 2 single pages.
@@ -489,17 +489,17 @@ title = "Hugo Site"
 baseURL = "https://example.com"
 disableKinds = ["term", "taxonomy"]
 disableLiveReload = true
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Baseof: {{ .Title }}|
 {{ block "main" . }}default{{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 Home: {{ .Title }}|{{ .Content }}|
 {{ end }}
 `
        testRebuildBothWatchingAndRunning(t, files, func(b *IntegrationTestBuilder) {
                b.AssertFileContent("public/index.html", "Baseof: Hugo Site|", "Home: Hugo Site||")
-               b.EditFileReplaceFunc("layouts/_default/baseof.html", func(s string) string {
+               b.EditFileReplaceFunc("layouts/baseof.html", func(s string) string {
                        return strings.Replace(s, "Baseof", "Baseof Edited", 1)
                }).Build()
                b.AssertFileContent("public/index.html", "Baseof Edited: Hugo Site|", "Home: Hugo Site||")
@@ -520,7 +520,7 @@ disableLiveReload = true
 title: "P1"
 ---
 P1 Content.
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 -- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
@@ -557,22 +557,22 @@ title: "P1"
 ---
 P1 Content.
 [foo](/foo)
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Baseof: {{ .Title }}|
 {{ block "main" . }}default{{ end }}
 {{ with (templates.Defer (dict "foo" "bar")) }}
 Defer.
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 Home.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 Single: {{ .Title }}|{{ .Content }}|
 {{ end }}
 `
        b := Test(t, files, TestOptRunning())
        b.AssertFileContent("public/p1/index.html", "Single: P1|")
-       b.EditFileReplaceFunc("layouts/_default/single.html", func(s string) string {
+       b.EditFileReplaceFunc("layouts/single.html", func(s string) string {
                return strings.Replace(s, "Single", "Single Edited", 1)
        }).Build()
        b.AssertFileContent("public/p1/index.html", "Single Edited")
@@ -593,15 +593,15 @@ title: "P1"
 ---
 P1 Content.
 [foo](/foo)
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Baseof: {{ .Title }}|
 {{ block "main" . }}default{{ end }}
 {{ with (templates.Defer (dict "foo" "bar")) }}
 Defer.
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 Home.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 Single: {{ .Title }}|{{ .Content }}|
 {{ end }}
@@ -609,7 +609,7 @@ Single: {{ .Title }}|{{ .Content }}|
        b := Test(t, files, TestOptRunning())
        b.AssertFileContent("public/p1/index.html", "Single: P1|")
        fmt.Println("===============")
-       b.EditFileReplaceAll("layouts/_default/baseof.html", "Baseof", "Baseof Edited").Build()
+       b.EditFileReplaceAll("layouts/baseof.html", "Baseof", "Baseof Edited").Build()
        b.AssertFileContent("public/p1/index.html", "Baseof Edited")
 }
 
@@ -628,7 +628,7 @@ title: "P1"
 ---
 P1 Content.
 [foo](/foo)
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Baseof: {{ .Title }}|
 {{ block "main" . }}default{{ end }}
  {{ with (templates.Defer (dict "foo" "bar")) }}
@@ -638,12 +638,12 @@ Defer.
 {{ define "main" }}
 Single: {{ .Title }}|{{ .Content }}|
 {{ end }}
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 Render Link.
 `
        b := Test(t, files, TestOptRunning())
        // Edit render hook.
-       b.EditFileReplaceAll("layouts/_default/_markup/render-link.html", "Render Link", "Render Link Edited").Build()
+       b.EditFileReplaceAll("layouts/_markup/render-link.html", "Render Link", "Render Link Edited").Build()
 
        b.AssertFileContent("public/p1/index.html", "Render Link Edited")
 }
@@ -668,12 +668,12 @@ layout: "l2"
 P2 Content.
 -- assets/mytext.txt --
 My Text
--- layouts/_default/l1.html --
+-- layouts/l1.html --
 {{ $r := partial "get-resource.html" . }}
 L1: {{ .Title }}|{{ .Content }}|R: {{ $r.Content }}|
--- layouts/_default/l2.html --
+-- layouts/l2.html --
 L2.
--- layouts/partials/get-resource.html --
+-- layouts/_partials/get-resource.html --
 {{ $mytext := resources.Get "mytext.txt" }}
 {{ $txt := printf "Text: %s" $mytext.Content }}
 {{ $r := resources.FromString "r.txt"  $txt }}
@@ -727,11 +727,11 @@ title: "P6"
 ---
 title: "P7"
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Next: {{ with  .PrevInSection }}{{ .Title }}{{ end }}|
 Prev: {{ with  .NextInSection }}{{ .Title }}{{ end }}|
 
@@ -919,19 +919,19 @@ P7 EN Content.
 title: "P7 NN"
 ---
 P7 NN Content.
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ .Title }}|{{ .Content }}|
 RegularPages: {{ range .RegularPages }}{{ .RelPermalink }}|{{ end }}$
 Len RegularPagesRecursive: {{ len .RegularPagesRecursive }}
 Site.Lastmod: {{ .Site.Lastmod.Format "2006-01-02" }}|
 Paginate: {{ range (.Paginate .Site.RegularPages).Pages }}{{ .RelPermalink }}|{{ .Title }}|{{ end }}$
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: .Site: {{ .Site }} 
 Single: {{ .Title }}|{{ .Content }}|
 Single Partial Cached: {{ partialCached "pcached" . }}|
 Page.Lastmod: {{ .Lastmod.Format "2006-01-02" }}|
 Cascade param: {{ .Params.cascadeparam }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .Content }}|
 RegularPages: {{ range .RegularPages }}{{ .Title }}|{{ end }}$
 Len RegularPagesRecursive: {{ len .RegularPagesRecursive }}
@@ -939,11 +939,11 @@ RegularPagesRecursive: {{ range .RegularPagesRecursive }}{{ .RelPermalink }}|{{
 List Partial P1: {{ partial "p1" . }}|
 Page.Lastmod: {{ .Lastmod.Format "2006-01-02" }}|
 Cascade param: {{ .Params.cascadeparam }}|
--- layouts/partials/p1.html --
+-- layouts/_partials/p1.html --
 Partial P1.
--- layouts/partials/pcached.html --
+-- layouts/_partials/pcached.html --
 Partial Pcached.
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0)}}
 .Page.Site: {{ .Page.Site }} :: site: {{ site }}
 {{ with $p }}
@@ -951,7 +951,7 @@ Shortcode Include: {{ .Title }}|
 {{ end }}
 Shortcode .Page.Title: {{ .Page.Title }}|
 Shortcode Partial P1: {{ partial "p1" . }}|
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 {{ $p := site.GetPage (.Attributes.page)}}
 {{ with $p }}
 Codeblock Include: {{ .Title }}|
@@ -1046,26 +1046,26 @@ Codeblock Include: {{ .Title }}|
        b.AssertFileContent("public/en/translations/index.html", "RegularPagesRecursive: /en/translations/p7/")
 
        // Edit shortcode
-       editFile("layouts/shortcodes/include.html", func(s string) string {
+       editFile("layouts/_shortcodes/include.html", func(s string) string {
                return s + "\nShortcode Include Edited."
        })
        b.AssertFileContent("public/mysect/p1/index.html", "Shortcode Include Edited.")
 
        // Edit render hook
-       editFile("layouts/_default/_markup/render-codeblock.html", func(s string) string {
+       editFile("layouts/_markup/render-codeblock.html", func(s string) string {
                return s + "\nCodeblock Include Edited."
        })
        b.AssertFileContent("public/mysect/p1/index.html", "Codeblock Include Edited.")
 
        // Edit partial p1
-       editFile("layouts/partials/p1.html", func(s string) string {
+       editFile("layouts/_partials/p1.html", func(s string) string {
                return strings.Replace(s, "Partial P1", "Partial P1 Edited", 1)
        })
        b.AssertFileContent("public/mysect/index.html", "List Partial P1: Partial P1 Edited.")
        b.AssertFileContent("public/mysect/p1/index.html", "Shortcode Partial P1: Partial P1 Edited.")
 
        // Edit partial cached.
-       editFile("layouts/partials/pcached.html", func(s string) string {
+       editFile("layouts/_partials/pcached.html", func(s string) string {
                return strings.Replace(s, "Partial Pcached", "Partial Pcached Edited", 1)
        })
        b.AssertFileContent("public/mysect/p1/index.html", "Pcached Edited.")
@@ -1142,7 +1142,7 @@ body {
 }
 -- layouts/default/list.html --
 List.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 {{ $css := resources.Get "main.css" | minify }}
 RelPermalink: {{ $css.RelPermalink }}|
@@ -1192,13 +1192,13 @@ title: "P4"
 P4.
 -- assets/js/main.js --
 console.log("Hello");
--- layouts/_default/list.html --
+-- layouts/list.html --
 List. {{ partial "head.html" . }}$
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single. {{ partial "head.html" . }}$
--- layouts/partials/head.html --
+-- layouts/_partials/head.html --
 {{ partialCached "js.html" . }}$
--- layouts/partials/js.html --
+-- layouts/_partials/js.html --
 {{ $js := resources.Get "js/main.js" | js.Build | fingerprint }}
 RelPermalink: {{ $js.RelPermalink }}|
 `
@@ -1227,14 +1227,14 @@ disableKinds = ["term", "taxonomy", "sitemap", "robotsTXT", "404", "rss"]
 disableLiveReload = true
 -- assets/js/main.js --
 console.log("Hello");
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Base. {{ partial "common/head.html" . }}$
 {{ block "main" . }}default{{ end }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ define "main" }}main{{ end }}
--- layouts/partials/common/head.html --
+-- layouts/_partials/common/head.html --
 {{ partial "myfiles/js.html" . }}$
--- layouts/partials/myfiles/js.html --
+-- layouts/_partials/myfiles/js.html --
 {{ $js := resources.Get "js/main.js" | js.Build | fingerprint }}
 RelPermalink: {{ $js.RelPermalink }}|
 `
@@ -1280,24 +1280,24 @@ layout: "plain"
 console.log("Hello");
 -- content/foo.js --
 console.log("Foo");
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $js := site.Home.Resources.Get "main.js"  }}
 {{ with $js }}
 <script src="{{ .RelPermalink }}"></script>
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single. Deliberately no .Content in here.
--- layouts/_default/plain.html --
+-- layouts/plain.html --
 Content: {{ .Content }}|
--- layouts/_default/main.html --
+-- layouts/main.html --
 {{ $js := site.Home.Resources.Get "main.js"  }}
 {{ with $js }}
 <script>
 {{ .Content }}
 </script>
 {{ end }}
--- layouts/shortcodes/jsfingerprinted.html --
+-- layouts/_shortcodes/jsfingerprinted.html --
 {{ $js := site.Home.Resources.Get "foo.js" | fingerprint  }}
 <script src="{{ $js.RelPermalink }}"></script>
 `
@@ -1368,13 +1368,13 @@ title: "P1"
 ---
 
 Foo inline: {{< foo.inline >}}{{ site.Data.mydata.foo }}|{{< /foo.inline >}}
--- layouts/shortcodes/data.html --
+-- layouts/_shortcodes/data.html --
 {{ $path := split (.Get 0) "." }}
 {{ $data := index site.Data $path }}
 Foo: {{ $data }}|
--- layouts/index.html --
+-- layouts/home.html --
 Content: {{ .Content }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Content }}|
 `
        b := TestRunning(t, files)
@@ -1400,7 +1400,7 @@ disableLiveReload = true
 title: "Home"
 ---
 Home.
--- layouts/index.html --
+-- layouts/home.html --
 Content: {{ .Content }}
 `
        b := TestRunning(t, files)
@@ -1436,9 +1436,9 @@ disableKinds = ["taxonomy", "term", "sitemap", "robotsTXT", "404"]
 title: "Home"
 ---
 Home.
--- layouts/index.html --
+-- layouts/home.html --
 Home.
--- layouts/_default/index.searchindex.txt --
+-- layouts/index.searchindex.txt --
 Text. {{ .Title }}|{{ .RelPermalink }}|
 
 `
@@ -1446,7 +1446,7 @@ Text. {{ .Title }}|{{ .RelPermalink }}|
 
        b.AssertFileContent("public/search.txt", "Text.")
 
-       b.EditFileReplaceAll("layouts/_default/index.searchindex.txt", "Text.", "Text Edited.").Build()
+       b.EditFileReplaceAll("layouts/index.searchindex.txt", "Text.", "Text Edited.").Build()
 
        b.BuildPartial("/docs/search.txt")
 
@@ -1460,7 +1460,7 @@ func TestRebuildVariationsAssetsJSImport(t *testing.T) {
 baseURL = "https://example.com"
 disableKinds = ["term", "taxonomy"]
 disableLiveReload = true
--- layouts/index.html --
+-- layouts/home.html --
 Home. {{ now }}
 {{ with (resources.Get "js/main.js" | js.Build | fingerprint) }}
 <script>{{ .Content | safeJS }}</script>
@@ -1529,28 +1529,28 @@ title: "P3"
 layout: "foo"
 ---
 {{< notfingerprinted >}}
--- layouts/shortcodes/fingerprinted.html --
+-- layouts/_shortcodes/fingerprinted.html --
 Fingerprinted.
 {{ $opts := dict "inlineImports" true "noMap" true }}
 {{ with (resources.Get "css/main.css" | postCSS $opts | fingerprint) }}
 <style src="{{ .RelPermalink }}"></style>
 {{ end }}
--- layouts/shortcodes/notfingerprinted.html --
+-- layouts/_shortcodes/notfingerprinted.html --
 Fingerprinted.
 {{ $opts := dict "inlineImports" true "noMap" true }}
 {{ with (resources.Get "css/main.css" | postCSS $opts) }}
 <style src="{{ .RelPermalink }}"></style>
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $opts := dict "inlineImports" true "noMap" true }}
 {{ with (resources.Get "css/main.css" | postCSS $opts) }}
 <style>{{ .Content | safeCSS }}</style>
 {{ end }}
--- layouts/_default/foo.html --
+-- layouts/foo.html --
 Foo.
 {{ .Title }}|{{ .Content }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 {{ $opts := dict "inlineImports" true "noMap" true }}
 {{ with (resources.Get "css/main.css" | postCSS $opts) }}
@@ -1592,7 +1592,7 @@ baseURL = "https://example.com"
 disableLiveReload = true
 -- i18n/en.toml --
 hello = "Hello"
--- layouts/index.html --
+-- layouts/home.html --
 Hello: {{ i18n "hello" }}
 `
 
@@ -1643,7 +1643,7 @@ title: "B nn"
 B nn.
 -- content/p1/f1.nn.txt --
 F1 nn
--- layouts/_default/all.html --
+-- layouts/all.html --
 All: {{ .Title }}|{{ .Kind }}|{{ .Content }}|Bundled File: {{ with .Resources.GetMatch "f1.*" }}{{ .Content }}{{ end }}|Bundled Page: {{ with .Resources.GetMatch "b.*" }}{{ .Content }}{{ end }}|
 `
 
@@ -1683,7 +1683,7 @@ title: "P1 en"
 title: "P1 nn"
 ---
 P1 nn.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
 `
 
@@ -1710,7 +1710,7 @@ body {
 }
 -- assets/css/main.scss --
 @import "lib/foo";
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $opts := dict "transpiler" "TRANSPILER" }}
 {{ with (resources.Get "css/main.scss" | toCSS $opts) }}
@@ -1756,9 +1756,9 @@ func benchmarkFilesEdit(count int) string {
 baseURL = "https://example.com"
 disableKinds = ["term", "taxonomy"]
 disableLiveReload = true
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .Content }}|
 -- content/mysect/_index.md --
 ---
@@ -1815,7 +1815,7 @@ c
 c1
 -- assets/common/c2.css --
 c2
--- layouts/index.html --
+-- layouts/home.html --
 {{ $a := resources.Get "a.css" }}
 {{ $b := resources.Get "b.css" }}
 {{ $common := resources.Match "common/*.css" | resources.Concat "common.css" | minify }}
@@ -1856,9 +1856,9 @@ func TestRebuildEditMixedCaseTemplateFileIssue12165(t *testing.T) {
 -- hugo.toml --
 baseURL = "https://example.com"
 disableLiveReload = true
--- layouts/partials/MyTemplate.html --
+-- layouts/_partials/MyTemplate.html --
 MyTemplate
--- layouts/index.html --
+-- layouts/home.html --
 MyTemplate: {{ partial "MyTemplate.html" . }}|
 
 
@@ -1868,7 +1868,7 @@ MyTemplate: {{ partial "MyTemplate.html" . }}|
 
        b.AssertFileContent("public/index.html", "MyTemplate: MyTemplate")
 
-       b.EditFileReplaceAll("layouts/partials/MyTemplate.html", "MyTemplate", "MyTemplate Edited").Build()
+       b.EditFileReplaceAll("layouts/_partials/MyTemplate.html", "MyTemplate", "MyTemplate Edited").Build()
 
        b.AssertFileContent("public/index.html", "MyTemplate: MyTemplate Edited")
 }
@@ -1949,7 +1949,7 @@ P1 Content.
 title: "P2"
 ---
 P2 Content.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
 `
        b := TestRunning(t, files)
@@ -1972,9 +1972,9 @@ func TestRebuildEditSingleListChangeUbuntuIssue12362(t *testing.T) {
 -- hugo.toml --
 disableKinds = ['rss','section','sitemap','taxonomy','term']
 disableLiveReload = true
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ range .Pages }}{{ .Title }}|{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 -- content/p1.md --
 ---
@@ -1997,9 +1997,9 @@ func TestRebuildHomeThenPageIssue12436(t *testing.T) {
 baseURL = "https://example.com"
 disableKinds = ['sitemap','taxonomy','term']
 disableLiveReload = true
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Content }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/_index.md --
 ---
index d8b51d3ed47945c570fa73211f92f9fd4a8e89c5..a961680a96ebe782c373e2f2e5d83d0608d47930 100644 (file)
@@ -50,16 +50,16 @@ title: "p3"
 ### p3-h2
 {{% withmarkdown %}}
 {{< level3 >}}
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0) }}
 {{ $p.RenderShortcodes }}
--- layouts/shortcodes/withhtml.html --
+-- layouts/_shortcodes/withhtml.html --
 <div>{{ .Page.Title }} withhtml</div>
--- layouts/shortcodes/withmarkdown.html --
+-- layouts/_shortcodes/withmarkdown.html --
 #### {{ .Page.Title }} withmarkdown
--- layouts/shortcodes/level3.html --
+-- layouts/_shortcodes/level3.html --
 Level 3: {{ .Page.Title }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Fragments: {{ .Fragments.Identifiers }}|
 HasShortcode Level 1: {{ .HasShortcode "include" }}|
 HasShortcode Level 2: {{ .HasShortcode "withmarkdown" }}|
@@ -100,16 +100,16 @@ title: "p2"
 ---
 ### p2-h1
 {{% myshort %}}
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0) }}
 {{ $p.RenderShortcodes }}
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 Myshort HTML.
--- layouts/shortcodes/myshort.json --
+-- layouts/_shortcodes/myshort.json --
 Myshort JSON.
--- layouts/_default/single.html --
+-- layouts/single.html --
 HTML: {{ .Content }}
--- layouts/_default/single.json --
+-- layouts/single.json --
 JSON: {{ .Content }}
 
 
@@ -141,19 +141,19 @@ title: "p2"
 ---
 ### p2-h1
 {{% myshort %}}
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0) }}
 {{ $p.RenderShortcodes }}
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 Myshort Original.
--- layouts/_default/single.html --
+-- layouts/single.html --
  {{ .Content }}
 `
        b := TestRunning(t, files)
        b.AssertNoRenderShortcodesArtifacts()
        b.AssertFileContent("public/p1/index.html", "Myshort Original.")
 
-       b.EditFileReplaceAll("layouts/shortcodes/myshort.html", "Original", "Edited").Build()
+       b.EditFileReplaceAll("layouts/_shortcodes/myshort.html", "Original", "Edited").Build()
        b.AssertNoRenderShortcodesArtifacts()
        b.AssertFileContent("public/p1/index.html", "Myshort Edited.")
 }
@@ -177,12 +177,12 @@ title: "p2"
 ---
 ### Original
 {{% myshort %}}
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0) }}
 {{ $p.RenderShortcodes }}
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 Myshort Original.
--- layouts/_default/single.html --
+-- layouts/single.html --
  {{ .Content }}
 
 
@@ -227,12 +227,12 @@ title: "p2"
 ---
 ### Original
 {{% myshort %}}
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := .Page.GetPage (.Get 0) }}
 {{ $p.RenderShortcodes }}
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 Myshort Original.
--- layouts/_default/list.html --
+-- layouts/list.html --
  {{ .Content }}
 
 
@@ -253,20 +253,20 @@ func TestRenderShortcodesNestedPageContextIssue12356(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ["taxonomy", "term", "rss", "sitemap", "robotsTXT", "404"]
--- layouts/_default/_markup/render-image.html --
+-- layouts/_markup/render-image.html --
 {{- with .PageInner.Resources.Get .Destination -}}Image: {{ .RelPermalink }}|{{- end -}}
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 {{- with .PageInner.GetPage .Destination -}}Link: {{ .RelPermalink }}|{{- end -}}
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 Heading: {{ .PageInner.Title }}: {{ .PlainText }}|
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 CodeBlock: {{ .PageInner.Title }}: {{ .Type }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 Content:{{ .Content }}|
 Fragments: {{ with .Fragments }}{{.Identifiers }}{{ end }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content:{{ .Content }}|
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ with site.GetPage (.Get 0) }}
   {{ .RenderShortcodes }}
 {{ end }}
@@ -364,11 +364,11 @@ title: "p1"
 title: "p2"
 ---
 Hello <b>world</b>. Some **bold** text. Some Unicode: 神真美好.
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ with site.GetPage (.Get 0) }}
 <div>{{ .RenderShortcodes }}</div>
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -421,13 +421,13 @@ title: "p3"
 §§§ php
 code_p3
 §§§
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ with site.GetPage (.Get 0) -}}
 {{ .RenderShortcodes -}}
 {{ end -}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 <code>{{ .Inner | safeHTML }}</code>
 `
 
@@ -467,10 +467,10 @@ title: "p2"
 ### p2-h1
 
 This is some **markup**.
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0) -}}
 {{ $p.RenderShortcodes -}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
        b := TestRunning(t, files)
@@ -488,11 +488,11 @@ func TestRenderShortcodesEmptyParagraph(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['section','rss','sitemap','taxonomy','term']
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{ .Content }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
  {{ with site.GetPage (.Get 0) }}
   {{ .RenderShortcodes }}
 {{ end }}
index e72ced2f9fd656c3b6965755bee50f3b57507686..80dd5d842e901c9da520fc7598d834008f8990fe 100644 (file)
@@ -25,7 +25,7 @@ func TestRenderString(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p := site.GetPage "p1.md" }}
 {{ $optBlock := dict "display" "block" }}
 {{ $optOrg := dict "markup" "org" }}
@@ -33,7 +33,7 @@ RSTART:{{ "**Bold Markdown**" | $p.RenderString }}:REND
 RSTART:{{  "**Bold Block Markdown**" | $p.RenderString  $optBlock }}:REND
 RSTART:{{  "/italic org mode/" | $p.RenderString  $optOrg }}:REND
 RSTART:{{ "## Header2" | $p.RenderString }}:REND
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 Hook Heading: {{ .Level }}
 -- content/p1.md --
 ---
@@ -57,11 +57,11 @@ func TestRenderStringOnListPage(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ .RenderString "**Hello**" }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .RenderString "**Hello**" }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .RenderString "**Hello**" }}
 -- content/mysection/p1.md --
 FOO
@@ -86,7 +86,7 @@ func TestRenderStringOnPageNotBackedByAFile(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ["page", "section", "taxonomy", "term"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ .RenderString "**Hello**" }}
 -- content/p1.md --
 `
@@ -106,18 +106,18 @@ enableInlineShortcodes = true
 title: "P1"
 ---
 ## First
--- layouts/shortcodes/mark1.md --
+-- layouts/_shortcodes/mark1.md --
 {{ .Inner }}
--- layouts/shortcodes/mark2.md --
+-- layouts/_shortcodes/mark2.md --
 1. Item Mark2 1
 1. Item Mark2 2
    1. Item Mark2 2-1
 1. Item Mark2 3
--- layouts/shortcodes/myhthml.html --
+-- layouts/_shortcodes/myhthml.html --
 Title: {{ .Page.Title }}
 TableOfContents: {{ .Page.TableOfContents }}
 Page Type: {{ printf "%T" .Page }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .RenderString "Markdown: {{% mark2 %}}|HTML: {{< myhthml >}}|Inline: {{< foo.inline >}}{{ site.Title }}{{< /foo.inline >}}|" }}
 HasShortcode: mark2:{{ .HasShortcode "mark2" }}:true
 HasShortcode: foo:{{ .HasShortcode "foo" }}:false
@@ -153,7 +153,7 @@ Page Type: *hugolib.pageForShortcode`,
                        },
                ).Build()
 
-               b.EditFiles("layouts/shortcodes/myhthml.html", "Edit shortcode").Build()
+               b.EditFiles("layouts/_shortcodes/myhthml.html", "Edit shortcode").Build()
 
                b.AssertFileContent("public/p1/index.html",
                        `Edit shortcode`,
@@ -167,9 +167,9 @@ func TestRenderStringWithShortcodeInPageWithNoContentFile(t *testing.T) {
 
        files := `
 -- config.toml --
--- layouts/shortcodes/myshort.html --
+-- layouts/_shortcodes/myshort.html --
 Page Kind: {{ .Page.Kind }}
--- layouts/index.html --
+-- layouts/home.html --
 Short: {{ .RenderString "{{< myshort >}}" }}
 Has myshort: {{ .HasShortcode "myshort" }}
 Has other: {{ .HasShortcode "other" }}
@@ -204,11 +204,11 @@ title: "P1"
      {{ not a shortcode
 {{< /noop >}}
 }
--- layouts/shortcodes/noop.html --
+-- layouts/_shortcodes/noop.html --
 {{ .Inner | $.Page.RenderString }}
--- layouts/shortcodes/toc.html --
+-- layouts/_shortcodes/toc.html --
 {{ .Page.TableOfContents }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
index 382de4605e7c089221b08173b5cf7a30c06e10a1..978fa3713766ee18e2011e24aba84b07eac27d1b 100644 (file)
@@ -47,7 +47,7 @@ func TestResourceChainBasic(t *testing.T) {
 baseURL = "http://example.com/"
 -- assets/images/sunset.jpg --
 ` + getTestSunset(t) + `
--- layouts/index.html --
+-- layouts/home.html --
 {{ $hello := "<h1>     Hello World!   </h1>" | resources.FromString "hello.html" | fingerprint "sha512" | minify  | fingerprint }}
 {{ $cssFingerprinted1 := "body {  background-color: lightblue; }" | resources.FromString "styles.css" |  minify  | fingerprint }}
 {{ $cssFingerprinted2 := "body {  background-color: orange; }" | resources.FromString "styles2.css" |  minify  | fingerprint }}
@@ -132,10 +132,10 @@ title: Page1
 ---
 title: Page2
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ $hello := "<h1>     Hello World!   </h1>" | resources.FromString "hello.html" | minify  | fingerprint "md5" | resources.PostProcess }}
 HELLO: {{ $hello.RelPermalink }}       
--- layouts/index.html --
+-- layouts/home.html --
 Start.
 {{ $hello := "<h1>     Hello World!   </h1>" | resources.FromString "hello.html" | minify  | fingerprint "md5" | resources.PostProcess }}
 
@@ -705,7 +705,7 @@ T3: Content: {{ $combinedJs.Content }}|{{ $combinedJs.RelPermalink }}
                
                .content-navigation
                  border-color: $color
--- layouts/index.html --
+-- layouts/home.html --
                {{ $a := "A" | resources.FromString "a.txt"}}
                {{ $b := "B" | resources.FromString "b.txt"}}
                {{ $c := "C" | resources.FromString "c.txt"}}
@@ -1358,7 +1358,7 @@ json2 content
 -- assets/jsons/data3.xml --
 xml content
 -- content/page.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $jsons := (resources.Match "jsons/*.json") }}
 {{ $json := (resources.GetMatch "jsons/*.json") }}
 {{ printf "jsonsMatch: %d"  (len $jsons) }}
@@ -1390,7 +1390,7 @@ disableXML=true
 -- assets/xml/data.xml --
 <root>   <foo> asdfasdf </foo> </root>
 -- content/page.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $xml := resources.Get "xml/data.xml" | minify | fingerprint }}
 XML: {{ $xml.Content | safeHTML }}|{{ $xml.RelPermalink }}
 `
index e04ac6294a7bec03f396da271923ed285eccc9d0..14e4e84717eac1971f38cc47870e6df4d8c76da8 100644 (file)
@@ -72,17 +72,17 @@ disableKinds = ['section','sitemap','taxonomy','term']
 enableDefault = true
 [markup.goldmark.renderHooks.link]
 enableDefault = true
--- layouts/_default/_markup/render-image.html --
+-- layouts/_markup/render-image.html --
 {{- $u := urls.Parse .Destination -}}
 {{- $src := $u.String | relURL -}}
 <img srcset="{{ $src }}" src="{{ $src }} 2x">
 <img src="{{ $src }}">
 {{- /**/ -}}
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{ .Content }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}|
--- layouts/_default/rss.xml --
+-- layouts/rss.xml --
 {{ with site.GetPage "/s1/p2" }}
   {{ .Content | transform.XMLEscape | safeHTML }}
 {{ end }}
index a7639be8b2aa4f9aa407d111d3c522b6851116fa..0656edda50cba3dbfc40fb330c63a5592debc126 100644 (file)
@@ -35,7 +35,7 @@ func TestSecurityPolicies(t *testing.T) {
                files := `
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
 {{ os.Getenv "FOOBAR" }}
 `
                _, err := TestE(c, files)
@@ -48,7 +48,7 @@ baseURL = "https://example.org"
                files := `
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
                {{ os.Getenv "HUGO_FOO" }}
 `
                Test(c, files)
@@ -117,7 +117,7 @@ foo
                files := `
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $scss := "body { color: #333; }" | resources.FromString "foo.scss"  | css.Sass (dict "transpiler" "dartsass") }}
 `
                Test(c, files)
@@ -134,7 +134,7 @@ baseURL = "https://example.org"
 [security]
 [security.exec]
 allow="none"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $scss := "body { color: #333; }" | resources.FromString "foo.scss"  | css.Sass (dict "transpiler" "dartsass") }}
                `
                _, err := TestE(c, files)
@@ -151,7 +151,7 @@ allow="none"
                files := fmt.Sprintf(`
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $json := resources.GetRemote "%s/fruits.json" }}{{ $json.Content }}
 `, ts.URL)
                Test(c, files)
@@ -166,7 +166,7 @@ baseURL = "https://example.org"
                files := fmt.Sprintf(`
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $json := resources.GetRemote "%s/fruits.json" (dict "method" "DELETE" ) }}{{ $json.Content }}
 `, ts.URL)
                _, err := TestE(c, files)
@@ -186,7 +186,7 @@ baseURL = "https://example.org"
 [security]
 [security.http]
 urls="none"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $json := resources.GetRemote "%s/fruits.json" }}{{ $json.Content }}
 `, ts.URL)
                _, err := TestE(c, files)
@@ -204,7 +204,7 @@ urls="none"
 -- hugo.toml --
 baseURL = "https://example.org"
 [security]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $json := resources.GetRemote "%s/fakejson.json" }}{{ $json.Content }}
 `, ts.URL)
                _, err := TestE(c, files)
@@ -224,7 +224,7 @@ baseURL = "https://example.org"
 [security]
 [security.http]
 mediaTypes=["application/json"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $json := resources.GetRemote "%s/fakejson.json" }}{{ $json.Content }}
 `, ts.URL)
                Test(c, files)
index cfdc1a10d6b44e909558b4e416a9191a055652a9..cbe2f84a2cfbae789b08d8c60696284a4ff70688 100644 (file)
@@ -45,9 +45,9 @@ lang = "n*"
 output = "rss"
 [[segments.docs.excludes]]
 output = "json"
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}|{{ .RelPermalink }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}|{{ .RelPermalink }}|
 -- content/docs/_index.md --
 -- content/docs/section1/_index.md --
index 689e121a3e979e3d40d94d09e908338841508f5f..363e5247a5775cb908ccd9fc4479428fe3600b23 100644 (file)
@@ -26,7 +26,7 @@ func TestEncodePage(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
 Page: |{{ index .Site.RegularPages 0 | jsonify }}|
 Site: {{ site | jsonify }}
 -- content/page.md --
index 15529ce2ce2f0823f159605ce23b7abc0f744f3c..0a371b37f9a2f9017dfb3d98cb2ff50441ce03d5 100644 (file)
@@ -92,9 +92,9 @@ C
 ---
 title: "My Bundle"
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 Kind: {{ .Kind }}|RelPermalink: {{ .RelPermalink }}|SectionsPath: {{ .SectionsPath }}|SectionsEntries: {{ .SectionsEntries }}|Len: {{ len .SectionsEntries }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Kind: {{ .Kind }}|RelPermalink: {{ .RelPermalink }}|SectionsPath: {{ .SectionsPath }}|SectionsEntries: {{ .SectionsEntries }}|Len: {{ len .SectionsEntries }}|
 `
 
@@ -114,9 +114,9 @@ baseURL = "https://example.com/"
 -- content/docs/logs/_index.md --
 -- content/docs/logs/sdk.md --
 -- content/docs/logs/sdk_exporters/stdout.md --
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .RelPermalink }}|{{ with .Parent}}{{ .RelPermalink }}{{ end }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .RelPermalink }}|{{ with .Parent}}{{ .RelPermalink }}{{ end }}|
 
 `
index 4183c52a1b149817cebf51d2a226706128be4c5f..79dbfa59a9ee98ed790b5282bdac0655af3cfb6e 100644 (file)
@@ -120,7 +120,7 @@ date: 2023-03-01
 ---
 date: 2023-04-01
 ---
--- layouts/index.html --
+-- layouts/home.html --
 site.Lastmod: {{ .Site.Lastmod.Format "2006-01-02" }}
 home.Lastmod: {{ site.Home.Lastmod.Format "2006-01-02" }}
 
index 7b7a51035fe03427a9fa9271cca54d66d8858f02..76a6d5ef0d19abdab220cc071d2b77cf4249bf27 100644 (file)
@@ -243,9 +243,9 @@ func TestShouldAlwaysHaveUglyURLs(t *testing.T) {
        t.Parallel()
 
        basefiles := `
--- layouts/index.html --
+-- layouts/home.html --
 Home Sweet {{ if.IsHome  }}Home{{ end }}.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{.Content}}{{ if.IsHome  }}This is not home!{{ end }}
 -- layouts/404.html --
 Page Not Found.{{ if.IsHome  }}This is not home!{{ end }}
@@ -331,7 +331,7 @@ disableKinds = ['RSS','sitemap','taxonomy','term']
 [params]
 mainSections=["a", "b"]
 -- content/mysect/page1.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{/* Behaviour before Hugo 0.112.0. */}}
 MainSections Params: {{ site.Params.mainSections }}|
 MainSections Site method: {{ site.MainSections }}|
@@ -358,7 +358,7 @@ mainSections=["a", "b"]
 [params.sub]
 mainSections=["c", "d"]
 -- content/mysect/page1.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{/* Behaviour before Hugo 0.112.0. */}}
 MainSections Params: {{ site.Params.mainSections }}|
 MainSections Param sub: {{ site.Params.sub.mainSections }}|
@@ -383,7 +383,7 @@ MainSections Site method: [a b]|
 -- config.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term']
 -- content/mysect/page1.md --
--- layouts/index.html --
+-- layouts/home.html --
 MainSections Params: {{ site.Params.mainSections }}|
 MainSections Site method: {{ site.MainSections }}|
 
@@ -446,9 +446,9 @@ title: ca
 ---
 title: ca
 ---
--- layouts/index.html --
+-- layouts/home.html --
 Home
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}
 `
 
@@ -470,7 +470,7 @@ minify = %t
 
 [build]
   writeStats = true
--- layouts/index.html --
+-- layouts/home.html --
 
 <div id="el1" class="a b c">Foo</div>
 
@@ -527,7 +527,7 @@ func TestClassCollectorConfigWriteStats(t *testing.T) {
                files := `
 -- hugo.toml --
 ` + writeStatsConfig + `
--- layouts/_default/list.html --
+-- layouts/list.html --
 <div id="myid" class="myclass">Foo</div>
 
 `
index 466d22c59782ac7d823e5306360d7c4b3dca4478..253969a34836405b79d11ba68a9c5c5c787fb8ce 100644 (file)
@@ -22,7 +22,7 @@ func TestSectionsEntries(t *testing.T) {
 -- hugo.toml --
 -- content/withfile/_index.md --
 -- content/withoutfile/p1.md --
--- layouts/_default/list.html --
+-- layouts/list.html --
 SectionsEntries: {{ .SectionsEntries }}
 
 
index 922ecbc12e3980fca3b9b867bdbda8b996592123..d8f10df83b512d69a14b3e48626b0afede41504a 100644 (file)
@@ -157,7 +157,7 @@ func TestSitemapAndContentBundleNamedSitemap(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['home','rss','section','taxonomy','term']
--- layouts/_default/single.html --
+-- layouts/single.html --
 layouts/_default/single.html
 -- layouts/sitemap/single.html --
 layouts/sitemap/single.html
index 232c323b9e14f73d84110c7023f74288d7dab016..fb769a89e8f0e63adee7b0c9a7e253dea1b6c7b7 100644 (file)
@@ -92,10 +92,10 @@ title: "This is T5"
 ---
 title: "This is S3s"
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 Taxonomy List Page 1|{{ .Title }}|Hello|{{ .Permalink }}|
--- layouts/_default/terms.html --
-Taxonomy Term Page 1|{{ .Title }}|Hello|{{ .Permalink }}|
+-- layouts/taxonomy.html --
+Taxonomy Page 1|{{ .Title }}|Hello|{{ .Permalink }}|
 `
 
        b := Test(t, files)
@@ -125,9 +125,9 @@ Taxonomy Term Page 1|{{ .Title }}|Hello|{{ .Permalink }}|
        b.AssertFileContent("public/t1/t2/t3s/t4/t5/index.html", "Taxonomy List Page 1|This is T5|Hello|https://example.com/t1/t2/t3s/t4/t5/|")
        b.AssertFileContent("public/t1/t2/t3s/t4/t5/t6/index.html", "Taxonomy List Page 1|t4/t5/t6|Hello|https://example.com/t1/t2/t3s/t4/t5/t6/|")
 
-       b.AssertFileContent("public/news/categories/index.html", "Taxonomy Term Page 1|categories|Hello|https://example.com/news/categories/|")
-       b.AssertFileContent("public/t1/t2/t3s/index.html", "Taxonomy Term Page 1|t3s|Hello|https://example.com/t1/t2/t3s/|")
-       b.AssertFileContent("public/s1/s2/s3s/index.html", "Taxonomy Term Page 1|This is S3s|Hello|https://example.com/s1/s2/s3s/|")
+       b.AssertFileContent("public/news/categories/index.html", "Taxonomy Page 1|categories|Hello|https://example.com/news/categories/|")
+       b.AssertFileContent("public/t1/t2/t3s/index.html", "Taxonomy Page 1|t3s|Hello|https://example.com/t1/t2/t3s/|")
+       b.AssertFileContent("public/s1/s2/s3s/index.html", "Taxonomy Page 1|This is S3s|Hello|https://example.com/s1/s2/s3s/|")
 }
 
 // https://github.com/gohugoio/hugo/issues/5719
@@ -147,14 +147,14 @@ Content.
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/index.html --
+-- layouts/home.html --
 <h1>Tags</h1>
 <ul>
     {{ range .Site.Taxonomies.tags }}
             <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
     {{ end }}
 </ul>
--- layouts/_default/terms.html --
+-- layouts/taxonomy.html --
 <h1>Terms</h1>
 <ul>
     {{ range .Data.Terms.Alphabetical }}
@@ -181,7 +181,7 @@ func TestTaxonomiesNotForDrafts(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/_default/list.html --
+-- layouts/list.html --
 List page.
 -- content/draft.md --
 ---
@@ -228,7 +228,7 @@ categories: ["cool"]
 ---
 
 Content.
--- layouts/index.html --
+-- layouts/home.html --
 {{ range .Site.Pages }}
 {{ .RelPermalink }}|{{ .Title }}|{{ .WordCount }}|{{ .Content }}|
 {{ end }}
@@ -267,7 +267,7 @@ categories: ["cool"]
 ---
 
 Content.
--- layouts/index.html --
+-- layouts/home.html --
 NO HOME FOR YOU
 `
 
@@ -285,7 +285,7 @@ func TestTaxonomiesWithBundledResources(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/_default/list.html --
+-- layouts/list.html --
 List {{ .Title }}:
 {{ range .Resources }}
 Resource: {{ .RelPermalink }}|{{ .MediaType }}
@@ -319,7 +319,7 @@ func TestTaxonomiesRemoveOne(t *testing.T) {
        files := `
 -- hugo.toml --
 disableLiveReload = true
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cats := .Site.Taxonomies.categories.cats }}
 {{ if $cats }}
 Len cats: {{ len $cats }}
@@ -380,7 +380,7 @@ func TestTaxonomiesListPages(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ template "print-taxo" "categories.cats" }}
 {{ template "print-taxo" "categories.funny" }}
 
@@ -432,7 +432,7 @@ func TestTaxonomiesPageCollections(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $home := site.Home }}
 {{ $section := site.GetPage "section" }}
 {{ $categories := site.GetPage "categories" }}
@@ -510,7 +510,7 @@ titleCaseStyle = "none"
   abcdef = "abcdefs"
   abcdefg = "abcdefgs"
   abcdefghi = "abcdefghis"
--- layouts/index.html --
+-- layouts/home.html --
 {{ range site.Pages }}Page: {{ template "print-page" . }}
 {{ end }}
 {{ $abc := site.GetPage "abcdefgs/abc" }}
@@ -563,7 +563,7 @@ title: "abcdefghijk"
 
 func TestTaxonomiesWeightSort(t *testing.T) {
        files := `
--- layouts/index.html --
+-- layouts/home.html --
 {{ $a := site.GetPage "tags/a"}}
 :{{ range $a.Pages }}{{ .RelPermalink }}|{{ end }}:
 -- content/p1.md --
@@ -606,7 +606,7 @@ tag = 'tags'
 title = "P1"
 tags = ''
 +++
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 
 `
@@ -627,7 +627,7 @@ book authors:
   - Neil Gaiman
   - Terry Pratchett
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{- $taxonomy := "book authors" }}
 Len Book Authors: {{ len (index .Site.Taxonomies $taxonomy) }}
 `
@@ -686,7 +686,7 @@ tag = "tags"
 title: "Home"
 tags: ["hellO world"]
 ---
--- layouts/_default/term.html --
+-- layouts/term.html --
 {{ .Title }}|{{ .Kind }}|{{ .Data.Singular }}|{{ .Data.Plural }}|{{ .Page.Data.Term }}|
 `
 
@@ -699,7 +699,7 @@ func TestTermDraft(t *testing.T) {
        t.Parallel()
 
        files := `
--- layouts/_default/list.html --
+-- layouts/list.html --
 |{{ .Title }}|
 -- content/p1.md --
 ---
@@ -722,7 +722,7 @@ func TestTermBuildNeverRenderNorList(t *testing.T) {
        t.Parallel()
 
        files := `
--- layouts/index.html --
+-- layouts/home.html --
 |{{ len site.Taxonomies.tags }}|
 -- content/p1.md --
 ---
@@ -779,10 +779,10 @@ func TestTaxonomyLookupIssue12193(t *testing.T) {
 disableKinds = ['page','rss','section','sitemap']
 [taxonomies]
 author = 'authors'
--- layouts/_default/list.html --
-{{ .Title }}|
--- layouts/_default/author.terms.html --
-layouts/_default/author.terms.html
+-- layouts/list.html --
+list.html
+-- layouts/authors/taxonomy.html --
+authors/taxonomy.html
 -- content/authors/_index.md --
 ---
 title: Authors Page
@@ -793,7 +793,7 @@ title: Authors Page
 
        b.AssertFileExists("public/index.html", true)
        b.AssertFileExists("public/authors/index.html", true)
-       b.AssertFileContent("public/authors/index.html", "layouts/_default/author.terms.html") // failing test
+       b.AssertFileContent("public/authors/index.html", "authors/taxonomy.html")
 }
 
 func TestTaxonomyNestedEmptySectionsIssue12188(t *testing.T) {
@@ -810,9 +810,9 @@ weight = 1
 weight = 2
 [taxonomies]
 's1/category' = 's1/category'
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|
 -- content/s1/p1.en.md --
 ---
@@ -840,9 +840,9 @@ baseURL = "https://example.com"
 disableKinds = ["RSS", "sitemap", "section"]
 [taxononomies]
 tag = "tags"
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
--- layouts/_default/single.html --
+-- layouts/single.html --
 GetTerms.tags: {{ range .GetTerms "tags" }}{{ .Title }}|{{ end }}
 -- content/_index.md --
 `
index 769c69defec3fef8f80819cf14fb680676dfe549..1a03a41e5750d78adf8d373c78d2786c49e3d890 100644 (file)
@@ -28,10 +28,10 @@ func TestTemplateBOM(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 ` + bom + `
                Base: {{ block "main" . }}base main{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 ` + bom + `{{ define "main" }}Hi!?{{ end }}
 -- content/page.md --
 ---
@@ -71,12 +71,12 @@ layout: "layout%d"
 Content.
 `, id, id))
 
-               b.WriteString(fmt.Sprintf("-- layouts/_default/layout%d.html --\n", id))
+               b.WriteString(fmt.Sprintf("-- layouts/layout%d.html --\n", id))
                b.WriteString(fmt.Sprintf(`
 {{ define "main" }}%d{{ end }}
 `, id))
 
-               b.WriteString(fmt.Sprintf("-- layouts/_default/layout%d-baseof.html --\n", id))
+               b.WriteString(fmt.Sprintf("-- layouts/layout%d-baseof.html --\n", id))
                b.WriteString(fmt.Sprintf(`
 Base %d: {{ block "main" . }}FOO{{ end }}
 `, id))
@@ -99,13 +99,13 @@ func TestTemplateNoBasePlease(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ define "main" }}
   Bonjour
 {{ end }}
 
 {{ printf "list" }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ printf "single" }}
 {{ define "main" }}
   Bonjour
@@ -136,7 +136,7 @@ func TestTemplateBaseWithComment(t *testing.T) {
 baseURL = "http://example.com/"
 -- layouts/baseof.html --
 Base: {{ block "main" . }}{{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{/*  A comment */}}
 {{ define "main" }}
   Bonjour
@@ -161,9 +161,9 @@ func TestTemplateLookupSite(t *testing.T) {
                files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single: {{ .Title }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 List: {{ .Title }}
 -- content/_index.md --
 ---
@@ -203,9 +203,9 @@ weight = 10
 [languages.fr]
 weight = 20
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}Main Home En{{ end }}
--- layouts/index.fr.html --
+-- layouts/home.fr.html --
 {{ define "main" }}Main Home Fr{{ end }}
 -- layouts/baseof.html --
 Baseof en: {{ block "main" . }}main block{{ end }}
@@ -213,9 +213,9 @@ Baseof en: {{ block "main" . }}main block{{ end }}
 Baseof fr: {{ block "main" . }}main block{{ end }}
 -- layouts/mysection/baseof.html --
 Baseof mysection: {{ block "main" .  }}mysection block{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}Main Default Single{{ end }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ define "main" }}Main Default List{{ end }}
 -- content/mysection/p1.md --
 ---
@@ -252,11 +252,11 @@ weight = 10
 [languages.fr]
 weight = 20
 
--- layouts/index.html --
+-- layouts/home.html --
 Site: {{ site.Language.Lang }} / {{ .Site.Language.Lang }} / {{ site.BaseURL }}
 Sites: {{ site.Sites.Default.Home.Language.Lang }}
 Hugo: {{ hugo.Generator }}
--- layouts/index.fr.html --
+-- layouts/home.fr.html --
 Site: {{ site.Language.Lang }} / {{ .Site.Language.Lang }} / {{ site.BaseURL }}
 Sites: {{ site.Sites.Default.Home.Language.Lang }}
 Hugo: {{ hugo.Generator }}
@@ -286,21 +286,21 @@ func TestPartialWithReturn(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/partials/add42.tpl --
+-- layouts/_partials/add42.tpl --
 {{ $v := add . 42 }}
 {{ return $v }}
--- layouts/partials/dollarContext.tpl --
+-- layouts/_partials/dollarContext.tpl --
 {{ $v := add $ 42 }}
 {{ return $v }}
--- layouts/partials/dict.tpl --
+-- layouts/_partials/dict.tpl --
 {{ $v := add $.adder 42 }}
 {{ return $v }}
--- layouts/partials/complex.tpl --
+-- layouts/_partials/complex.tpl --
 {{ return add . 42 }}
--- layouts/partials/hello.tpl --
+-- layouts/_partials/hello.tpl --
 {{ $v := printf "hello %s" . }}
 {{ return $v }}
--- layouts/index.html --
+-- layouts/home.html --
 Test Partials With Return Values:
 
 add42: 50: {{ partial "add42.tpl" 8 }}
@@ -333,7 +333,7 @@ func TestPartialWithZeroedArgs(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 X{{ partial "retval" dict }}X
 X{{ partial "retval" slice }}X
 X{{ partial "retval" "" }}X
@@ -368,13 +368,13 @@ func TestPartialCached(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $key1 := (dict "a" "av" ) }}
 {{ $key2 := (dict "a" "av2" ) }}
 Partial cached1: {{ partialCached "p1" "input1" $key1 }}
 Partial cached2: {{ partialCached "p1" "input2" $key1 }}
 Partial cached3: {{ partialCached "p1" "input3" $key2 }}
--- layouts/partials/p1.html --
+-- layouts/_partials/p1.html --
 partial: {{ . }}
 `
        b := NewIntegrationTestBuilder(
@@ -399,7 +399,7 @@ func TestTemplateTruth(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p := index site.RegularPages 0 }}
 {{ $zero := $p.ExpiryDate }}
 {{ $notZero := time.Now }}
@@ -438,7 +438,7 @@ func TestTemplateGoIssues(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "http://example.com/"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $title := "a & b" }}
 <script type="application/ld+json">{"@type":"WebPage","headline":"{{$title}}"}</script>
 
@@ -483,7 +483,7 @@ func TestPartialInline(t *testing.T) {
 -- hugo.toml --
 baseURL = "http://example.com/"
 -- content/p1.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p1 := partial "p1" . }}
 {{ $p2 := partial "p2" . }}
 
@@ -522,7 +522,7 @@ baseURL = "http://example.com/"
 -- layouts/baseof.html --
 {{ $p3 := partial "p3" . }}P3: {{ $p3 }}
 {{ block "main" . }}{{ end }}{{ define "partials/p3" }}Inline: p3{{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 
 {{ $p1 := partial "p1" . }}
@@ -570,17 +570,17 @@ baseURL = "http://example.com/"
 title: P
 ---
 Content
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 ::Header Start:{{ block "header" . }}{{ end }}:Header End:
 ::{{ block "main" . }}Main{{ end }}::
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "header" }}
 Home Header
 {{ end }}
 {{ define "main" }}
 This is home main
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 This is single main
 {{ end }}
@@ -614,7 +614,7 @@ func TestApplyWithNamespace(t *testing.T) {
 -- hugo.toml --
 baseURL = "http://example.com/"
 -- content/p1.md --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $b := slice " a " "     b "   "       c" }}
 {{ $a := apply $b "strings.Trim" "." " " }}
 a: {{ $a }}
@@ -635,7 +635,7 @@ func TestOverrideInternalTemplate(t *testing.T) {
        files := `
 -- hugo.toml --
 baseURL = "https://example.org"
--- layouts/index.html --
+-- layouts/home.html --
 {{ template "_internal/google_analytics_async.html" . }}
 -- layouts/_internal/google_analytics_async.html --
 Overridden.
index b4a2454acf337d40bcf28ff03e61c2afe3ae9b31..b0a93cf09d0f11b802a6517a91ac4cc1df16df77 100644 (file)
@@ -48,7 +48,7 @@ export default function Main() {};
 console.log("Hello, Runner!");
 -- node_modules/mylib/index.js --
 console.log("Hello, My Lib!");
--- layouts/shortcodes/hdx.html --
+-- layouts/_shortcodes/hdx.html --
 {{ $path := .Get "r" }}
 {{ $r := or (.Page.Resources.Get $path) (resources.Get $path) }}
 {{ $batch := (js.Batch "mybatch") }}
@@ -74,7 +74,7 @@ console.log("Hello, My Lib!");
        {{ end }}
 {{ end }}
 hdx-instance: {{ $scriptID }}: {{ $instanceID }}|
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Base.
 {{ $batch := (js.Batch "mybatch") }}
  {{ with $batch.Config }}
@@ -95,7 +95,7 @@ Defer:
 {{ end }}
 {{ block "main" . }}Main{{ end }}
 End.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 ==> Single Template Content: {{ .Content }}$
 {{ $batch := (js.Batch "mybatch") }}
@@ -111,7 +111,7 @@ End.
        {{ end }}
 {{ end }}
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 Home.
 {{ end }}
@@ -172,7 +172,7 @@ func TestBatchEditInstance(t *testing.T) {
        files := jsBatchFilesTemplate
        b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
        b.AssertFileContent("public/mybatch/mygroup.js", "Instance 1")
-       b.EditFileReplaceAll("layouts/_default/single.html", "Instance 1", "Instance 1 Edit").Build()
+       b.EditFileReplaceAll("layouts/single.html", "Instance 1", "Instance 1 Edit").Build()
        b.AssertFileContent("public/mybatch/mygroup.js", "Instance 1 Edit")
 }
 
@@ -180,7 +180,7 @@ func TestBatchEditScriptParam(t *testing.T) {
        files := jsBatchFilesTemplate
        b := hugolib.TestRunning(t, files, hugolib.TestOptWithOSFs())
        b.AssertFileContent("public/mybatch/mygroup.js", "param-p1-main")
-       b.EditFileReplaceAll("layouts/_default/single.html", "param-p1-main", "param-p1-main-edited").Build()
+       b.EditFileReplaceAll("layouts/single.html", "param-p1-main", "param-p1-main-edited").Build()
        b.AssertFileContent("public/mybatch/mygroup.js", "param-p1-main-edited")
 }
 
@@ -207,7 +207,7 @@ console.log("Hello, Main!");
 console.log("Hello, Runner!");
 -- node_modules/mylib/index.js --
 console.log("Hello, My Lib!");
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $batch := (js.Batch "mybatch") }}
  {{ with $batch.Config }}
@@ -291,7 +291,7 @@ console.log("Hello, Main!");
 console.log("Hello, Runner!");
 -- node_modules/mylib/index.js --
 console.log("Hello, My Lib!");
--- layouts/shortcodes/hdx.html --
+-- layouts/_shortcodes/hdx.html --
 {{ $path := .Get "r" }}
 {{ $r := or (.Page.Resources.Get $path) (resources.Get $path) }}
 {{ $batch := (js.Batch "mybatch") }}
@@ -317,7 +317,7 @@ console.log("Hello, My Lib!");
        {{ end }}
 {{ end }}
 hdx-instance: {{ $scriptID }}: {{ $instanceID }}|
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Base.
 {{ $batch := (js.Batch "mybatch") }}
  {{ with $batch.Config }}
@@ -338,7 +338,7 @@ Defer:
 {{ end }}
 {{ block "main" . }}Main{{ end }}
 End.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 ==> Single Template Content: {{ .Content }}$
 {{ $batch := (js.Batch "mybatch") }}
@@ -354,7 +354,7 @@ End.
        {{ end }}
 {{ end }}
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 Home.
 {{ end }}
@@ -584,7 +584,7 @@ console.log('config.params.id', config.id)
 
 export default function Main3() {};
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 
 {{ $r := .Resources.GetMatch "*.jsx" }}
@@ -612,7 +612,7 @@ Single.
                {{ .SetOptions  (dict "title" "r2 instance 1")}}
        {{ end }}
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ with (templates.Defer (dict "key" "global")) }}
 {{ $batch := (js.Batch "mybundle") }}
index 6406cb9727fe635397231f01cb4270b181792ed6..daef46056da493225e6847d9a00b3d2614272730 100644 (file)
@@ -40,7 +40,7 @@ other = 'l1theme'
 other = 'l2theme'
 [l3]
 other = 'l3theme'
--- layouts/index.html --
+-- layouts/home.html --
 l1: {{ i18n "l1"  }}|l2: {{ i18n "l2"  }}|l3: {{ i18n "l3"  }}
 
 `
@@ -83,7 +83,7 @@ Irure excepteur ex occaecat ipsum laboris fugiat exercitation. Exercitation adip
 -- i18n/en.toml --
 [a]
 other = 'Reading time: {{ .ReadingTime }}'
--- layouts/index.html --
+-- layouts/home.html --
 i18n: {{ i18n "a" . }}|
 
 `
@@ -110,7 +110,7 @@ defaultContentLanguageInSubdir = true
 cat = 'gato'
 -- i18n/fr.toml --
 # this file intentionally empty
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Title }}_{{ T "cat" }}
 -- content/_index.fr.md --
 ---
index fe17cd32e6c61d81acfb529e78fad27f5b6777ff..9e85c7ececf2a3b6cfbfe3dba6e32086517d0dfc 100644 (file)
@@ -36,6 +36,12 @@ import (
 )
 
 func TestCommands(t *testing.T) {
+       // These are somewhat flakey and takes some time,
+       // so usefule to have a way to skip them when developing.
+       const skipEnv = "HUGOTESTING_SKIP_COMMANDS"
+       if os.Getenv(skipEnv) != "" {
+               t.Skipf("skip because %s set in env", skipEnv)
+       }
        p := commonTestScriptsParam
        p.Dir = "testscripts/commands"
        testscript.Run(t, p)
index f9d308538bd4875708f4555c8dfd20868cf91d30..046ccaac4e5c168a4e2fdff5dbe12e908afa30c9 100644 (file)
@@ -32,9 +32,9 @@ func TestBlockquoteHook(t *testing.T) {
       [markup.goldmark.parser.attribute]
         block = true
         title = true
--- layouts/_default/_markup/render-blockquote.html --
+-- layouts/_markup/render-blockquote.html --
 Blockquote: |{{ .Text }}|{{ .Type }}|
--- layouts/_default/_markup/render-blockquote-alert.html --
+-- layouts/_markup/render-blockquote-alert.html --
 {{ $text := .Text }}
 Blockquote Alert: |{{ $text }}|{{ .Type }}|
 Blockquote Alert Attributes: |{{ $text }}|{{ .Attributes }}|
@@ -42,7 +42,7 @@ Blockquote Alert Page: |{{ $text }}|{{ .Page.Title }}|{{ .PageInner.Title }}|
 {{ if .Attributes.showpos }}
 Blockquote Alert Position: |{{ $text }}|{{ .Position | safeHTML }}|
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}
 -- content/p1.md --
 ---
@@ -98,7 +98,7 @@ title: "p1"
 ---
 
 >
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}
 
 `
@@ -135,9 +135,9 @@ title: "Home"
 > > [!important] Yes!, they can.
 > > > [!tip] You can even use multiple layers of nesting.
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
--- layouts/_default/_markup/render-blockquote.html --
+-- layouts/_markup/render-blockquote.html --
 AlertType: {{ .AlertType }}|AlertTitle: {{ .AlertTitle }}|AlertSign: {{ .AlertSign | safeHTML }}|Text: {{ .Text }}|
 
        `
@@ -163,9 +163,9 @@ func TestBlockquoteRenderHookTextParsing(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
--- layouts/_default/_markup/render-blockquote.html --
+-- layouts/_markup/render-blockquote.html --
 AlertType: {{ .AlertType }}|AlertTitle: {{ .AlertTitle }}|Text: {{ .Text }}|
 -- content/_index.md --
 ---
index c4da3d2e4800778308cd7d009b7d77cf66f532f3..95ebdf4af4a96a21ea8b6fd886b84cfb3c50e358 100644 (file)
@@ -41,14 +41,14 @@ func TestCodeblocks(t *testing.T) {
     noClasses = false
     style = 'monokai'
     tabWidth = 4
--- layouts/_default/_markup/render-codeblock-goat.html --
+-- layouts/_markup/render-codeblock-goat.html --
 {{ $diagram := diagrams.Goat .Inner }}
 Goat SVG:{{ substr $diagram.Wrapped 0 100 | safeHTML }}  }}|
 Goat Attribute: {{ .Attributes.width}}|
--- layouts/_default/_markup/render-codeblock-go.html --
+-- layouts/_markup/render-codeblock-go.html --
 Go Code: {{ .Inner | safeHTML }}|
 Go Language: {{ .Type }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/p1.md --
 ---
@@ -130,11 +130,11 @@ lineNumbersInTable = true
 noClasses = false
 style = 'monokai'
 tabWidth = 4
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 {{ $result := transform.HighlightCodeBlock . }}
 Inner: |{{ $result.Inner | safeHTML }}|
 Wrapped: |{{ $result.Wrapped | safeHTML }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/p1.md --
 ---
@@ -162,9 +162,9 @@ func TestCodeblocksBugs(t *testing.T) {
 
        files := `
 -- config.toml --
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 {{ .Position | safeHTML }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/p1.md --
 ---
@@ -201,9 +201,9 @@ title: "p1"
 §§§bash
 echo "p1";
 §§§
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 |{{ .Inner | safeHTML }}|
 
 `
@@ -228,9 +228,9 @@ title: "p1"
 §§§
 echo "p1";
 §§§
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 Position: {{ .Position | safeHTML }}
 
 
@@ -258,9 +258,9 @@ title: "p1"
 Hello, World!
 §§§
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 Attributes: {{ .Attributes }}|Type: {{ .Type }}|
 `
 
@@ -285,9 +285,9 @@ title: "p1"
 §§§LANGUAGE {style=monokai}
 echo "p1";
 §§§
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 Attributes: {{ .Attributes }}|Options: {{ .Options }}|
 
 
@@ -327,7 +327,7 @@ BLOCK
 
 Common
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 
 
@@ -371,10 +371,10 @@ title: "p1"
 Hello, World!
 §§§
 
--- layouts/index.html --
--- layouts/_default/single.html --
+-- layouts/home.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 Attributes: {{ .Attributes }}|Type: {{ .Type }}|
 `
 
index 415d7d0b1d8565202a0992638f24133429b04825..0c9c381afd7dfb67593bc9ddbee7ef9b6af05f22 100644 (file)
@@ -46,7 +46,7 @@ title: "p1"
 ~~~bash {id="c" onmouseover="alert('code fence')" LINENOS=true}
 foo
 ~~~
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -69,9 +69,9 @@ func TestAttributeExclusionWithRenderHook(t *testing.T) {
 title: "p1"
 ---
 ## Heading {onclick="alert('renderhook')" data-foo="bar"}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 <h{{ .Level }}
   {{- range $k, $v := .Attributes -}}
     {{- printf " %s=%q" $k $v | safeHTMLAttr -}}
@@ -95,7 +95,7 @@ func TestAttributesDefaultRenderer(t *testing.T) {
 title: "p1"
 ---
 ## Heading Attribute Which Needs Escaping { class="a < b" }
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -116,10 +116,10 @@ func TestAttributesHookNoEscape(t *testing.T) {
 title: "p1"
 ---
 ## Heading Attribute Which Needs Escaping { class="Smith & Wesson" }
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 plain: |{{- range $k, $v := .Attributes -}}{{ $k }}: {{ $v }}|{{ end }}|
 safeHTML: |{{- range $k, $v := .Attributes -}}{{ $k }}: {{ $v | safeHTML }}|{{ end }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -142,14 +142,14 @@ func TestLinkInTitle(t *testing.T) {
 title: "p1"
 ---
 ## Hello [Test](https://example.com)
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 <h{{ .Level }} id="{{ .Anchor | safeURL }}">
   {{ .Text }}
   <a class="anchor" href="#{{ .Anchor | safeURL }}">#</a>
 </h{{ .Level }}>
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 <a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text }}</a>
 
 `
@@ -179,7 +179,7 @@ lineNumbersInTable = true
 noClasses = false
 style = 'monokai'
 tabWidth = 4
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/p1.md --
 ---
@@ -234,14 +234,14 @@ LINE8
 func BenchmarkRenderHooks(b *testing.B) {
        files := `
 -- config.toml --
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 <h{{ .Level }} id="{{ .Anchor | safeURL }}">
        {{ .Text }}
        <a class="anchor" href="#{{ .Anchor | safeURL }}">#</a>
 </h{{ .Level }}>
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 <a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text }}</a>
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -303,7 +303,7 @@ func BenchmarkCodeblocks(b *testing.B) {
     noClasses = true
     style = 'monokai'
     tabWidth = 4
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -348,7 +348,7 @@ FENCE
 
        b.Run("Hook no higlight", func(b *testing.B) {
                files := filesTemplate + `
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 {{ .Inner }}
 `
 
@@ -364,9 +364,9 @@ func TestHookInfiniteRecursion(t *testing.T) {
                t.Run(renderFunc, func(t *testing.T) {
                        files := `
 -- config.toml --
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 <a href="{{ .Destination | safeURL }}">{{ .Text | RENDERFUNC }}</a>
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- content/p1.md --
 ---
@@ -408,7 +408,7 @@ func TestQuotesInImgAltAttr(t *testing.T) {
 title: "p1"
 ---
 !["a"](b.jpg)
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -437,13 +437,13 @@ Link no procol: www.example.org
 Link http procol: http://www.example.org
 Link https procol: https://www.example.org
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
                files = strings.ReplaceAll(files, "PROTOCOL", protocol)
 
                if withHook {
-                       files += `-- layouts/_default/_markup/render-link.html --
+                       files += `-- layouts/_markup/render-link.html --
 <a href="{{ .Destination | safeURL }}">{{ .Text }}</a>`
                }
 
@@ -505,7 +505,7 @@ a <!-- b --> c
 - This is a list item <!-- Comment: an innocent-looking comment -->
 
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -539,7 +539,7 @@ title: "p1"
 ![A's is > than B's](some-image.png)
 
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -581,16 +581,16 @@ title: "p1"
 title: "p2"
 ---
 :heavy_check_mark:
--- layouts/shortcodes/include.html --
+-- layouts/_shortcodes/include.html --
 {{ $p := site.GetPage (.Get 0) }}
 {{ $p.RenderShortcodes }}
--- layouts/shortcodes/sc1.html --
+-- layouts/_shortcodes/sc1.html --
 sc1_begin|{{ .Inner }}|sc1_end
--- layouts/shortcodes/sc2.html --
+-- layouts/_shortcodes/sc2.html --
 sc2_begin|{{ .Inner | .Page.RenderString }}|sc2_end
--- layouts/shortcodes/sc3.html --
+-- layouts/_shortcodes/sc3.html --
 sc3_begin|{{ .Inner }}|sc3_end
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -621,7 +621,7 @@ enableEmoji = false
 title: "p1"
 ---
 :x:
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -639,7 +639,7 @@ func TestEmojiDefaultConfig(t *testing.T) {
 title: "p1"
 ---
 :x:
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -658,7 +658,7 @@ func TestGoldmarkTemplateDelims(t *testing.T) {
   minifyOutput = true
 [minify.tdewolff.html]
   templateDelims = ["<?php","?>"]
--- layouts/index.html --
+-- layouts/home.html --
 <div class="foo">
 {{ safeHTML "<?php" }}
 echo "hello";
@@ -688,7 +688,7 @@ title: "p1"
 
 Inline equation that would be mangled by default parser: $a^*=x-b^*$
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -717,7 +717,7 @@ Block equation that would be mangled by default parser:
 
 $$a^*=x-b^*$$
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -752,7 +752,7 @@ Block equation that would be mangled by default parser:
 a^*=x-b^*
 %!%
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -788,7 +788,7 @@ enable = false
 enable = false
 [markup.goldmark.extensions.extras.superscript]
 enable = false
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- content/_index.md --
 ---
@@ -839,7 +839,7 @@ markup.goldmark.renderer.unsafe = false
 title: "p1"
 ---
 <div>Some raw HTML</div>
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -863,7 +863,7 @@ markup.goldmark.renderer.unsafe = false
 title: "p1"
 ---
 <em>raw HTML</em>
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -931,7 +931,7 @@ hidden
 --> word.
 
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
index 387287e7ac3395fc7794dc1b935f28012f713156..c6428f979d52e9cce83ea9aa7c53582061bf89b7 100644 (file)
@@ -30,13 +30,13 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
 {.b}
 
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
        t.Run("With Hook, no wrap", func(t *testing.T) {
                files := strings.ReplaceAll(filesTemplate, "CONFIG_VALUE", "false")
-               files = files + `-- layouts/_default/_markup/render-image.html --
+               files = files + `-- layouts/_markup/render-image.html --
 {{ if .IsBlock }}
 <figure class="{{ .Attributes.class }}">
        <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}|{{ .Ordinal }}" />
@@ -55,7 +55,7 @@ This is an inline image: ![Inline Image](/inline.jpg). Some more text.
 
        t.Run("With Hook, wrap", func(t *testing.T) {
                files := strings.ReplaceAll(filesTemplate, "CONFIG_VALUE", "true")
-               files = files + `-- layouts/_default/_markup/render-image.html --
+               files = files + `-- layouts/_markup/render-image.html --
 {{ if .IsBlock }}
 <figure class="{{ .Attributes.class }}">
        <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
index e56c5255029184a01692b9803bfd9c9d43ccd3e7..d75d3ec2b7737b2bbe54f4a7c00e17cffdb9fc78 100644 (file)
@@ -53,7 +53,7 @@ Second line
 
 ## Example [hyperlink](https://example.com/) in a header
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}|Identifiers: {{ .Fragments.Identifiers }}|
 `
 
@@ -83,7 +83,7 @@ func TestSolitaryAttributesCrash(t *testing.T) {
 -- hugo.toml --
 [markup.goldmark.parser.attribute]
 block = true
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}
 -- content/p1.md --
 ---
index 2d51c596180ff3e6ea0ebf8f0605844dc05386c1..f151bfc4d32b2e29a485272eeb561f04716f5b28 100644 (file)
@@ -43,11 +43,11 @@ $$a^*=x-b^*$$
 
 Some inline LaTeX 2: $a^*=x-b^*$.
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-passthrough-block.html --
+-- layouts/_markup/render-passthrough-block.html --
 Passthrough block: {{ .Inner | safeHTML }}|{{ .Type }}|{{ .Ordinal }}:END
--- layouts/_default/_markup/render-passthrough-inline.html --
+-- layouts/_markup/render-passthrough-inline.html --
 Passthrough inline: {{ .Inner | safeHTML }}|{{ .Type }}|{{ .Ordinal }}:END
 
 `
index d42f1195cd8c19052751f7cd29230ee55fd5ab8f..355810044080bba34475923358cd47bacabeefc5 100644 (file)
@@ -45,9 +45,9 @@ title = true
 | February | $80 |
 | March | $420 |
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
--- layouts/_default/_markup/render-table.html --
+-- layouts/_markup/render-table.html --
 Attributes: {{ .Attributes }}|
 {{ template "print" (dict "what" (printf "table-%d-thead" $.Ordinal) "rows" .THead) }}
 {{ template "print" (dict "what" (printf "table-%d-tbody" $.Ordinal)  "rows" .TBody) }}
@@ -99,7 +99,7 @@ a|b
 1|2
 {id="\"><script>alert()</script>"}
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 Summary: {{ .Summary }}
 Content: {{ .Content }}
 
@@ -135,13 +135,13 @@ output: ["rss", "html"]
 
 {{< foo >}}
 
--- layouts/index.html --
+-- layouts/home.html --
 Content: {{ .Content }}
 -- layouts/index.xml --
 Content: {{ .Content }}
--- layouts/shortcodes/foo.xml --
+-- layouts/_shortcodes/foo.xml --
 foo xml
--- layouts/shortcodes/foo.html --
+-- layouts/_shortcodes/foo.html --
 foo html
 
 `
index aaaf41a2fb53ae9886e942be98ba292cb691afe0..715828253d46e164c2be8600b154df34db0df03d 100644 (file)
@@ -46,7 +46,7 @@ autoHeadingIDType = 'github'
 [markup.goldmark.renderer]
 unsafe = false
 xhtml = false
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .TableOfContents }}
 -- content/p1.md --
 ---
@@ -180,7 +180,7 @@ autoHeadingIDType = 'github'
 [markup.goldmark.renderer]
 unsafe = true
 xhtml = true
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .TableOfContents }}
 -- content/p1.md --
 ---
@@ -290,9 +290,9 @@ func TestIssue13416(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 Content:{{ .Content }}|
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 -- content/_index.md --
 ---
 title: home
index e6cc16d2eaad11f71b3843ca209edc745f3f4e5e..841d879dda66f656f883f3b776faf55c6a02288b 100644 (file)
@@ -59,11 +59,11 @@ Not sure if this makes sense, but add a test for it:
 §§§
 
 
--- layouts/_default/_markup/render-codeblock-html.html --
+-- layouts/_markup/render-codeblock-html.html --
 {{ $opts := dict "hl_inline" true }}
 {{ $result := transform.HighlightCodeBlock . $opts }}
 HighlightCodeBlock: Wrapped:{{ $result.Wrapped  }}|Inner:{{ $result.Inner }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -93,7 +93,7 @@ title: home
 §§§go
 xəx := 0
 §§§
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 `
 
@@ -119,7 +119,7 @@ title: home
 §§§go
 xəx := 0
 §§§
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 `
 
index b47cbd245e3d5b5e18c70196d2809f280abfa0e2..1a8483b196836e954d11c3854a0f376bb017242b 100644 (file)
@@ -27,7 +27,7 @@ func TestHeadingsLevel(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ range .Fragments.HeadingsMap }}
        {{ printf "%s|%d|%s" .ID .Level .Title }}
 {{ end }}
@@ -52,7 +52,7 @@ func TestToHTMLArgTypes(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['home','section','rss','sitemap','taxonomy','term']
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Fragments.ToHTML .Params.toc.startLevel .Params.toc.endLevel false }}
 -- content/json.md --
 {
index de53b59d3a15540c004ad150fde54d9f4ad80d35..644e0a60b4bbe3e31cb539ec26c2301303803dcc 100644 (file)
@@ -90,7 +90,7 @@ keywords: ['foo']
 
 ## Common p3, p4, p5
 
--- layouts/shortcodes/see-also.html --
+-- layouts/_shortcodes/see-also.html --
 {{ $p1 := site.GetPage "p1" }}
 {{ $p2 := site.GetPage "p2" }}
 {{ $p3 := site.GetPage "p3" }}
@@ -108,7 +108,7 @@ Related 2: {{ template "list-related" $related2 }}
 
 {{ define "list-related" }}{{ range $i, $e := . }} {{ $i }}: {{ .Title }}: {{ with .HeadingsFiltered}}{{ range $i, $e := .}}h{{ $i }}: {{ .Title }}|{{ .ID }}|{{ end }}{{ end }}::END{{ end }}{{ end }}
 
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}
 
        
@@ -149,7 +149,7 @@ disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT"]
   name = 'pagerefs'
   type = 'fragments'
   weight = 30  
--- layouts/_default/single.html --
+-- layouts/single.html --
 Len related: {{ site.RegularPages.Related . | len }}
 `
 
index 5397bee232ce40a576bc667f25f034d682d79cbf..751b3ce0dcfa62a2b9b36157c8c6cb0a3abd57c1 100644 (file)
@@ -40,7 +40,7 @@ sourcefilename: ../testdata/exif/orientation6.jpg
 sourcefilename: ../testdata/sunset.jpg
 -- assets/gopher.png --
 sourcefilename: ../testdata/gopher-hero8.png
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $sunset := (resources.Get "sunset.jpg").Resize "x300" }}
 {{ $sunsetGrayscale := $sunset.Filter (images.Grayscale) }}
@@ -120,7 +120,7 @@ sourcefilename: ../testdata/sunset.jpg
 -- assets/mask.png --
 sourcefilename: ../testdata/mask.png
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $sunset := resources.Get "sunset.jpg" }}
 {{ $mask := resources.Get "mask.png" }}
@@ -184,7 +184,7 @@ sourcefilename: ../testdata/sunset.jpg
 -- assets/mask.png --
 sourcefilename: ../testdata/mask.png
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $sunset := resources.Get "sunset.jpg" }}
 {{ $mask := resources.Get "mask.png" }}
@@ -244,7 +244,7 @@ func TestImagesGoldenFiltersText(t *testing.T) {
 -- assets/sunset.jpg --
 sourcefilename: ../testdata/sunset.jpg
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $sunset := resources.Get "sunset.jpg" }}
 {{ $textOpts := dict
@@ -308,7 +308,7 @@ sourcefilename: ../testdata/giphy.gif
 sourcefilename: ../testdata/sunset.jpg
 -- assets/gopher.png --
 sourcefilename: ../testdata/gopher-hero8.png
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $sunset := resources.Get "sunset.jpg" }}
 {{ $sunsetGrayscale := $sunset.Filter (images.Grayscale) }}
@@ -364,7 +364,7 @@ sourcefilename: ../testdata/sunset.jpg
 -- assets/gopher.png --
 sourcefilename: ../testdata/gopher-hero8.png
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $sunset := resources.Get "sunset.jpg" }}
 {{ $gopher := resources.Get "gopher.png" }}
index caba42e0338f3bc33bf0d212235c80473b431fe3..d66fa23665402879acff9f27be9ec19e7a1557f7 100644 (file)
@@ -24,7 +24,7 @@ func TestAutoOrient(t *testing.T) {
 -- hugo.toml --
 -- assets/rotate270.jpg --
 sourcefilename: ../testdata/exif/orientation6.jpg
--- layouts/index.html --
+-- layouts/home.html --
 {{ $img := resources.Get "rotate270.jpg" }}
 W/H original: {{ $img.Width }}/{{ $img.Height }}
 {{ $rotated := $img.Filter images.AutoOrient }}
@@ -41,7 +41,7 @@ func TestOrientationEq(t *testing.T) {
 -- hugo.toml --
 -- assets/rotate270.jpg --
 sourcefilename: ../testdata/exif/orientation6.jpg
--- layouts/index.html --
+-- layouts/home.html --
 {{ $img := resources.Get "rotate270.jpg" }}
 {{ $orientation := $img.Exif.Tags.Orientation }}
 Orientation: {{ $orientation }}|eq 6: {{ eq $orientation 6 }}|Type: {{ printf "%T" $orientation }}|
index 763499113366ccdc3551505305d3a102415f57c2..1275bbb1e479619980570a31319a73177d894c4a 100644 (file)
@@ -54,7 +54,7 @@ date: "2020-01-01"
 title: "Post 2"
 date: "2020-02-01"
 ---
--- layouts/index.html --
+-- layouts/home.html --
 {{ range $k, $v := site.RegularPages.GroupByDate "January, 2006" }}{{ $k }}|{{ $v.Key }}|{{ $v.Pages }}{{ end }}
 
        `
@@ -104,7 +104,7 @@ title: "alpha"
 date: "2020-01-01"
 param1: "éclair"
 ---
--- layouts/index.html --
+-- layouts/home.html --
 ByTitle: {{ range site.RegularPages.ByTitle }}{{ .Title }}|{{ end }}
 ByLinkTitle: {{ range site.RegularPages.ByLinkTitle }}{{ .Title }}|{{ end }}
 ByParam: {{ range site.RegularPages.ByParam "param1" }}{{ .Params.param1 }}|{{ end }}
@@ -159,7 +159,7 @@ title: "D"
 slug: "d"
 ---
 D
--- layouts/_default/single.html --
+-- layouts/single.html --
 RelPermalink: {{ .RelPermalink }}
 
 `
index 8e2a2b6fcfec7e23ac8fa94e0bf72bd3945c13eb..412850b3a8241fb0b6d0bcca94b497933c0d5f28 100644 (file)
@@ -35,7 +35,7 @@ title: "Post 1"
 date: "2020-01-01"
 ---
 {{% foo %}}
--- layouts/shortcodes/foo.html --
+-- layouts/_shortcodes/foo.html --
 Two *words*.
 {{/* Test that markup scope is set in all relevant constructs. */}}
 {{ if eq hugo.Context.MarkupScope "foo" }}
@@ -45,10 +45,10 @@ Sint ad mollit qui Lorem ut occaecat culpa officia. Et consectetur aute voluptat
 ### Heading 2
 Exercitation quis est consectetur occaecat nostrud. Ullamco aute mollit aliqua est amet. Exercitation ullamco consectetur dolor labore et non irure eu cillum Lorem.
 {{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ .Content }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 Page.ContentWithoutSummmary: {{ .ContentWithoutSummary }}|
 {{ template "render-scope" (dict "page" . "scope" "main") }}
@@ -134,28 +134,28 @@ date: "2020-01-03"
 
 {{< foo >}}
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ with site.GetPage "p1" }}
        {{ with .Markup "home" }}
                {{ .Render.Content }}
        {{ end }}
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 {{ with .Markup  }}
        {{ with .Render }}
                {{ .Content }}
        {{ end }}
 {{ end }}
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 Render heading: title: {{ .Text}} scope: {{ hugo.Context.MarkupScope }}|
--- layouts/shortcodes/foo.html --
+-- layouts/_shortcodes/foo.html --
 Foo scope: {{ hugo.Context.MarkupScope }}|
--- layouts/shortcodes/includerendershortcodes.html --
+-- layouts/_shortcodes/includerendershortcodes.html --
 {{ $p := site.GetPage (.Get 0) }}
 includerendershortcodes: {{ hugo.Context.MarkupScope }}|{{ $p.Markup.RenderShortcodes }}|
--- layouts/shortcodes/includecontent.html --
+-- layouts/_shortcodes/includecontent.html --
 {{ $p := site.GetPage (.Get 0) }}
 includecontent: {{ hugo.Context.MarkupScope }}|{{ $p.Markup.Render.Content }}|
 
@@ -204,7 +204,7 @@ date: "2020-01-01"
 summary: "This is summary in front matter."
 ---
 This is content.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 Page.Summary: {{ .Summary }}|
 {{ with .Markup.Render }}
@@ -265,7 +265,7 @@ Another paragraph.
 This is summary.
 <!--more-->
 This is content.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 Page.Summary: {{ .Summary }}|
 {{ with .Markup.Render }}
@@ -317,7 +317,7 @@ Another paragraph.
 This is summary.
 <!--more-->
 This is content.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 Page.Summary: {{ .Summary }}|
 {{ with .Markup.Render }}
index d0c550b2e1ba170c2d5c0e30418f134a9ae5beb4..831c4ec1f3c45a7c352787128746c6d02db93555 100644 (file)
@@ -29,7 +29,7 @@ timeZone = "Europe/London"
 title: p1
 date: 2024-03-13T06:00:00
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Date: {{ .Date }}
 Lastmod: {{ .Lastmod }}
 Eq: {{ eq .Date .Lastmod }}
@@ -53,7 +53,7 @@ func TestDateValidation(t *testing.T) {
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 -- content/_index.md --
 FRONT_MATTER
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Date.UTC.Format "2006-01-02" }}
 --
 `
index d61d23cf05e9f6f92a091697e8cd845d5a68ab97..ed06820540be713d50590c6bd65477aefcbdc187 100644 (file)
@@ -38,7 +38,7 @@ weight: 20
 title: "Page 3"
 weight: 30
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|Next: {{ with .Next}}{{ .Title}}{{ end }}|Prev: {{ with .Prev}}{{ .Title}}{{ end }}|NextInSection: {{ with .NextInSection}}{{ .Title}}{{ end }}|PrevInSection: {{ with .PrevInSection}}{{ .Title}}{{ end }}|
 
 `
index 3bd8ccf1f79824fffbec4cce23e10fc635f9d5d7..5393f1d0e28752cf5bcbe8f54e9ff07900b4dcf9 100644 (file)
@@ -31,9 +31,9 @@ func TestHashSignInPermalink(t *testing.T) {
 disableKinds = ['section','rss','sitemap','taxonomy']
 [permalinks]
 s1 = '/:section/:slug'
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ range site.Pages }}{{ .RelPermalink }}|{{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 -- content/s1/p1.md --
 ---
index c1b179cd5d92d534430465ec3a03fa4fe1669952..29bb55557f25b10917fc4a8c35bf316ac169a8ac 100644 (file)
@@ -27,9 +27,9 @@ func TestPermalinks(t *testing.T) {
        t.Parallel()
 
        files := `
--- layouts/_default/list.html --
+-- layouts/list.html --
 List|{{ .Kind }}|{{ .RelPermalink }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single|{{ .Kind }}|{{ .RelPermalink }}|
 -- hugo.toml --
 [taxonomies]
@@ -148,9 +148,9 @@ func TestPermalinksOldSetup(t *testing.T) {
        t.Parallel()
 
        files := `
--- layouts/_default/list.html --
+-- layouts/list.html --
 List|{{ .Kind }}|{{ .RelPermalink }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single|{{ .Kind }}|{{ .RelPermalink }}|
 -- hugo.toml --
 [permalinks]
@@ -212,9 +212,9 @@ title: 2023
 ---
 title: Book 1
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
 `
 
@@ -261,9 +261,9 @@ title: 2023
 ---
 title: Book One
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
 `
 
@@ -287,9 +287,9 @@ func TestPermalinksUrlCascade(t *testing.T) {
        t.Parallel()
 
        files := `
--- layouts/_default/list.html --
+-- layouts/list.html --
 List|{{ .Kind }}|{{ .RelPermalink }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single|{{ .Kind }}|{{ .RelPermalink }}|
 -- hugo.toml --
 -- content/cooking/delicious-recipes/_index.md --
@@ -350,9 +350,9 @@ url: "/a\\:b/:slug/"
 ---
 title: p2
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}
 `
 
@@ -380,7 +380,7 @@ b = "/:sections/:contentbasename/"
 {{ $.AddPage (dict "kind" "page" "path" "a/b/contentbasename2" "slug" "myslug"  "title" "My A Page With Slug")  }}
  {{ $.AddPage  (dict "kind" "section" "path" "b/c" "title" "My B Section")  }}
 {{ $.AddPage  (dict "kind" "page" "path" "b/c/contentbasename3" "title" "My B Page No Slug")  }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .RelPermalink }}|{{ .Kind }}|
 `
        b := hugolib.Test(t, files)
@@ -414,9 +414,9 @@ categories: ["c1", "c2"]
 title: "C2"
 slug: "c2slug"
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|{{ .RelPermalink }}|{{ .Kind }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|{{ .RelPermalink }}|{{ .Kind }}|
 `
        b := hugolib.Test(t, files)
@@ -480,9 +480,9 @@ title: Bar
 ---
 title: Some Page
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 List|{{ .Kind }}|{{ .RelPermalink }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single|{{ .Kind }}|{{ .RelPermalink }}|
 `
 
index 60064df3a94fb14f8f60ded8fcc6e9ccf1487905..956f87ffb2a36abbaa07120a3217d0f760534c99 100644 (file)
@@ -34,7 +34,7 @@ weight = 1
 [languages.de]
 languageName = 'Deutsch'
 weight = 2
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Site.Sites.Default.Language.LanguageName }}
 `
 
index 70e204dd19a8468da9a5570703ef94b4b871ec1a..42195ac96780aada1890a88334278b4a7f268459 100644 (file)
@@ -27,12 +27,12 @@ func TestTaxonomiesGetAndCount(t *testing.T) {
 disableKinds = ['rss','sitemap']
 [taxonomies]
 author = 'authors'
--- layouts/_default/home.html --
+-- layouts/home.html --
 John Smith count: {{ site.Taxonomies.authors.Count "John Smith" }}
 Robert Jones count: {{ (site.Taxonomies.authors.Get "Robert Jones").Pages.Len }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Title }}|
 -- content/p1.md --
 ---
@@ -68,10 +68,10 @@ category = 'categories'
 title: p1
 tags: [tag-a]
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{- with site.Taxonomies.tags.Page }}{{ .RelPermalink }}{{ end }}|
 {{- with site.Taxonomies.categories.Page }}{{ .RelPermalink }}{{ end }}|
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 `
 
index 920fc73971f8baf85500b4fd78791f9505bf5d06..5862a8a3e870f90182b4ddfc5a4efc1dc4e82b47 100644 (file)
@@ -38,7 +38,7 @@ title: "My Bundle"
 Text 1.
 -- content/mybundle/sub/txt2.txt --
 Text 1.
--- layouts/index.html --
+-- layouts/home.html --
 {{ $mybundle := site.GetPage "mybundle" }}
 {{ $subResources := resources.Match "/text/sub/*.*"  }}
 {{ $subResourcesMount :=  $subResources.Mount "/text/sub" "/newroot" }}
@@ -83,7 +83,7 @@ resources:
 Text 1.
 -- content/mybundle/foo/txt2.txt --
 Text 2.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
 {{ $mybundle := site.GetPage "mybundle" }}
 Resources:{{ range $mybundle.Resources }}Name: {{ .Name }}|{{ end }}$
index 0ed43721c9c5e990421d75783519e64c597a72bb..fa57cb23f255fedfbfbd1fa96144e682c978474a 100644 (file)
@@ -31,7 +31,7 @@ func TestGetRemoteHead(t *testing.T) {
   [security.http]
     methods = ['(?i)GET|POST|HEAD']
     urls = ['.*gohugo\.io.*']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $url := "https://gohugo.io/img/hugo.png" }}
 {{ $opts := dict "method" "head" }}
 {{ with try (resources.GetRemote $url $opts) }}
@@ -67,7 +67,7 @@ func TestGetRemoteResponseHeaders(t *testing.T) {
   [security.http]
     methods = ['(?i)GET|POST|HEAD']
     urls = ['.*gohugo\.io.*']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $url := "https://gohugo.io/img/hugo.png" }}
 {{ $opts := dict "method" "head" "responseHeaders" (slice "X-Frame-Options" "Server") }}
 {{ with try (resources.GetRemote $url $opts) }}
@@ -121,7 +121,7 @@ timeout = "TIMEOUT"
 [security.http]
 urls = ['.*']
 mediaTypes = ['text/plain']
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ $url := printf "%s%s" "URL" .RelPermalink}}
 {{ $opts := dict }}
 {{ with try (resources.GetRemote $url $opts) }}
index 44a13f103dc8dc4ac9a552eb83c498222be55dd5..97ee0bee0c4f89f60a4918867102060f1b33e56d 100644 (file)
@@ -52,7 +52,7 @@ disablekinds = ['taxonomy', 'term', 'page']
 [security]
        [security.exec]
        allow = ['^npx$', '^babel$']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $options := dict "noComments" true }}
 {{ $transpiled := resources.Get "js/main.js" | babel -}}
 Transpiled: {{ $transpiled.Content | safeJS }}
index a05f340fd59e618d7e4677844a6aff04efe00e82..6223abb7d6f7da0748e8d22386f3c244f84c9f09 100644 (file)
@@ -68,7 +68,7 @@ hello:
 -- i18n/fr.yaml --
 hello:
    other: "Bonjour"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $options := dict "inlineImports" true }}
 {{ $styles := resources.Get "css/styles.css" | css.PostCSS $options }}
 Styles RelPermalink: {{ $styles.RelPermalink }}
index 734ffe759d713d8fb105c56f67841aced3d37ca1..de78df51715e32281a1c0995dc18e14e3efedb31 100644 (file)
@@ -55,7 +55,7 @@ func TestTailwindV4Basic(t *testing.T) {
   --color-neon-lime: oklch(91.5% 0.258 129);
   --color-neon-cyan: oklch(91.3% 0.139 195.8);
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $css := resources.Get "css/styles.css" | css.TailwindCSS }}
 CSS: {{ $css.Content | safeCSS }}|
 `
index 9cee19a8659b2b47ca1ab5d76317bd2edb1b3291..2fd948c8a0323cbc3a3119541fa99e324ec927e6 100644 (file)
@@ -49,7 +49,7 @@ export function hello2() {
 export function hello3() {
        return 'efgh';
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $js := resources.Get "js/main.js" | js.Build }}
 JS Content:{{ $js.Content }}:End:
 
@@ -175,7 +175,7 @@ hello:
 -- i18n/fr.yaml --
 hello:
    other: "Bonjour"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $options := dict "minify" false "externals" (slice "react" "react-dom")  "sourcemap" "linked" }}
 {{ $js := resources.Get "js/main.js" | js.Build $options }}
 JS:  {{ template "print" $js }}
@@ -257,7 +257,7 @@ export function hello2() {
 export function hello3() {
        return 'efgh';
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $js := resources.Get "js/main.js" | js.Build }}
 JS Content:{{ $js.Content }}:End:
 
@@ -297,7 +297,7 @@ console.log("IMPORT_SRC_DIR:imp3/foo.ts");
 import 'imp1/index.js';
 import 'imp2/index.js';
 import 'imp3/foo.js';
--- layouts/index.html --
+-- layouts/home.html --
 {{ $js := resources.Get "js/main.js" | js.Build }}
 {{ $js.RelPermalink }}
                        `
@@ -343,7 +343,7 @@ console.log("Hello 1");
 -- assets/js/utils/util2.js --
 //! License util2  */
 console.log("Hello 2");
--- layouts/index.html --
+-- layouts/home.html --
 {{ $js := resources.Get "js/main.js" | js.Build (dict "minify" false) }}
 {{ $js.RelPermalink }}
 `
@@ -379,7 +379,7 @@ disableKinds = ['RSS','sitemap','taxonomy','term']
 function addFoo(target: any) {target.prototype.foo = 'bar'}
 @addFoo
 class A {}
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "target" "es2020" "targetPath" "js/main.js" }}
 {{ (resources.Get "ts/main.ts" | js.Build $opts).Publish }}
 `
@@ -409,7 +409,7 @@ import { hello2 } from './util2.js';
 
 hello1();
 hello2();
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $js := resources.Get "js/main.js" | js.Build (dict "externals" (slice "./util1.js")) }}
 {{ $js.Publish }}
index fb4cc7a656f13a999ed2923e263c95943742bdc8..34d349a50dccfc4080d6029e7e9f7ef15575c490 100644 (file)
@@ -28,7 +28,7 @@ func TestTransformMinify(t *testing.T) {
 -- assets/js/test.js --
 new Date(2002, 04, 11)
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $js := resources.Get "js/test.js" | minify }}
 <script>
 {{ $js.Content }}
index 969e09c36463318d4ab7a822335a41ec3e83fad8..4dc0e536e56095101ec362b1703e0a8e5114e05f 100644 (file)
@@ -42,14 +42,14 @@ other = "Hello"
 -- i18n/fr.toml --
 [hello]
 other = "Bonjour"
--- layouts/index.fr.html --
+-- layouts/home.fr.html --
 Lang: {{ site.Language.Lang }}
 {{ $templ := "{{T \"hello\"}}" | resources.FromString "f1.html" }}
 {{ $helloResource := $templ | resources.ExecuteAsTemplate (print "f%s.html" .Lang) . }}
 Hello1: {{T "hello"}}
 Hello2: {{ $helloResource.Content }}
 LangURL: {{ relLangURL "foo" }}
--- layouts/index.html --
+-- layouts/home.html --
 Lang: {{ site.Language.Lang }}
 {{ $templ := "{{T \"hello\"}}" | resources.FromString "f1.html" }}
 {{ $helloResource := $templ | resources.ExecuteAsTemplate (print "f%s.html" .Lang) . }}
index 89d503d36e7a34cd2aa8431b73ba0b0b411f8156..6dbc60fae624b7096e974382ce270683b92a3b40 100644 (file)
@@ -40,7 +40,7 @@ moo {
   color: $moolor;
 }
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo") "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -81,7 +81,7 @@ moo {
 -- assets/scss/regular.css --
 
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $r := resources.Get "scss/main.scss" |  toCSS (dict "transpiler" "dartsass")  }}
 T1: {{ $r.Content | safeHTML }}
 
@@ -125,7 +125,7 @@ func TestTransformImportIndentedSASS(t *testing.T) {
 
 /* foo */
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $r := resources.Get "scss/main.scss" |  toCSS (dict "transpiler" "dartsass")  }}
 T1: {{ $r.Content | safeHTML }}
 
@@ -164,7 +164,7 @@ a {color: import-this-file-css;}
 a {color: compile-this-mounted-file-css;}
 -- foo/_import-this-mounted-file.css --
 a {color: import-this-mounted-file-css;}
--- layouts/index.html --
+-- layouts/home.html --
 {{- $opts := dict "transpiler" "dartsass" }}
 {{- with resources.Get "main.scss" | toCSS $opts }}{{ .Content | safeHTML }}{{ end }}
 -- config.toml --
@@ -224,7 +224,7 @@ moo {
 }
 -- config.toml --
 theme = 'mytheme'
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo" ) "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -278,7 +278,7 @@ func TestTransformLogging(t *testing.T) {
 
 -- config.toml --
 disableKinds = ["term", "taxonomy", "section", "page"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict  "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts   }}
 T1: {{ $r.Content }}
@@ -325,7 +325,7 @@ body {
        color: $maincolor;
 }
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := dict "transpiler" "dartsass" }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -392,7 +392,7 @@ p {
 b {
        color: vars.$color2;
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $image := "images/hero.jpg" }}
 {{ $font := "Hugo's New Roman" }}
 {{ $vars := dict "$color1" "blue" "$color2" "green" "font_size" "24px" "image" $image "font" $font }}
@@ -442,7 +442,7 @@ p {
 b {
        color: vars.$color2;
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $vars := site.Params.sassvars}}
 {{ $cssOpts := (dict "transpiler" "dartsass" "outputStyle" "compressed" "vars" $vars ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
@@ -497,7 +497,7 @@ float = 3.14
 @debug meta.type-of(vars.$integer);
 @debug meta.type-of(vars.$float);
 @debug meta.type-of(vars.$a_number);
--- layouts/index.html --
+-- layouts/home.html --
 {{ $vars := site.Params.sassvars}}
 {{ $vars = merge $vars (dict "not_a_number" ("32xxx" | css.Quoted) "a_number" ("234" | css.Unquoted) )}}
 {{ $cssOpts := (dict "transpiler" "dartsass" "vars" $vars ) }}
@@ -547,7 +547,7 @@ path="github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
 module github.com/gohugoio/tests/testHugoModules
 -- assets/scss/main.scss --
 @import "bootstrap/bootstrap";
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
 Styles: {{ $r.RelPermalink }}
@@ -580,7 +580,7 @@ target = 'assets'
 [[module.mounts]]
 source = "miscellaneous/sass"
 target = "assets/sass"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "transpiler" "dartsass" "outputStyle" "compressed" }}
 {{ (resources.Get "sass/main.scss" | toCSS $opts).Content }}
 -- assets/sass/main.scss --
@@ -626,7 +626,7 @@ moo {
   color: $moolor;
 }
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo") "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -649,7 +649,7 @@ func TestSilenceDependencyDeprecations(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict
   "transpiler" "dartsass"
   "outputStyle" "compressed"
index 0154a46341213be6938e38c3acc9c58b97b19687..69c40dd67665aa63dbc1cc9f43c4c1d13b7f027e 100644 (file)
@@ -42,7 +42,7 @@ moo {
   color: $moolor;
 }
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo") ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -85,7 +85,7 @@ moo {
 -- assets/scss/regular.css --
 
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $r := resources.Get "scss/main.scss" |  toCSS }}
 T1: {{ $r.Content | safeHTML }}
 
@@ -138,7 +138,7 @@ moo {
 }
 -- config.toml --
 theme = 'mytheme'
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo" ) ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -208,7 +208,7 @@ body {
        color: $maincolor;
 }
 
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := dict }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
 T1: {{ $r.Content }}
@@ -273,7 +273,7 @@ p {
 b {
        color: $color2;
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $image := "images/hero.jpg" }}
 {{ $font := "Hugo's New Roman" }}
 {{ $vars := dict "$color1" "blue" "$color2" "green" "font_size" "24px" "image" $image "font" $font }}
@@ -312,7 +312,7 @@ path="github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
 module github.com/gohugoio/tests/testHugoModules
 -- assets/scss/main.scss --
 @import "bootstrap/bootstrap";
--- layouts/index.html --
+-- layouts/home.html --
 {{ $cssOpts := (dict "transpiler" "libsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
 Styles: {{ $r.RelPermalink }}
@@ -340,7 +340,7 @@ func TestRebuildAssetGetMatch(t *testing.T) {
 b {
        color: red;
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $r := resources.GetMatch "scss/main.scss" |  toCSS  }}
 T1: {{ $r.Content }}
        `
@@ -382,7 +382,7 @@ h2 {
 h3 {
        color: green;
 }
--- layouts/index.html --
+-- layouts/home.html --
 {{ $a := slice (resources.Get "a.scss") }}
 {{ $b := resources.Match "dir/*.scss" }}
 
@@ -435,7 +435,7 @@ target = 'assets'
 [[module.mounts]]
 source = "miscellaneous/sass"
 target = "assets/sass"
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "transpiler" "libsass" "outputStyle" "compressed" }}
 {{ (resources.Get "sass/main.scss" | toCSS $opts).Content }}
 -- assets/sass/main.scss --
index e13ae72b35ca48c5867db39e6ce85f31ad94d941..d5295c872a567a0aa53cce656d454b3ef1772820 100644 (file)
@@ -38,7 +38,7 @@ iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAA
 -- content/mybundle/giphy.gif --
 sourcefilename: testdata/giphy.gif
 -- layouts/foo.html --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $p := site.GetPage "mybundle"}}
 {{ $img := $p.Resources.Get "pixel.png" }}
 {{ $giphy := $p.Resources.Get "giphy.gif" }}
@@ -83,7 +83,7 @@ func TestSVGError(t *testing.T) {
 -- config.toml --
 -- assets/circle.svg --
 <svg height="100" width="100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg>
--- layouts/index.html --
+-- layouts/home.html --
 {{ $svg := resources.Get "circle.svg" }}
 Width: {{ $svg.Width }}
 `
@@ -109,7 +109,7 @@ func TestNoPublishOfUnusedProcessedImage(t *testing.T) {
        files := `
 -- assets/images/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{ $image := resources.Get "images/pixel.png" }}
 {{ $image = $image.Resize "400x" }}
 {{ $image = $image.Resize "300x" }}
@@ -143,7 +143,7 @@ func TestProcessFilter(t *testing.T) {
        files := `
 -- assets/images/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{ $pixel := resources.Get "images/pixel.png" }}
 {{ $filters := slice (images.GaussianBlur 6) (images.Pixelate 8) (images.Process "jpg") }}
 {{ $image := $pixel.Filter $filters }}
@@ -172,7 +172,7 @@ func TestGroupByParamDate(t *testing.T) {
        files := `
 -- config.toml --
 disableKinds = ['section','rss','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{- range site.RegularPages.GroupByParamDate "eventDate" "2006-01" }}
        {{- .Key }}|{{ range .Pages }}{{ .Title }}|{{ end }}
 {{- end }}
@@ -237,7 +237,7 @@ func TestImageTransformThenCopy(t *testing.T) {
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 -- assets/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{- with resources.Get "pixel.png" }}
   {{- with .Resize "200x" | resources.Copy "pixel.png" }}
     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">|{{ .Key }}
@@ -262,7 +262,7 @@ func TestUseDifferentCacheKeyForResourceCopy(t *testing.T) {
 disableKinds = ['page','section','rss','sitemap','taxonomy','term']
 -- assets/a.txt --
 This was assets/a.txt
--- layouts/index.html --
+-- layouts/home.html --
 {{ $nilResource := resources.Get "/p1/b.txt" }}
 {{ $r := resources.Get "a.txt" }}
 {{ $r = resources.Copy "/p1/b.txt" $r }}
index 4404f164226465dd4c546c6542cca68c7a5b2b9a..48d601545e427306b44e64dec1e78db9be29dc3a 100644 (file)
@@ -37,9 +37,9 @@ P1.
 title: "P2"
 ---
 P2.
--- layouts/_default/list.html --
+-- layouts/list.html --
 List.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ $css := resources.Get "css/main.css" | resources.Minify  }}
 CSS: {{ $css.Content }}
 `
index 3b0912ed25edd0e08607912ef6dd4f5143854820..d2aed1d7b146731f17d3a5269d3d953f5a5bb571 100644 (file)
@@ -26,9 +26,9 @@ func TestApplyWithContext(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 {{ apply (seq 3) "partial" "foo.html"}}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 {{ return "foo"}}
   `
 
@@ -45,7 +45,7 @@ func TestSortStable(t *testing.T) {
 
        files := `
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $values := slice (dict "a" 1 "b" 2) (dict "a" 3 "b" 1) (dict "a" 2 "b" 0) (dict "a" 1 "b" 0) (dict "a" 3 "b" 1) (dict "a" 2 "b" 2) (dict "a" 2 "b" 1) (dict "a" 0 "b" 3) (dict "a" 3 "b" 3) (dict "a" 0 "b" 0) (dict "a" 0 "b" 0) (dict "a" 2 "b" 0) (dict "a" 1 "b" 2) (dict "a" 1 "b" 1) (dict "a" 3 "b" 0) (dict "a" 2 "b" 0) (dict "a" 3 "b" 0) (dict "a" 3 "b" 0) (dict "a" 3 "b" 0) (dict "a" 3 "b" 1) }}
 Asc:  {{ sort (sort $values "b" "asc") "a" "asc" }}
 Desc: {{ sort (sort $values "b" "desc") "a" "desc" }}
@@ -75,7 +75,7 @@ func TestAppendSliceToASliceOfSlices(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $obj := slice (slice "a") }}
 {{ $obj = $obj | append (slice "b") }}
 {{ $obj = $obj | append (slice "c") }}
@@ -94,7 +94,7 @@ func TestAppendNilToSlice(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $obj := (slice "a") }}
 {{ $obj = $obj | append nil }}
 
@@ -113,7 +113,7 @@ func TestAppendNilsToSliceWithNils(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $obj := (slice "a" nil "c") }}
 {{ $obj = $obj | append nil }}
 
@@ -143,9 +143,9 @@ func TestWhereWithWordCount(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ range where site.RegularPages "WordCount" "gt" 50 }}{{ .Title }}|{{ end }}
--- layouts/shortcodes/lorem.html --
+-- layouts/_shortcodes/lorem.html --
 {{ "ipsum " | strings.Repeat (.Get 0 | int) }}
 
 -- content/p1.md --
@@ -191,7 +191,7 @@ foo: abc
 title: P3
 foo: bc
 ---
--- layouts/index.html --
+-- layouts/home.html --
 <ul>
   {{- range where site.RegularPages "Params.foo" "like" "^ab" -}}
     <li>{{ .Title }}</li>
@@ -227,7 +227,7 @@ title: p3
 categories: [cat-a]
 tags: ['tag-b']
 ---
--- layouts/_default/term.html --
+-- layouts/term.html --
 {{ $list1 := .Pages }}
 {{ range $i, $e := site.Taxonomies.tags.ByCount }}
 {{ $list2 := .Pages }}
@@ -257,7 +257,7 @@ func TestUnionResourcesMatch(t *testing.T) {
        files := `
 -- config.toml --
 disableKinds = ['rss','sitemap', 'taxonomy', 'term', 'page']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $a := resources.Match "*a*" }}
 {{ $b := resources.Match "*b*" }}
 {{ $union := $a | union $b }}
index 52f0a427c84807988d57c7027769a80059679d1f..c03655add3ec7e9d504c8215b9502231135d10d5 100644 (file)
@@ -25,7 +25,7 @@ func TestTimer(t *testing.T) {
 -- hugo.toml --
 baseURL = "https://example.org/"
 disableKinds = ["taxonomy", "term"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ range seq 5 }}
 {{ $t := debug.Timer "foo" }}
 {{ seq 1 1000 }}
@@ -61,11 +61,11 @@ date: 2012-03-15
 title: "The First"
 tags: ["a", "b"]
 ---
--- layouts/_default/list.html --
+-- layouts/list.html --
 Dump: {{ debug.Dump . | safeHTML }}
 Dump Site: {{ debug.Dump site }}
 Dum site.Taxonomies: {{ debug.Dump site.Taxonomies | safeHTML }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Dump: {{ debug.Dump . | safeHTML }}
 
 
index 87a89943ce0d1438acdeb60ef41a76636c69acb1..5cd6afb123413c70752ab87c9d569e5863e1d4ca 100644 (file)
@@ -28,7 +28,7 @@ func TestErroridf(t *testing.T) {
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 ignoreErrors = ['error-b','error-C']
--- layouts/index.html --
+-- layouts/home.html --
 {{ erroridf "error-a" "%s" "a"}}
 {{ erroridf "error-b" "%s" "b"}}
 {{ erroridf "error-C" "%s" "C"}}
@@ -52,7 +52,7 @@ func TestWarnidf(t *testing.T) {
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 ignoreLogs = ['warning-b', 'WarniNg-C']
--- layouts/index.html --
+-- layouts/home.html --
 {{ warnidf "warning-a" "%s" "a"}}
 {{ warnidf "warning-b" "%s" "b"}}
 {{ warnidf "warNing-C" "%s" "c"}}
index 226165070265f94001d625fc7e62233b7bee2bd8..59cdd0f46d4dd12c8905a50a08b014ada2e2a8ae 100644 (file)
@@ -33,7 +33,7 @@ theme = ["mytheme"]
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
 -- themes/mytheme/static/images/pixel2.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{ $path := "static/images/pixel1.png" }}
 fileExists OK: {{ fileExists $path }}|
 imageConfig OK: {{ (imageConfig $path).Width }}|
@@ -59,7 +59,7 @@ func TestQR(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{- $text := "https://gohugo.io" }}
 {{- $optionMaps := slice
     (dict)
@@ -117,7 +117,7 @@ func TestImagesGoldenFuncs(t *testing.T) {
 -- assets/sunset.jpg --
 sourcefilename: ../../resources/testdata/sunset.jpg
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 
 {{ template "copy" (dict "name" "qr-default.png" "img" (images.QR "https://gohugo.io"))  }}
index 58e0ef70a2f06f92ee85cec9f2d33cff6e00caff..e7f3c8810f7b2a0a0417c10ef57e495b74e01472 100644 (file)
@@ -30,7 +30,7 @@ theme = "mytheme"
 Hello project!
 -- themes/mytheme/mytheme.txt --
 Hello theme!
--- layouts/index.html --
+-- layouts/home.html --
 {{ $entries := (readDir ".") }}
 START:|{{ range $entry := $entries }}{{ if not $entry.IsDir }}{{ $entry.Name }}|{{ end }}{{ end }}:END:
 
@@ -56,7 +56,7 @@ func TestReadFileNotExists(t *testing.T) {
 
        files := `
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $fi := (readFile "doesnotexist") }}
 {{ if $fi }}Failed{{ else }}OK{{ end }}
 
index 3f2154921575ddc69a15b860d8958409606fe60b..e6d556dd3ac9e3947f82d1150d9d7e26d04a25cd 100644 (file)
@@ -65,29 +65,29 @@ title: "P2_1"
 ---
 {{< foo.inline >}}{{ if page.IsHome }}Shortcode in bundled page OK.{{ else}}Failed.{{ end }}{{< /foo.inline >}}
 -- content/p3.md --
--- layouts/_default/_markup/render-heading.html --
+-- layouts/_markup/render-heading.html --
 {{ if page.IsHome }}
 Heading OK.
 {{ end }}
--- layouts/_default/_markup/render-image.html --
+-- layouts/_markup/render-image.html --
 {{ if page.IsHome }}
 Image OK.
 {{ end }}
--- layouts/_default/_markup/render-link.html --
+-- layouts/_markup/render-link.html --
 {{ if page.IsHome }}
 Link OK.
 {{ end }}
--- layouts/_default/myview.html
+-- layouts/myview.html
 {{ if page.IsHome }}
 Render OK.
 {{ end }}
--- layouts/_default/_markup/render-codeblock.html --
+-- layouts/_markup/render-codeblock.html --
 {{ if page.IsHome }}
 Codeblock OK.
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Single.
--- layouts/index.html --
+-- layouts/home.html --
 {{ if eq page . }}Page OK.{{ end }}
 {{ $r := "{{ if page.IsHome }}ExecuteAsTemplate OK.{{ end }}" | resources.FromString "foo.html" |  resources.ExecuteAsTemplate "foo.html" . }}
 {{ $r.Content }}
@@ -104,13 +104,13 @@ Bundled page: {{ $p2_1.Content }}
 {{ if eq page .Page }}Alias OK.{{ else }}Failed.{{ end }}
 -- layouts/404.html --
 {{ if eq page . }}404 Page OK.{{ else }}Failed.{{ end }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 {{ if page.IsHome }}Partial OK.{{ else }}Failed.{{ end }}
--- layouts/shortcodes/outer.html --
+-- layouts/_shortcodes/outer.html --
 {{ .Inner }}
--- layouts/shortcodes/inner.html --
+-- layouts/_shortcodes/inner.html --
 {{ if page.IsHome }}Shortcode Inner OK.{{ else }}Failed.{{ end }}
--- layouts/shortcodes/shortcode.html --
+-- layouts/_shortcodes/shortcode.html --
 {{ if page.IsHome }}Shortcode {{ .Get 0 }} OK.{{ else }}Failed.{{ end }}
 -- layouts/sitemap.xml --
 {{ if eq page . }}Sitemap OK.{{ else }}Failed.{{ end }}
@@ -194,9 +194,9 @@ title: "P1"
 {{< toc >}}
 
 # Heading 1
--- layouts/shortcodes/toc.html --
+-- layouts/_shortcodes/toc.html --
 {{ page.TableOfContents }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
@@ -211,7 +211,7 @@ func TestFromStringRunning(t *testing.T) {
        files := `
 -- hugo.toml --
 disableLiveReload = true
--- layouts/index.html --
+-- layouts/home.html --
 {{ with resources.FromString "foo" "{{ seq 3 }}" }}
 {{ with resources.ExecuteAsTemplate "bar" $ . }}
        {{ .Content | safeHTML }}
index 91ee56a5f4aa2c13421ec8835c9bff71448ce6ef..fccb746372dd34969f19860e6011ecc76455f7ef 100644 (file)
@@ -33,9 +33,9 @@ func TestInclude(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 partial: {{ partials.Include "foo.html" . }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 foo
   `
 
@@ -52,10 +52,10 @@ func TestIncludeCached(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 partialCached: {{ partials.IncludeCached "foo.html" . }}
 partialCached: {{ partials.IncludeCached "foo.html" . }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 foo
   `
 
@@ -74,11 +74,11 @@ func TestIncludeCachedRecursion(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 {{ partials.IncludeCached "p1.html" . }}
--- layouts/partials/p1.html --
+-- layouts/_partials/p1.html --
 {{ partials.IncludeCached "p2.html" . }}
--- layouts/partials/p2.html --
+-- layouts/_partials/p2.html --
 P2
 
   `
@@ -102,13 +102,13 @@ baseURL = 'http://example.com/'
 title: "Index"
 ---
 {{< short >}}
--- layouts/index.html --
+-- layouts/home.html --
 {{ partials.IncludeCached "p1.html" . }}
--- layouts/partials/p1.html --
+-- layouts/_partials/p1.html --
 {{ .Content }}
 {{ partials.IncludeCached "p2.html" . }}
--- layouts/partials/p2.html --
--- layouts/shortcodes/short.html --
+-- layouts/_partials/p2.html --
+-- layouts/_shortcodes/short.html --
 SHORT
 {{ partials.IncludeCached "p2.html" . }}
 P2
@@ -134,7 +134,7 @@ templateMetricsHints=true
 disableKinds = ["page", "section", "taxonomy", "term", "sitemap"]
 [outputs]
 home = ["HTML"]
--- layouts/index.html --
+-- layouts/home.html --
 {{ partials.IncludeCached "static1.html" . }}
 {{ partials.IncludeCached "static1.html" . }}
 {{ partials.Include "static2.html" . }}
@@ -147,13 +147,13 @@ H1I: {{ partials.Include "halfdynamic1.html" . }}
 H1C: {{ partials.IncludeCached "halfdynamic1.html" . }}
 H1C: {{ partials.IncludeCached "halfdynamic1.html" . }}
 
--- layouts/partials/static1.html --
+-- layouts/_partials/static1.html --
 P1
--- layouts/partials/static2.html --
+-- layouts/_partials/static2.html --
 P2
--- layouts/partials/dynamic1.html --
+-- layouts/_partials/dynamic1.html --
 {{ math.Counter }}
--- layouts/partials/halfdynamic1.html --
+-- layouts/_partials/halfdynamic1.html --
 D1
 {{ math.Counter }}
 
@@ -192,7 +192,7 @@ D1
        got = normalize(got)
 
        expect := `
-       0        0       0      1  index.html
+       0        0       0      1  home.html
        100        0       0      1  _partials/static2.html
        100       50       1      2  _partials/static1.html
        25       50       2      4  _partials/dynamic1.html
@@ -207,17 +207,17 @@ func BenchmarkIncludeCached(b *testing.B) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
--- layouts/_default/single.html --
+-- layouts/home.html --
+-- layouts/single.html --
 {{ partialCached "heavy.html" "foo" }}
 {{ partialCached "easy1.html" "bar" }}
 {{ partialCached "easy1.html" "baz" }}
 {{ partialCached "easy2.html" "baz" }}
--- layouts/partials/easy1.html --
+-- layouts/_partials/easy1.html --
 ABCD
--- layouts/partials/easy2.html --
+-- layouts/_partials/easy2.html --
 ABCDE
--- layouts/partials/heavy.html --
+-- layouts/_partials/heavy.html --
 {{ $result := slice }}
 {{ range site.RegularPages }}
 {{ $result = $result | append (dict "title" .Title "link" .RelPermalink "readingTime" .ReadingTime) }}
@@ -252,9 +252,9 @@ func TestIncludeTimeout(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 {{ partials.Include "foo.html" . }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 {{ partial "foo.html" . }}
   `
 
@@ -276,11 +276,11 @@ func TestIncludeCachedTimeout(t *testing.T) {
 -- config.toml --
 baseURL = 'http://example.com/'
 timeout = '200ms'
--- layouts/index.html --
+-- layouts/home.html --
 {{ partials.IncludeCached "foo.html" . }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 {{ partialCached "bar.html" . }}
--- layouts/partials/bar.html --
+-- layouts/_partials/bar.html --
 {{ partialCached "foo.html" . }}
   `
 
@@ -303,15 +303,15 @@ func TestIncludeCachedDifferentKey(t *testing.T) {
 -- config.toml --
 baseURL = 'http://example.com/'
 timeout = '200ms'
--- layouts/index.html --
+-- layouts/home.html --
 {{ partialCached "foo.html" "a" "a" }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 {{ if eq . "a" }}
 {{ partialCached "bar.html" . }}
 {{ else }}
 DONE
 {{ end }}
--- layouts/partials/bar.html --
+-- layouts/_partials/bar.html --
 {{ partialCached "foo.html" "b" "b" }}
   `
        b := hugolib.Test(t, files)
@@ -328,13 +328,13 @@ func TestReturnExecuteFromTemplateInPartial(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 {{ $r :=  partial "foo" }}
 FOO:{{ $r.Content }}
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
 {{ $r := §§{{ partial "bar" }}§§ | resources.FromString "bar.html" | resources.ExecuteAsTemplate "bar.html" . }}
 {{ return $r }}
--- layouts/partials/bar.html --
+-- layouts/_partials/bar.html --
 BAR
   `
 
index da3ff11685074ec877ab41d2b1c36840573a0866..9e26a09ab48771f1a462ae9b373bb9d8258f91c1 100644 (file)
@@ -30,7 +30,7 @@ func TestCopy(t *testing.T) {
 baseURL = "http://example.com/blog"
 -- assets/images/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{/* Image resources */}}
 {{ $img := resources.Get "images/pixel.png" }}
 {{ $imgCopy1 := $img | resources.Copy "images/copy.png"  }}
@@ -80,7 +80,7 @@ func TestCopyPageShouldFail(t *testing.T) {
 
        files := `
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{/* This is currently not supported. */}}
 {{ $copy := .Copy "copy.md" }}
 
@@ -103,7 +103,7 @@ func TestGet(t *testing.T) {
 baseURL = "http://example.com/blog"
 -- assets/images/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/index.html --
+-- layouts/home.html --
 {{ with resources.Get "images/pixel.png" }}Image OK{{ else }}Image not found{{ end }}
 {{ with resources.Get "" }}Failed{{ else }}Empty string not found{{ end }}
 
@@ -127,7 +127,7 @@ func TestResourcesGettersShouldNotNormalizePermalinks(t *testing.T) {
 baseURL = "http://example.com/"
 -- assets/401K Prospectus.txt --
 Prospectus.
--- layouts/index.html --
+-- layouts/home.html --
 {{ $name := "401K Prospectus.txt" }}
 Get: {{ with resources.Get $name }}{{ .RelPermalink }}|{{ .Permalink }}|{{ end }}
 GetMatch: {{ with resources.GetMatch $name }}{{ .RelPermalink }}|{{ .Permalink }}|{{ end }}
@@ -156,7 +156,7 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 I am a.txt
 -- assets/b.txt --
 I am b.txt
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ with resources.ByType "text" }}
   {{ with .Get "a.txt" }}
@@ -188,7 +188,7 @@ I am b.txt
 I am c.txt
 -- assets/files/C.txt --
 I am C.txt
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ with resources.ByType "text" }}
   {{ with .Get "files/a.txt" }}
@@ -252,7 +252,7 @@ func TestDartSassVars(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','section','rss','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "transpiler" "dartsass" "outputStyle" "compressed" "vars" (dict "color" "red") }}
 {{ with resources.Get "dartsass.scss" | css.Sass $opts }}
   {{ .Content }}
index f5ee09c06d6a0f8a31e8ce0a8dcfb9c20d792060..f876b0b7e2dc4650b461bcccb970b834b08db34b 100644 (file)
@@ -53,7 +53,7 @@ outputs: ["html", "amp"]
 Hello.
 -- layouts/baseof.html --
 HTML|{{ block "main" . }}{{ end }}$
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 EDIT_COUNTER_OUTSIDE_0
 {{ .Store.Set "hello" "Hello" }}
@@ -76,7 +76,7 @@ func TestDeferNoBaseof(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ with (templates.Defer (dict "key" "foo")) }}
  Defer
@@ -103,7 +103,7 @@ func TestDeferBaseof(t *testing.T) {
 Defer
 {{ end }}
 Block:{{ block "main" . }}{{ end }}$
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 Home.
 {{ end }}
@@ -127,7 +127,7 @@ func TestDeferMain(t *testing.T) {
 -- layouts/baseof.html --
 
 Block:{{ block "main" . }}{{ end }}$
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
 Home.
 {{ with (templates.Defer (dict "key" "foo")) }}
@@ -165,7 +165,7 @@ func TestDeferRepeatedBuildsEditOutside(t *testing.T) {
        for i := range 5 {
                old := fmt.Sprintf("EDIT_COUNTER_OUTSIDE_%d", i)
                new := fmt.Sprintf("EDIT_COUNTER_OUTSIDE_%d", i+1)
-               b.EditFileReplaceAll("layouts/index.html", old, new).Build()
+               b.EditFileReplaceAll("layouts/home.html", old, new).Build()
                b.AssertFileContent("public/index.html", new)
        }
 }
@@ -178,7 +178,7 @@ func TestDeferRepeatedBuildsEditDefer(t *testing.T) {
        for i := range 8 {
                old := fmt.Sprintf("EDIT_COUNTER_DEFER_%d", i)
                new := fmt.Sprintf("EDIT_COUNTER_DEFER_%d", i+1)
-               b.EditFileReplaceAll("layouts/index.html", old, new).Build()
+               b.EditFileReplaceAll("layouts/home.html", old, new).Build()
                b.AssertFileContent("public/index.html", new)
        }
 }
@@ -207,7 +207,7 @@ func TestDeferEditDeferBlock(t *testing.T) {
 
        b := hugolib.TestRunning(t, deferFilesCommon)
        b.AssertRenderCountPage(4)
-       b.EditFileReplaceAll("layouts/index.html", "REPLACE_ME", "Edited.").Build()
+       b.EditFileReplaceAll("layouts/home.html", "REPLACE_ME", "Edited.").Build()
        b.AssertFileContent("public/index.html", "Edited.")
        b.AssertRenderCountPage(2)
 }
@@ -240,7 +240,7 @@ target = "layouts"
 source = 'public'
 target = 'assets/public'
 disableWatch = true
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $mydata := dict "v1" "v1value" }}
 {{ $json := resources.FromString "mydata/data.json" ($mydata | jsonify ) }}
@@ -283,7 +283,7 @@ func TestDeferPostProcessShouldThrowAnError(t *testing.T) {
 -- hugo.toml --
 -- assets/mytext.txt --
 ABCD.
--- layouts/index.html --
+-- layouts/home.html --
 Home
 {{ with (templates.Defer (dict "key" "foo")) }}
 {{ $mytext := resources.Get "mytext.txt" | minify | resources.PostProcess }}
@@ -302,7 +302,7 @@ func TestDeferMultipleInSameTemplate(t *testing.T) {
 
        files := `
 -- hugo.toml --
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 ...
 {{ with (templates.Defer (dict "data" (dict "a" "b") )) }}
index 7bd1f50c5a2dc7c235a341c8dba2c3a61a2f1635..4e5251d0dc70626227cbace7864782482407a8e7 100644 (file)
@@ -34,8 +34,8 @@ func init() {
                ns.AddMethodMapping(ctx.Exists,
                        nil,
                        [][2]string{
-                               {`{{ if (templates.Exists "partials/header.html") }}Yes!{{ end }}`, `Yes!`},
-                               {`{{ if not (templates.Exists "partials/doesnotexist.html") }}No!{{ end }}`, `No!`},
+                               {`{{ if (templates.Exists "_partials/header.html") }}Yes!{{ end }}`, `Yes!`},
+                               {`{{ if not (templates.Exists "_partials/doesnotexist.html") }}No!{{ end }}`, `No!`},
                        },
                )
 
index a1bd9a1937c73624601f27e825407dc8f9d9c9f4..5900ed685024e7f26620e0aeb42e4d66011b2f59 100644 (file)
@@ -27,22 +27,22 @@ func TestExists(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
-index.html: {{ templates.Exists "index.html" }}
+-- layouts/home.html --
+home.html: {{ templates.Exists "home.html" }}
 post/single.html: {{ templates.Exists "post/single.html" }}
-partials/foo.html: {{ templates.Exists "partials/foo.html" }}
-partials/doesnotexist.html: {{ templates.Exists "partials/doesnotexist.html" }}
+_partials/foo.html: {{ templates.Exists "_partials/foo.html" }}
+_partials/doesnotexist.html: {{ templates.Exists "_partials/doesnotexist.html" }}
 -- layouts/post/single.html --
--- layouts/partials/foo.html --
+-- layouts/_partials/foo.html --
   `
 
        b := hugolib.Test(t, files)
 
        b.AssertFileContent("public/index.html", `
-index.html: true
+home.html: true
 post/single.html: true
-partials/foo.html: true
-partials/doesnotexist.html: false  
+_partials/foo.html: true
+_partials/doesnotexist.html: false  
 `)
 }
 
@@ -54,9 +54,9 @@ func TestExistsWithBaseOf(t *testing.T) {
 baseURL = 'http://example.com/'
 -- layouts/baseof.html --
 {{ block "main" . }}{{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}
-index.html: {{ templates.Exists "index.html" }}
+index.html: {{ templates.Exists "home.html" }}
 post/single.html: {{ templates.Exists "post/single.html" }}
 post/doesnotexist.html: {{ templates.Exists "post/doesnotexist.html" }}
 {{ end }}
@@ -83,7 +83,7 @@ func TestPageFunctionExists(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 Home: {{ page.IsHome }}
 
 `
@@ -102,7 +102,7 @@ func TestTry(t *testing.T) {
        files := `
 -- config.toml --
 baseURL = 'http://example.com/'
--- layouts/index.html --
+-- layouts/home.html --
 Home.
 {{ $g :=  try ("hello = \"Hello Hugo\"" | transform.Unmarshal)   }}
 {{ with $g.Err }}
@@ -124,7 +124,7 @@ Try printf: {{ (try (printf "hello %s" "world")).Value }}
 
        b.AssertFileContent("public/index.html",
                "Value1: Hello Hugo|",
-               "Err2: template: index.html:",
+               "Err2: template: home.html:",
                "Try upper: HELLO",
                "Try printf: hello world",
        )
diff --git a/tpl/tplimpl/legacy_integration_test.go b/tpl/tplimpl/legacy_integration_test.go
deleted file mode 100644 (file)
index a96e35f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2025 The Hugo Authors. All rights reserved.
-//
-// Portions Copyright The Go Authors.
-
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package tplimpl_test
-
-import (
-       "testing"
-
-       "github.com/gohugoio/hugo/hugolib"
-)
-
-func TestLegacyPartialIssue13599(t *testing.T) {
-       t.Parallel()
-
-       files := `
--- hugo.toml --
--- layouts/partials/mypartial.html --
-Mypartial.
--- layouts/_default/index.html --
-mypartial:   {{ template "partials/mypartial.html" . }}
-
-`
-       b := hugolib.Test(t, files)
-
-       b.AssertFileContent("public/index.html", "Mypartial.")
-}
index e6770159403c71307886c445ba285de24e1073a5..640748e60413afa833443f2f7b475f37a9568d1d 100644 (file)
@@ -28,9 +28,9 @@ func TestEmbeddedLinkRenderHook(t *testing.T) {
 disableKinds = ['rss','sitemap','taxonomy','term']
 [markup.goldmark.renderHooks.link]
 enableDefault = true
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ .Content }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 -- assets/a.txt --
 irrelevant
@@ -168,7 +168,7 @@ enableDefault = true
 {id="\"><script>alert()</script>"}
 -- content/p1/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content }}
 `
 
index 2a165735cd6b6faba8bfb2e052cb8f20aa565f66..3e72770f8186802e3400cd94394e36f6784a7dd1 100644 (file)
@@ -28,7 +28,7 @@ func TestCommentShortcode(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- content/_index.md --
 ---
@@ -48,7 +48,7 @@ func TestDetailsShortcode(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- content/_index.md --
 ---
@@ -116,7 +116,7 @@ title: home
   attr="an _emphasized_ word"
   attrlink="https://example.org/foo"
 >}}
--- layouts/index.html --
+-- layouts/home.html --
 Hash: {{ .Content | hash.XxHash }}
 Content: {{ .Content }}
 `
@@ -131,7 +131,7 @@ func TestGistShortcode(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- content/_index.md --
 ---
@@ -151,7 +151,7 @@ func TestHighlightShortcode(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['home','rss','section','sitemap','taxonomy','term']
--- layouts/_default/single.html --
+-- layouts/single.html --
 Hash: {{ .Content | hash.XxHash }}
 Content: {{ .Content }}
 -- content/p1.md --
@@ -250,7 +250,7 @@ privacy.instagram.simple = false
 title: home
 ---
 {{< instagram CxOWiQNP2MO >}}
--- layouts/index.html --
+-- layouts/home.html --
 Hash: {{ .Content | hash.XxHash }}
 Content: {{ .Content }}
 `
@@ -273,7 +273,7 @@ func TestParamShortcode(t *testing.T) {
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
 [params]
 b = 2
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- content/_index.md --
 ---
@@ -300,7 +300,7 @@ func TestQRShortcode(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- content/_index.md --
 ---
@@ -346,11 +346,11 @@ weight = 1
 weight = 2
 [outputs]
 page = ['html','json']
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{ .Content }}
--- layouts/_default/single.html.html --
+-- layouts/single.html.html --
 {{ .Title }}
--- layouts/_default/single.json.json --
+-- layouts/single.json.json --
 {{ .Title }}
 -- content/_index.en.md --
 ---
@@ -411,11 +411,11 @@ weight = 1
 weight = 2
 [outputs]
 page = ['html','json']
--- layouts/_default/home.html --
+-- layouts/home.html --
 {{ .Content }}
--- layouts/_default/single.html.html --
+-- layouts/single.html.html --
 {{ .Title }}
--- layouts/_default/single.json.json --
+-- layouts/single.json.json --
 {{ .Title }}
 -- content/_index.en.md --
 ---
@@ -482,7 +482,7 @@ title: p2
 title: p3
 ---
 {{< vimeo id=55073825 allowFullScreen=false >}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 Hash: {{ .Content | hash.XxHash }}
 Content: {{ .Content }}
 `
@@ -539,7 +539,7 @@ title: p4
 title: p5
 ---
 {{< twitter_simple user="SanDiegoZoo" id="1453110110599868418" >}}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Content | strings.TrimSpace | safeHTML }}
 --
 `
@@ -638,7 +638,7 @@ title: home
 {{< x_simple user="__user_does_not_exist__" id="__id_does_not_exist__" >}}
 {{< twitter user="__user_does_not_exist__" id="__id_does_not_exist__" >}}
 {{< twitter_simple user="__user_does_not_exist__" id="__id_does_not_exist__" >}}
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 `
 
@@ -659,7 +659,7 @@ func TestYouTubeShortcode(t *testing.T) {
 -- hugo.toml --
 disableKinds = ['home','rss','section','sitemap','taxonomy','term']
 privacy.youtube.privacyEnhanced = false
--- layouts/_default/single.html --
+-- layouts/single.html --
 Hash: {{ .Content | hash.XxHash }}
 Content: {{ .Content }}
 -- content/p1.md --
index 639db909acc46bc0898a89e4d537d1442e50cfc9..d71c3e445b183cd36f9fcedf74aa63be3283a25b 100644 (file)
@@ -31,12 +31,12 @@ func TestTemplateFuncsExamples(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds=["home", "section", "taxonomy", "term", "sitemap", "robotsTXT"]
 ignoreErrors = ["my-err-id"]
 [outputs]
 home=["HTML"]
--- layouts/partials/header.html --
+-- layouts/_partials/header.html --
 <title>Hugo Rocks!</title>
 -- files/README.txt --
 Hugo Rocks!
@@ -77,7 +77,7 @@ title: "**BatMan**"
                }
        }
 
-       files += fmt.Sprintf("-- layouts/_default/single.html --\n%s\n", strings.Join(templates, "\n"))
+       files += fmt.Sprintf("-- layouts/single.html --\n%s\n", strings.Join(templates, "\n"))
        b = hugolib.NewIntegrationTestBuilder(
                hugolib.IntegrationTestConfig{
                        T:           t,
index 3dcc70103d4472130e6d88925582bcf6e529a20f..b667221bf83334b7940c3e1f159a7f95378f5dbd 100644 (file)
@@ -1,3 +1,16 @@
+// Copyright 2025 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package tplimpl_test
 
 import (
@@ -13,149 +26,6 @@ import (
        "github.com/gohugoio/hugo/tpl/tplimpl"
 )
 
-// Old as in before Hugo v0.146.0.
-func TestLayoutsOldSetup(t *testing.T) {
-       t.Parallel()
-
-       files := `
--- hugo.toml --
-defaultContentLanguage = "en"
-defaultContentLanguageInSubdir = true
-[languages]
-[languages.en]
-title = "Title in English"
-weight = 1
-[languages.nn]
-title = "Tittel på nynorsk"
-weight = 2
--- layouts/index.html --
-Home.
-{{ template "_internal/twitter_cards.html" . }}
--- layouts/_default/single.html --
-Single.
--- layouts/_default/single.nn.html --
-Single NN.
--- layouts/_default/list.html --
-List HTML.
--- layouts/docs/list-baseof.html --
-Docs Baseof List HTML.
-{{ block "main" . }}Docs Baseof List HTML main block.{{ end }}
--- layouts/docs/list.section.html --
-{{ define "main" }}
-Docs List HTML.
-{{ end }}
--- layouts/_default/list.json --
-List JSON.
--- layouts/_default/list.rss.xml --
-List RSS.
--- layouts/_default/list.nn.rss.xml --
-List NN RSS.
--- layouts/_default/baseof.html --
-Base.
--- layouts/partials/mypartial.html --
-Partial.
--- layouts/shortcodes/myshortcode.html --
-Shortcode.
--- content/docs/p1.md --
----
-title: "P1"
----
-
-       `
-
-       b := hugolib.Test(t, files)
-
-       //      b.DebugPrint("", tplimpl.CategoryBaseof)
-
-       b.AssertFileContent("public/en/docs/index.html", "Docs Baseof List HTML.\n\nDocs List HTML.")
-}
-
-func TestLayoutsOldSetupBaseofPrefix(t *testing.T) {
-       t.Parallel()
-
-       files := `
--- hugo.toml --
--- layouts/_default/layout1-baseof.html --
-Baseof layout1. {{ block "main" . }}{{ end }}
--- layouts/_default/layout2-baseof.html --
-Baseof layout2. {{ block "main" . }}{{ end }}
--- layouts/_default/layout1.html --
-{{ define "main" }}Layout1. {{ .Title }}{{ end }}
--- layouts/_default/layout2.html --
-{{ define "main" }}Layout2. {{ .Title }}{{ end }}
--- content/p1.md --
----
-title: "P1"
-layout: "layout1"
----
--- content/p2.md --
----
-title: "P2"
-layout: "layout2"
----
-`
-
-       b := hugolib.Test(t, files)
-
-       b.AssertFileContent("public/p1/index.html", "Baseof layout1. Layout1. P1")
-       b.AssertFileContent("public/p2/index.html", "Baseof layout2. Layout2. P2")
-}
-
-func TestLayoutsOldSetupTaxonomyAndTerm(t *testing.T) {
-       t.Parallel()
-
-       files := `
--- hugo.toml --
-[taxonomies]
-cat = 'cats'
-dog = 'dogs'
-# Templates for term taxonomy, old setup.
--- layouts/dogs/terms.html --
-Dogs Terms. Most specific taxonomy template.
--- layouts/taxonomy/terms.html --
-Taxonomy Terms. Down the list.
-# Templates for term term, old setup.
--- layouts/dogs/term.html --
-Dogs Term. Most specific term template.
--- layouts/term/term.html --
-Term Term. Down the list.
--- layouts/dogs/max/list.html --
-max: {{ .Title }}
--- layouts/_default/list.html --
-Default list.
--- layouts/_default/single.html --
-Default single.
--- content/p1.md --
----
-title: "P1"
-dogs: ["luna", "daisy", "max"]
----
-
-`
-       b := hugolib.Test(t, files, hugolib.TestOptWarn())
-
-       b.AssertLogContains("! WARN")
-
-       b.AssertFileContent("public/dogs/index.html", "Dogs Terms. Most specific taxonomy template.")
-       b.AssertFileContent("public/dogs/luna/index.html", "Dogs Term. Most specific term template.")
-       b.AssertFileContent("public/dogs/max/index.html", "max: Max") // layouts/dogs/max/list.html wins over layouts/term/term.html because of distance.
-}
-
-func TestLayoutsOldSetupCustomRSS(t *testing.T) {
-       t.Parallel()
-
-       files := `
--- hugo.toml --
-disableKinds = ["taxonomy", "term", "page"]
-[outputs]
-home = ["rss"]
--- layouts/_default/list.rss.xml --
-List RSS.
-`
-       b := hugolib.Test(t, files)
-       b.AssertFileContent("public/index.xml", "List RSS.")
-}
-
 var newSetupTestSites = `
 -- hugo.toml --
 defaultContentLanguage = "en"
@@ -237,15 +107,15 @@ Base fr.{{ block "main" . }}{{ end }}
 Base term.
 -- layouts/baseof.section.fr.amp.html --
 Base with identifiers.{{ block "main" . }}{{ end }}
--- layouts/partials/mypartial.html --
+-- layouts/_partials/mypartial.html --
 Partial. {{ partial "_inline/my-inline-partial-in-partial-with-no-ext" . }}
 {{ define "partials/_inline/my-inline-partial-in-partial-with-no-ext" }}
 Partial in partial.
 {{ end }}
--- layouts/partials/returnfoo.html --
+-- layouts/_partials/returnfoo.html --
 {{ $v := "foo" }}
 {{ return $v }}
--- layouts/shortcodes/myshortcode.html --
+-- layouts/_shortcodes/myshortcode.html --
 Shortcode. {{ partial "mypartial.html" . }}|return:{{ partial "returnfoo.html" . }}|
 -- content/_index.md --
 ---
@@ -348,7 +218,7 @@ home = ["html", "rss"]
 Home: {{ .Title }}|{{ .Content }}|
 -- layouts/single.html --
 Single: {{ .Title }}|{{ .Content }}|
--- layouts/shortcodes/myshortcode.html --
+-- layouts/_shortcodes/myshortcode.html --
 Myshortcode: Count: {{ math.Counter }}|
 -- content/p1.md --
 ---
@@ -493,10 +363,10 @@ title: "P1"
 {{ block "main" . }}{{ end }}
 -- layouts/baseof.json --
 {{ block "main" . }}{{ end }}
--- layouts/index.html --
+-- layouts/home.html --
 {{ define "main" }}FOO{{ end }}
--- layouts/_default/single.json --
--- layouts/_default/single.html --
+-- layouts/single.json --
+-- layouts/single.html --
 {{ define "main" }}MAIN /_default/single.html{{ end }}
 -- layouts/post/single.html --
 {{ define "main" }}MAIN{{ end }}
@@ -504,7 +374,7 @@ title: "P1"
 -- layouts/_partials/unusedpartial.html --
 -- layouts/_shortcodes/usedshortcode.html --
 {{ partial "usedpartial.html" }}
--- layouts/shortcodes/unusedshortcode.html --
+-- layouts/_shortcodes/unusedshortcode.html --
 
        `
 
@@ -527,7 +397,7 @@ title: "P1"
                }
        }
 
-       b.Assert(names, qt.DeepEquals, []string{"_partials/unusedpartial.html", "shortcodes/unusedshortcode.html", "baseof.json", "post/single.html", "_default/single.json"})
+       b.Assert(names, qt.DeepEquals, []string{"_partials/unusedpartial.html", "_shortcodes/unusedshortcode.html", "baseof.json", "post/single.html", "single.json"})
        b.Assert(len(unused), qt.Equals, 5, qt.Commentf("%#v", names))
 }
 
@@ -619,102 +489,6 @@ layouts/nn/all.html
        b.AssertFileContent("public/admin/v1.0.0/en/index.html", "layouts/v1/all.html")
 }
 
-func TestLayoutWithLanguagesLegacy(t *testing.T) {
-       t.Parallel()
-       files := `
--- hugo.toml --
-disableKinds = ["taxonomy", "term", "sitemap", "rss"]
-defaultContentLanguage = "en"
-defaultContentLanguageInSubdir = true
-[languages]
-[languages.en]
-weight = 1
-[languages.nn]
-weight = 2
-[languages.sv]
-weight = 3
--- layouts/_default/single.en.html --
-layouts/_default/single.html
--- layouts/_default/single.nn.html --
-layouts/_default/single.nn.html
--- layouts/_default/single.sv.html --
-layouts/_default/single.sv.html
--- content/p1.md --
----
-title: "P1"
----
--- content/p1.nn.md --
----
-title: "P1 NN"
----
--- content/p1.sv.md --
----
-title: "P1 SV"
----
-`
-       b := hugolib.Test(t, files)
-
-       b.AssertFileContent("public/en/p1/index.html", "layouts/_default/single.html")
-       b.AssertFileContent("public/nn/p1/index.html", "layouts/_default/single.nn.html")
-       b.AssertFileContent("public/sv/p1/index.html", "layouts/_default/single.sv.html")
-}
-
-func TestLayoutWithLanguagesLegacyMounts(t *testing.T) {
-       t.Parallel()
-       files := `
--- hugo.toml --
-disableKinds = ["taxonomy", "term", "sitemap", "rss"]
-defaultContentLanguage = "en"
-defaultContentLanguageInSubdir = true
-[languages]
-[languages.en]
-weight = 1
-[languages.nn]
-weight = 2
-[languages.sv]
-weight = 3
-
-
-[[module.mounts]]
-source = 'layouts/en'
-target = 'layouts'
-lang = 'en'
-
-[[module.mounts]]
-source = 'layouts/nn'
-target = 'layouts'
-lang = 'nn'
-[[module.mounts]]
-source = 'layouts/sv'
-target = 'layouts'
-lang = 'sv'
-
--- layouts/en/_default/single.html --
-layouts/en/_default/single.html
--- layouts/nn/_default/single.html --
-layouts/nn/_default/single.html
--- layouts/sv/_default/single.html --
-layouts/sv/_default/single.html
--- content/p1.md --
----
-title: "P1"
----
--- content/p1.nn.md --
----
-title: "P1 NN"
----
--- content/p1.sv.md --
----
-title: "P1 SV"
----
-`
-       b := hugolib.Test(t, files)
-
-       b.AssertFileContent("public/en/p1/index.html", "layouts/en/_default/single.html")
-       b.AssertFileContent("public/nn/p1/index.html", "layouts/nn/_default/single.html")
-       b.AssertFileContent("public/sv/p1/index.html", "layouts/sv/_default/single.html")
-}
-
 func BenchmarkLookupPagesLayout(b *testing.B) {
        files := `
 -- hugo.toml --
@@ -794,7 +568,7 @@ weight = 2
 -- layouts/list.xml --
 layouts/list.xml
 -- layouts/_shortcodes/myshortcode.html --
-layouts/shortcodes/myshortcode.html
+layouts/_shortcodes/myshortcode.html
 -- layouts/foo/bar/_shortcodes/myshortcode.html --
 layouts/foo/bar/_shortcodes/myshortcode.html
 -- layouts/_markup/render-codeblock.html --
@@ -884,7 +658,7 @@ layout: mylayout
                b.AssertFileContent("public/en/p/index.html", "layouts/single.html",
                        "layouts/_markup/render-codeblock.html|",
                        "layouts/_markup/render-codeblock-go.html|go|",
-                       "layouts/shortcodes/myshortcode.html",
+                       "layouts/_shortcodes/myshortcode.html",
                )
                b.AssertFileContent("public/en/foo/p/index.html", "layouts/single.html")
                b.AssertFileContent("public/en/foo/bar/p/index.html", "layouts/foo/bar/page.html")
@@ -1142,7 +916,7 @@ func TestPartialHTML(t *testing.T) {
 {{ partial "css.html" .}}
 </head>
 </html>
--- layouts/partials/css.html --
+-- layouts/_partials/css.html --
 <link rel="stylesheet" href="/css/style.css">
 `
 
@@ -1162,7 +936,7 @@ func TestPartialPlainTextInHTML(t *testing.T) {
 {{ partial "mypartial.txt" . }}
 </head>
 </html>
--- layouts/partials/mypartial.txt --
+-- layouts/_partials/mypartial.txt --
 My <div>partial</div>.
 `
 
@@ -1330,7 +1104,7 @@ printPathWarnings = true
 -- content/v0.123.0.md --
 -- layouts/all.html --
 All.
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}|
 `
 
@@ -1758,7 +1532,7 @@ title: home
 a|b
 :--|:--
 1|2
--- layouts/index.html --
+-- layouts/home.html --
 {{ .Content }}
 -- layouts/index.json --
 {{ .Content }}
diff --git a/tpl/tplimpl/templatestore_legacy1_integration_test.go b/tpl/tplimpl/templatestore_legacy1_integration_test.go
new file mode 100644 (file)
index 0000000..b1fdbd3
--- /dev/null
@@ -0,0 +1,275 @@
+// Copyright 2025 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package tplimpl_test
+
+import (
+       "testing"
+
+       "github.com/gohugoio/hugo/hugolib"
+)
+
+// Old as in before Hugo v0.146.0.
+func TestLayoutsOldSetup(t *testing.T) {
+       t.Parallel()
+
+       files := `
+-- hugo.toml --
+defaultContentLanguage = "en"
+defaultContentLanguageInSubdir = true
+[languages]
+[languages.en]
+title = "Title in English"
+weight = 1
+[languages.nn]
+title = "Tittel på nynorsk"
+weight = 2
+-- layouts/index.html --
+Home.
+{{ template "_internal/twitter_cards.html" . }}
+-- layouts/_default/single.html --
+Single.
+-- layouts/_default/single.nn.html --
+Single NN.
+-- layouts/_default/list.html --
+List HTML.
+-- layouts/docs/list-baseof.html --
+Docs Baseof List HTML.
+{{ block "main" . }}Docs Baseof List HTML main block.{{ end }}
+-- layouts/docs/list.section.html --
+{{ define "main" }}
+Docs List HTML.
+{{ end }}
+-- layouts/_default/list.json --
+List JSON.
+-- layouts/_default/list.rss.xml --
+List RSS.
+-- layouts/_default/list.nn.rss.xml --
+List NN RSS.
+-- layouts/_default/baseof.html --
+Base.
+-- layouts/partials/mypartial.html --
+Partial.
+-- layouts/shortcodes/myshortcode.html --
+Shortcode.
+-- content/docs/p1.md --
+---
+title: "P1"
+---
+
+       `
+
+       b := hugolib.Test(t, files)
+
+       //      b.DebugPrint("", tplimpl.CategoryBaseof)
+
+       b.AssertFileContent("public/en/docs/index.html", "Docs Baseof List HTML.\n\nDocs List HTML.")
+}
+
+func TestLayoutsOldSetupBaseofPrefix(t *testing.T) {
+       t.Parallel()
+
+       files := `
+-- hugo.toml --
+-- layouts/_default/layout1-baseof.html --
+Baseof layout1. {{ block "main" . }}{{ end }}
+-- layouts/_default/layout2-baseof.html --
+Baseof layout2. {{ block "main" . }}{{ end }}
+-- layouts/_default/layout1.html --
+{{ define "main" }}Layout1. {{ .Title }}{{ end }}
+-- layouts/_default/layout2.html --
+{{ define "main" }}Layout2. {{ .Title }}{{ end }}
+-- content/p1.md --
+---
+title: "P1"
+layout: "layout1"
+---
+-- content/p2.md --
+---
+title: "P2"
+layout: "layout2"
+---
+`
+
+       b := hugolib.Test(t, files)
+
+       b.AssertFileContent("public/p1/index.html", "Baseof layout1. Layout1. P1")
+       b.AssertFileContent("public/p2/index.html", "Baseof layout2. Layout2. P2")
+}
+
+func TestLayoutsOldSetupTaxonomyAndTerm(t *testing.T) {
+       t.Parallel()
+
+       files := `
+-- hugo.toml --
+[taxonomies]
+cat = 'cats'
+dog = 'dogs'
+# Templates for term taxonomy, old setup.
+-- layouts/dogs/terms.html --
+Dogs Terms. Most specific taxonomy template.
+-- layouts/taxonomy/terms.html --
+Taxonomy Terms. Down the list.
+# Templates for term term, old setup.
+-- layouts/dogs/term.html --
+Dogs Term. Most specific term template.
+-- layouts/term/term.html --
+Term Term. Down the list.
+-- layouts/dogs/max/list.html --
+max: {{ .Title }}
+-- layouts/_default/list.html --
+Default list.
+-- layouts/_default/single.html --
+Default single.
+-- content/p1.md --
+---
+title: "P1"
+dogs: ["luna", "daisy", "max"]
+---
+
+`
+       b := hugolib.Test(t, files, hugolib.TestOptWarn())
+
+       b.AssertLogContains("! WARN")
+
+       b.AssertFileContent("public/dogs/index.html", "Dogs Terms. Most specific taxonomy template.")
+       b.AssertFileContent("public/dogs/luna/index.html", "Dogs Term. Most specific term template.")
+       b.AssertFileContent("public/dogs/max/index.html", "max: Max") // layouts/dogs/max/list.html wins over layouts/term/term.html because of distance.
+}
+
+func TestLayoutsOldSetupCustomRSS(t *testing.T) {
+       t.Parallel()
+
+       files := `
+-- hugo.toml --
+disableKinds = ["taxonomy", "term", "page"]
+[outputs]
+home = ["rss"]
+-- layouts/_default/list.rss.xml --
+List RSS.
+`
+       b := hugolib.Test(t, files)
+       b.AssertFileContent("public/index.xml", "List RSS.")
+}
+
+func TestLayoutWithLanguagesLegacy(t *testing.T) {
+       t.Parallel()
+       files := `
+-- hugo.toml --
+disableKinds = ["taxonomy", "term", "sitemap", "rss"]
+defaultContentLanguage = "en"
+defaultContentLanguageInSubdir = true
+[languages]
+[languages.en]
+weight = 1
+[languages.nn]
+weight = 2
+[languages.sv]
+weight = 3
+-- layouts/_default/single.en.html --
+layouts/_default/single.html
+-- layouts/_default/single.nn.html --
+layouts/_default/single.nn.html
+-- layouts/_default/single.sv.html --
+layouts/_default/single.sv.html
+-- content/p1.md --
+---
+title: "P1"
+---
+-- content/p1.nn.md --
+---
+title: "P1 NN"
+---
+-- content/p1.sv.md --
+---
+title: "P1 SV"
+---
+`
+       b := hugolib.Test(t, files)
+
+       b.AssertFileContent("public/en/p1/index.html", "layouts/_default/single.html")
+       b.AssertFileContent("public/nn/p1/index.html", "layouts/_default/single.nn.html")
+       b.AssertFileContent("public/sv/p1/index.html", "layouts/_default/single.sv.html")
+}
+
+func TestLayoutWithLanguagesLegacyMounts(t *testing.T) {
+       t.Parallel()
+       files := `
+-- hugo.toml --
+disableKinds = ["taxonomy", "term", "sitemap", "rss"]
+defaultContentLanguage = "en"
+defaultContentLanguageInSubdir = true
+[languages]
+[languages.en]
+weight = 1
+[languages.nn]
+weight = 2
+[languages.sv]
+weight = 3
+
+
+[[module.mounts]]
+source = 'layouts/en'
+target = 'layouts'
+lang = 'en'
+
+[[module.mounts]]
+source = 'layouts/nn'
+target = 'layouts'
+lang = 'nn'
+[[module.mounts]]
+source = 'layouts/sv'
+target = 'layouts'
+lang = 'sv'
+
+-- layouts/en/_default/single.html --
+layouts/en/_default/single.html
+-- layouts/nn/_default/single.html --
+layouts/nn/_default/single.html
+-- layouts/sv/_default/single.html --
+layouts/sv/_default/single.html
+-- content/p1.md --
+---
+title: "P1"
+---
+-- content/p1.nn.md --
+---
+title: "P1 NN"
+---
+-- content/p1.sv.md --
+---
+title: "P1 SV"
+---
+`
+       b := hugolib.Test(t, files)
+
+       b.AssertFileContent("public/en/p1/index.html", "layouts/en/_default/single.html")
+       b.AssertFileContent("public/nn/p1/index.html", "layouts/nn/_default/single.html")
+       b.AssertFileContent("public/sv/p1/index.html", "layouts/sv/_default/single.html")
+}
+
+func TestLegacyPartialIssue13599(t *testing.T) {
+       t.Parallel()
+
+       files := `
+-- hugo.toml --
+-- layouts/partials/mypartial.html --
+Mypartial.
+-- layouts/index.html --
+mypartial:   {{ template "partials/mypartial.html" . }}
+
+`
+       b := hugolib.Test(t, files)
+
+       b.AssertFileContent("public/index.html", "Mypartial.")
+}
index 3fb917a70e3e6201b91864c8532569491a70ee91..f2b76b72b1435dab4ca6cf02bebed41aa3088878 100644 (file)
@@ -35,9 +35,9 @@ disableKinds = ["section", "home", "rss", "taxonomy",  "term", "rss"]
 ---
 title: "P1"
 ---
--- layouts/partials/counter.html --
+-- layouts/_partials/counter.html --
 {{ if .Scratch.Get "counter" }}{{ .Scratch.Add "counter" 1 }}{{ else }}{{ .Scratch.Set "counter" 1 }}{{ end }}{{ return true }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 continue:{{ range seq 5 }}{{ if eq . 2 }}{{continue}}{{ end }}{{ . }}{{ end }}:END:
 break:{{ range seq 5 }}{{ if eq . 2 }}{{break}}{{ end }}{{ . }}{{ end }}:END:
 continue2:{{ range seq 5 }}{{ if eq . 2 }}{{ continue }}{{ end }}{{ . }}{{ end }}:END:
@@ -84,7 +84,7 @@ func TestGo23ElseWith(t *testing.T) {
        files := `
 -- hugo.toml --
 title = "Hugo"
--- layouts/index.html --
+-- layouts/home.html --
 {{ with false }}{{ else with .Site }}{{ .Title }}{{ end }}|
 `
        b := hugolib.Test(t, files)
@@ -111,7 +111,7 @@ title: "S2P1"
 ---
 title: "S3P1"
 ---
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 {{ block "main" . }}{{ end }}
 -- layouts/s1/single.html --
 {{/* foo */}}
@@ -143,7 +143,7 @@ func TestGoTemplateBugs(t *testing.T) {
 
                files := `
 -- config.toml --
--- layouts/index.html --
+-- layouts/home.html --
 {{ $m := dict "key" "value" }}
 {{ $k := "" }}
 {{ $v := "" }}
@@ -168,7 +168,7 @@ func TestSecurityAllowActionJSTmpl(t *testing.T) {
        filesTemplate := `
 -- config.toml --
 SECURITYCONFIG
--- layouts/index.html --
+-- layouts/home.html --
 <script>
 var a = §§{{.Title }}§§;
 </script>
@@ -237,7 +237,7 @@ disableKinds = ['page','section','rss','sitemap','taxonomy','term']
 shortname = 'foo'
 [privacy.disqus]
 disable = false
--- layouts/index.html --
+-- layouts/home.html --
 {{ template "_internal/disqus.html" . }}
 `
 
@@ -267,7 +267,7 @@ sitemap:
 title: p2
 
 ---
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ .Title }}
 `
 
@@ -317,9 +317,9 @@ facebook_admin = 'foo'
 [taxonomies]
 series = 'series'
 tag = 'tags'
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ template "_internal/opengraph.html" . }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ template "_internal/opengraph.html" . }}
 -- content/s1/p1.md --
 ---
@@ -419,9 +419,9 @@ unsafe = true
 description = "m <em>n</em> and **o** can't."
 [taxonomies]
 tag = 'tags'
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ template "_internal/schema.html" . }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ template "_internal/schema.html" . }}
 -- content/s1/p1.md --
 ---
@@ -501,9 +501,9 @@ unsafe = true
 description = "m <em>n</em> and **o** can't."
 [params.social]
 twitter = 'foo'
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ template "_internal/twitter_cards.html" . }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ template "_internal/twitter_cards.html" . }}
 -- content/s1/p1.md --
 ---
@@ -573,17 +573,17 @@ disableLiveReload = true
 disableKinds = ["taxonomy", "term", "rss", "404", "sitemap"]
 [internal]
 fastRenderMode = true
--- layouts/_default/baseof.html --
+-- layouts/baseof.html --
 Baseof!
 {{ block "main" . }}default{{ end }}
 {{ with (templates.Defer (dict "key" "global")) }}
 Now. {{ now }}
 {{ end }}
--- layouts/_default/single.html --
+-- layouts/single.html --
 {{ define "main" }}
 Single.
 {{ end }}
--- layouts/_default/list.html --
+-- layouts/list.html --
 {{ define "main" }}
 List.
 {{ .Content }}
@@ -606,7 +606,7 @@ Home!
 
        b := hugolib.TestRunning(t, files)
        b.AssertFileContent("public/index.html", "Home!")
-       b.EditFileReplaceAll("layouts/_default/baseof.html", "baseof", "Baseof!").Build()
+       b.EditFileReplaceAll("layouts/baseof.html", "baseof", "Baseof!").Build()
        b.BuildPartial("/")
        b.AssertFileContent("public/index.html", "Baseof!")
        b.BuildPartial("/mybundle1/")
index 7211956721f430a192d5347d44b9ecf59ebac8d8..801738d52d7101c43c5d542f1085bf4fbdf066cd 100644 (file)
@@ -32,7 +32,7 @@ disableKinds = ['home','section','rss','sitemap','taxonomy','term']
 [markup.goldmark.parser.attribute]
 title = true
 block = true
--- layouts/_default/single.html --
+-- layouts/single.html --
 _{{ markdownify .RawContent }}_
 -- content/p1.md --
 ---
@@ -96,7 +96,7 @@ func TestHighlightError(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ highlight "a" "b" 0 }}
   `
        b := hugolib.NewIntegrationTestBuilder(
@@ -124,7 +124,7 @@ Rover,"a big dog",5
 Felix,a "malicious" cat,7
 Bella,"an "evil" cat",9
 Scar,"a "dead cat",11
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "lazyQuotes" true }}
 {{ $data := resources.Get "pets.csv" | transform.Unmarshal $opts }}
 {{ printf "%v" $data | safeHTML }}
@@ -140,7 +140,7 @@ func TestToMath(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ transform.ToMath "c = \\pm\\sqrt{a^2 + b^2}" }}
   `
        b := hugolib.Test(t, files)
@@ -155,7 +155,7 @@ func TestToMathError(t *testing.T) {
                files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{  transform.ToMath "c = \\foo{a^2 + b^2}" }}
   `
                b, err := hugolib.TestE(t, files, hugolib.TestOptWarn())
@@ -168,7 +168,7 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
                files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $opts := dict "throwOnError" false }}
 {{  transform.ToMath "c = \\foo{a^2 + b^2}" $opts }}
   `
@@ -182,7 +182,7 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
                files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ with try (transform.ToMath "c = \\foo{a^2 + b^2}") }}
        {{ with .Err }}
                {{ warnf "error: %s" . }}
@@ -194,7 +194,7 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
                b, err := hugolib.TestE(t, files, hugolib.TestOptWarn())
 
                b.Assert(err, qt.IsNil)
-               b.AssertLogContains("WARN  error: template: index.html:1:22: executing \"index.html\" at <transform.ToMath>: error calling ToMath: KaTeX parse error: Undefined control sequence: \\foo at position 5: c = \\̲f̲o̲o̲{a^2 + b^2}")
+               b.AssertLogContains("WARN  error: template: home.html:1:22: executing \"home.html\" at <transform.ToMath>: error calling ToMath: KaTeX parse error: Undefined control sequence: \\foo at position 5: c = \\̲f̲o̲o̲{a^2 + b^2}")
        })
 
        // See issue 13239.
@@ -202,7 +202,7 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term']
                files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ with transform.ToMath "c = \\pm\\sqrt{a^2 + b^2}" }}
        {{ with .Err }}
                {{ warnf "error: %s" . }}
@@ -229,11 +229,11 @@ block  = [['\[', '\]'], ['$$', '$$']]
 inline = [['\(', '\)'], ['$', '$']]
 -- content/p1.md --
 P1_CONTENT
--- layouts/index.html --
+-- layouts/home.html --
 Home.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}|
--- layouts/_default/_markup/render-passthrough.html --
+-- layouts/_markup/render-passthrough.html --
 {{ $opts := dict "throwOnError" false "displayMode" true }}
 {{ transform.ToMath .Inner $opts }}
   `
@@ -284,11 +284,11 @@ $$1+2$$
 
 Some inline $1+3$ math.
 
--- layouts/index.html --
+-- layouts/home.html --
 Home.
--- layouts/_default/single.html --
+-- layouts/single.html --
 Content: {{ .Content }}|
--- layouts/_default/_markup/render-passthrough.html --
+-- layouts/_markup/render-passthrough.html --
 {{ $opts := dict "throwOnError" true "displayMode" true }}
 {{- with try (transform.ToMath .Inner $opts ) }}
   {{- with .Err }}
@@ -317,7 +317,7 @@ func TestToMathMacros(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $macros := dict
     "\\addBar" "\\bar{#1}"
        "\\bold" "\\mathbf{#1}"
@@ -339,7 +339,7 @@ func TestUnmarshalWithIndentedYAML(t *testing.T) {
        files := `
 -- hugo.toml --
 disableKinds = ['page','rss','section','sitemap','taxonomy','term']
--- layouts/index.html --
+-- layouts/home.html --
 {{ $yaml := "\n  a:\n    b: 1\n  c:\n    d: 2\n" }}
 {{ $yaml | transform.Unmarshal | encoding.Jsonify }}
 `
@@ -370,7 +370,7 @@ func TestPortableText(t *testing.T) {
     "style": "h2"
   }
 ]
--- layouts/index.html --
+-- layouts/home.html --
 {{ $markdown := resources.Get "sample.json" | transform.Unmarshal | transform.PortableText }}
 Markdown: {{ $markdown }}|