mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
tpl/embedded: Exclude pages without Permalink from sitemap
This commit is contained in:
parent
92c6c40419
commit
4867cd1dea
4 changed files with 21 additions and 4 deletions
|
@ -583,11 +583,21 @@ categories = [ "hugo" ]
|
|||
+++
|
||||
Front Matter with Ordered Pages 4. This is longer content`
|
||||
|
||||
var weightedPage5 = `+++
|
||||
weight = "5"
|
||||
title = "Five"
|
||||
|
||||
[_build]
|
||||
render = "never"
|
||||
+++
|
||||
Front Matter with Ordered Pages 5`
|
||||
|
||||
var weightedSources = [][2]string{
|
||||
{filepath.FromSlash("sect/doc1.md"), weightedPage1},
|
||||
{filepath.FromSlash("sect/doc2.md"), weightedPage2},
|
||||
{filepath.FromSlash("sect/doc3.md"), weightedPage3},
|
||||
{filepath.FromSlash("sect/doc4.md"), weightedPage4},
|
||||
{filepath.FromSlash("sect/doc5.md"), weightedPage5},
|
||||
}
|
||||
|
||||
func TestOrderedPages(t *testing.T) {
|
||||
|
@ -979,8 +989,8 @@ func TestClassCollector(t *testing.T) {
|
|||
|
||||
b := newTestSitesBuilder(t)
|
||||
b.WithConfigFile("toml", fmt.Sprintf(`
|
||||
|
||||
|
||||
|
||||
|
||||
minify = %t
|
||||
|
||||
[build]
|
||||
|
@ -989,7 +999,7 @@ minify = %t
|
|||
`, minify))
|
||||
|
||||
b.WithTemplates("index.html", `
|
||||
|
||||
|
||||
<div id="el1" class="a b c">Foo</div>
|
||||
|
||||
Some text.
|
||||
|
@ -1047,7 +1057,7 @@ func TestClassCollectorStress(t *testing.T) {
|
|||
|
||||
b := newTestSitesBuilder(t)
|
||||
b.WithConfigFile("toml", `
|
||||
|
||||
|
||||
disableKinds = ["home", "section", "term", "taxonomy" ]
|
||||
|
||||
[languages]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue