mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -14,9 +14,8 @@
|
||||
package hugolib
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
qt "github.com/frankban/quicktest"
|
||||
)
|
||||
@@ -104,11 +103,9 @@ Menu Main: {{ partial "menu.html" (dict "page" . "menu" "main") }}`,
|
||||
"/sect1/|Section One|Section One|100|-|-|"+
|
||||
"/sect2/|Sect2s|Sect2s|0|-|HasMenuCurrent|"+
|
||||
"/sect3/|Sect3s|Sect3s|0|-|-|")
|
||||
|
||||
}
|
||||
|
||||
func TestMenuFrontMatter(t *testing.T) {
|
||||
|
||||
b := newTestSitesBuilder(t).WithSimpleConfigFile()
|
||||
|
||||
b.WithTemplatesAdded("index.html", `
|
||||
@@ -155,12 +152,10 @@ menu:
|
||||
"Main|P1: /blog/page1/",
|
||||
"Other|P2: /blog/page2/",
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5849
|
||||
func TestMenuPageMultipleOutputFormats(t *testing.T) {
|
||||
|
||||
config := `
|
||||
baseURL = "https://example.com"
|
||||
|
||||
@@ -219,7 +214,6 @@ menu: "main"
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5989
|
||||
func TestMenuPageSortByDate(t *testing.T) {
|
||||
|
||||
b := newTestSitesBuilder(t).WithSimpleConfigFile()
|
||||
|
||||
b.WithContent("blog/a.md", `
|
||||
@@ -269,7 +263,6 @@ menu:
|
||||
}
|
||||
|
||||
func TestMenuParams(t *testing.T) {
|
||||
|
||||
b := newTestSitesBuilder(t).WithSimpleConfigFile()
|
||||
|
||||
b.WithTemplatesAdded("index.html", `
|
||||
@@ -315,5 +308,4 @@ menu:
|
||||
"Main|P1: /blog/page1/|map[]",
|
||||
"Main|P2: /blog/page2/|map[]",
|
||||
)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user