Support pages without folders

This commit is contained in:
Noah Campbell
2013-08-03 10:51:21 -07:00
parent fc5e92cc24
commit 19538a1bd6
2 changed files with 22 additions and 0 deletions

View File

@@ -92,6 +92,9 @@ func initializePage(filename string) (page Page) {
func (p *Page) setSection() {
x := strings.Split(p.FileName, string(os.PathSeparator))
if len(x) <= 1 {
return
}
if section := x[len(x)-2]; section != "content" {
p.Section = section