mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
parent
32471b57bd
commit
d90e37e0c6
442 changed files with 1426 additions and 2254 deletions
|
@ -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[]",
|
||||
)
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue