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

@@ -2,11 +2,11 @@ package hugolib
import (
"bytes"
"io"
"fmt"
"github.com/spf13/hugo/source"
"github.com/spf13/hugo/target"
"html/template"
"io"
"strings"
"testing"
)
@@ -187,6 +187,8 @@ func TestTargetPath(t *testing.T) {
expectedSection string
}{
{"content/a/file.md", PAGE_URL_SPECIFIED, "mycategory/my-whatever-content/index.html", "a"},
{"content/x/y/deepfile.md", SIMPLE_PAGE, "x/y/deepfile.html", "x/y"},
{"content/x/y/z/deeperfile.md", SIMPLE_PAGE, "x/y/z/deeperfile.html", "x/y/z"},
{"content/b/file.md", SIMPLE_PAGE, "b/file.html", "b"},
{"a/file.md", SIMPLE_PAGE, "a/file.html", "a"},
{"file.md", SIMPLE_PAGE, "file.html", ""},