Permalink to include multiple directories levels

This commit is contained in:
Noah Campbell
2013-10-08 18:33:57 +02:00
parent 6e1268f45b
commit 4993152dda
4 changed files with 16 additions and 15 deletions

View File

@@ -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()