mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Permalink to include multiple directories levels
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
func TestPermalink(t *testing.T) {
|
||||
tests := []struct {
|
||||
base template.URL
|
||||
base template.URL
|
||||
expectedAbs string
|
||||
expectedRel string
|
||||
}{
|
||||
@@ -18,10 +18,10 @@ func TestPermalink(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
p := &Page{
|
||||
Node: Node{
|
||||
UrlPath: UrlPath{Section: "x/y/z"},
|
||||
UrlPath: UrlPath{Section: "z"},
|
||||
Site: SiteInfo{BaseUrl: test.base},
|
||||
},
|
||||
File: File{FileName: "x/y/z/boofar.md"},
|
||||
File: File{FileName: "x/y/z/boofar.md", Dir: "x/y/z"},
|
||||
}
|
||||
|
||||
u, err := p.Permalink()
|
||||
|
Reference in New Issue
Block a user