@@ -41,11 +41,11 @@ withallbutlastsectionslug = '/:sectionslugs[:last]/:slug/'
4141withsectionslug = '/sectionslug/:sectionslug/:slug/'
4242withsectionslugs = '/sectionslugs/:sectionslugs/:slug/'
4343[permalinks.section]
44- withfilefilename = '/sectionwithfilefilename/:filename /'
44+ withfilefilename = '/sectionwithfilefilename/:contentbasename /'
4545withfilefiletitle = '/sectionwithfilefiletitle/:title/'
4646withfileslug = '/sectionwithfileslug/:slug/'
4747nofileslug = '/sectionnofileslug/:slug/'
48- nofilefilename = '/sectionnofilefilename/:filename /'
48+ nofilefilename = '/sectionnofilefilename/:contentbasename /'
4949nofiletitle1 = '/sectionnofiletitle1/:title/'
5050nofiletitle2 = '/sectionnofiletitle2/:sections[:last]/'
5151[permalinks.term]
@@ -125,9 +125,12 @@ slug: "mytagslug"
125125 b .AssertFileContent ("public/pageslug/p1slugvalue/index.html" , "Single|page|/pageslug/p1slugvalue/|" )
126126 b .AssertFileContent ("public/sectionslug/section-root-slug/page1-slug/index.html" , "Single|page|/sectionslug/section-root-slug/page1-slug/|" )
127127 b .AssertFileContent ("public/sectionslugs/sections-root-slug/level1-slug/page1-slug/index.html" , "Single|page|/sectionslugs/sections-root-slug/level1-slug/page1-slug/|" )
128- b .AssertFileContent ("public/sectionwithfilefilename/index.html" , "List|section|/sectionwithfilefilename/|" )
128+
129+ b .AssertFileContent ("public/sectionwithfilefilename/withfilefilename/index.html" , "List|section|/sectionwithfilefilename/withfilefilename/|" )
130+
129131 b .AssertFileContent ("public/sectionwithfileslug/withfileslugvalue/index.html" , "List|section|/sectionwithfileslug/withfileslugvalue/|" )
130- b .AssertFileContent ("public/sectionnofilefilename/index.html" , "List|section|/sectionnofilefilename/|" )
132+
133+ b .AssertFileContent ("public/sectionnofilefilename/nofilefilename/index.html" , "List|section|/sectionnofilefilename/nofilefilename/|" )
131134 b .AssertFileContent ("public/sectionnofileslug/nofileslugs/index.html" , "List|section|/sectionnofileslug/nofileslugs/|" )
132135 b .AssertFileContent ("public/sectionnofiletitle1/nofiletitle1s/index.html" , "List|section|/sectionnofiletitle1/nofiletitle1s/|" )
133136 b .AssertFileContent ("public/sectionnofiletitle2/index.html" , "List|section|/sectionnofiletitle2/|" )
@@ -138,7 +141,7 @@ slug: "mytagslug"
138141 permalinksConf := b .H .Configs .Base .Permalinks
139142 b .Assert (permalinksConf , qt .DeepEquals , map [string ]map [string ]string {
140143 "page" : {"withallbutlastsection" : "/:sections[:last]/:slug/" , "withallbutlastsectionslug" : "/:sectionslugs[:last]/:slug/" , "withpageslug" : "/pageslug/:slug/" , "withsectionslug" : "/sectionslug/:sectionslug/:slug/" , "withsectionslugs" : "/sectionslugs/:sectionslugs/:slug/" },
141- "section" : {"nofilefilename" : "/sectionnofilefilename/:filename /" , "nofileslug" : "/sectionnofileslug/:slug/" , "nofiletitle1" : "/sectionnofiletitle1/:title/" , "nofiletitle2" : "/sectionnofiletitle2/:sections[:last]/" , "withfilefilename" : "/sectionwithfilefilename/:filename /" , "withfilefiletitle" : "/sectionwithfilefiletitle/:title/" , "withfileslug" : "/sectionwithfileslug/:slug/" },
144+ "section" : {"nofilefilename" : "/sectionnofilefilename/:contentbasename /" , "nofileslug" : "/sectionnofileslug/:slug/" , "nofiletitle1" : "/sectionnofiletitle1/:title/" , "nofiletitle2" : "/sectionnofiletitle2/:sections[:last]/" , "withfilefilename" : "/sectionwithfilefilename/:contentbasename /" , "withfilefiletitle" : "/sectionwithfilefiletitle/:title/" , "withfileslug" : "/sectionwithfileslug/:slug/" },
142145 "taxonomy" : {"tags" : "/tagsslug/:slug/" },
143146 "term" : {"tags" : "/tagsslug/tag/:slug/" },
144147 })
@@ -192,7 +195,7 @@ func TestPermalinksNestedSections(t *testing.T) {
192195 files := `
193196-- hugo.toml --
194197[permalinks.page]
195- books = '/libros/:sections[1:]/:filename '
198+ books = '/libros/:sections[1:]/:contentbasename '
196199
197200[permalinks.section]
198201books = '/libros/:sections[1:]'
0 commit comments