@@ -482,8 +482,8 @@ title = "Scandinavian p1"
482482{{ .Title }}|{{ .Site.Language.Name }}|{{ .Site.Version.Name }}|p1: {{ .Params.p1 }}|
483483`
484484 b := hugolib .Test (t , files )
485- b .AssertFileContent ("public/en/mysection/p1/index.html" , "English p1|en|v1|p1: p1cascade|" )
486- b .AssertFileContent ("public/sv/mysection/scandinavianpages/p1/index.html" , "Scandinavian p1|sv|v1|p1: p1cascadescandinavian|" )
485+ b .AssertFileContent ("public/en/mysection/p1/index.html" , "English p1|en|v1.0.0 |p1: p1cascade|" )
486+ b .AssertFileContent ("public/sv/mysection/scandinavianpages/p1/index.html" , "Scandinavian p1|sv|v1.0.0 |p1: p1cascadescandinavian|" )
487487}
488488
489489func TestCascadeMatrixConfigPerLanguage (t * testing.T ) {
@@ -523,8 +523,8 @@ title: "Nynorsk p1"
523523
524524`
525525 b := hugolib .Test (t , files )
526- b .AssertFileContent ("public/en/mysection/p1/index.html" , "English p1|en|v1|p1: p1cascadeen|p2: p2cascadeall|" )
527- b .AssertFileContent ("public/nn/mysection/p1/index.html" , "Nynorsk p1|nn|v1|p1: p1cascadenn|p2: p2cascadeall|" )
526+ b .AssertFileContent ("public/en/mysection/p1/index.html" , "English p1|en|v1.0.0 |p1: p1cascadeen|p2: p2cascadeall|" )
527+ b .AssertFileContent ("public/nn/mysection/p1/index.html" , "Nynorsk p1|nn|v1.0.0 |p1: p1cascadenn|p2: p2cascadeall|" )
528528}
529529
530530func TestCascadeMatrixNoHomeContent (t * testing.T ) {
@@ -544,9 +544,9 @@ p2 = "p2cascadeall"
544544`
545545
546546 b := hugolib .Test (t , files )
547- b .AssertFileContent ("public/en/index.html" , "|home|en|v1|p1: p1cascadeall|p2: p2cascadeall|" )
548- b .AssertFileContent ("public/en/mysection/index.html" , "Mysections|section|en|v1|p1: p1cascadeall|p2: p2cascadeall|" )
549- b .AssertFileContent ("public/en/mysection/p1/index.html" , "|page|en|v1|p1: p1cascadeall|p2: p2cascadeall|" )
547+ b .AssertFileContent ("public/en/index.html" , "|home|en|v1.0.0 |p1: p1cascadeall|p2: p2cascadeall|" )
548+ b .AssertFileContent ("public/en/mysection/index.html" , "Mysections|section|en|v1.0.0 |p1: p1cascadeall|p2: p2cascadeall|" )
549+ b .AssertFileContent ("public/en/mysection/p1/index.html" , "|page|en|v1.0.0 |p1: p1cascadeall|p2: p2cascadeall|" )
550550}
551551
552552func TestMountCascadeFrontMatterSitesMatrixAndComplementsShouldBeMerged (t * testing.T ) {
@@ -708,11 +708,11 @@ title: "Theme p1"
708708 sEn := b .SiteHelper ("en" , "" , "" )
709709 sNN := b .SiteHelper ("nn" , "" , "guest" )
710710
711- b .Assert (sEn .PageHelper ("/p1" ).MatrixFromPageConfig ()["matrix" ], qt .DeepEquals , map [string ][]string {"languages" : {"en" }, "roles" : {"guest" }, "versions" : {"v1" }})
711+ b .Assert (sEn .PageHelper ("/p1" ).MatrixFromPageConfig ()["matrix" ], qt .DeepEquals , map [string ][]string {"languages" : {"en" }, "roles" : {"guest" }, "versions" : {"v1.0.0 " }})
712712 b .Assert (sEn .PageHelper ("/p2" ).MatrixFromPageConfig ()["matrix" ], qt .DeepEquals , map [string ][]string {
713713 "languages" : {"en" , "nn" },
714714 "roles" : {"guest" },
715- "versions" : {"v1" },
715+ "versions" : {"v1.0.0 " },
716716 })
717717
718718 p1NN := sNN .PageHelper ("/p1" )
@@ -721,13 +721,13 @@ title: "Theme p1"
721721 b .Assert (p2NN .MatrixFromPageConfig ()["matrix" ], qt .DeepEquals , map [string ][]string {
722722 "languages" : {"en" , "nn" },
723723 "roles" : {"guest" },
724- "versions" : {"v1" },
724+ "versions" : {"v1.0.0 " },
725725 })
726726
727727 b .Assert (p1NN .MatrixFromFile ()["matrix" ], qt .DeepEquals , map [string ][]string {
728728 "languages" : {"nn" }, // It's defined as ** in the mount.
729729 "roles" : {"guest" },
730- "versions" : {"v1" },
730+ "versions" : {"v1.0.0 " },
731731 })
732732}
733733
@@ -1020,6 +1020,21 @@ All.{{ .Title }}|
10201020 b .AssertFileContent ("public/de/p1/index.html" , "All.P1 de|" )
10211021}
10221022
1023+ func TestSitesMatrixDefaultValues (t * testing.T ) {
1024+ t .Parallel ()
1025+
1026+ files := `
1027+ -- hugo.toml --
1028+ disableKinds = ["rss", "sitemap", "section", "taxonomy", "term"]
1029+ -- layouts/all.html --
1030+ All. {{ .Title }}|Lang: {{ .Site.Language.Name }}|Ver: {{ .Site.Version.Name }}|Role: {{ .Site.Role.Name }}|
1031+ `
1032+
1033+ b := hugolib .Test (t , files )
1034+
1035+ b .AssertFileContent ("public/index.html" , "All. |Lang: en|Ver: v1.0.0|Role: guest|" )
1036+ }
1037+
10231038func newSitesMatrixContentBenchmarkBuilder (t testing.TB , numPages int , skipRender , multipleDimensions bool ) * hugolib.IntegrationTestBuilder {
10241039 files := `
10251040-- hugo.toml --
0 commit comments