From c9a09418e7b1cf0d6c77d46ac1dc8a703b341ac2 Mon Sep 17 00:00:00 2001 From: Noah Campbell Date: Thu, 1 Aug 2013 13:27:07 -0700 Subject: [PATCH] Fixed section labels causing panic on windows. The filename path was being split using a unix specific path seperator. This fix uses the os.PathSeperator to ensure proper evaluation regardless of platform. --- hugolib/page.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugolib/page.go b/hugolib/page.go index 7541257d0..ff00493b2 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -91,7 +91,7 @@ func initializePage(filename string) (page Page) { } func (p *Page) setSection() { - x := strings.Split(p.FileName, "/") + x := strings.Split(p.FileName, string(os.PathSeparator)) if section := x[len(x)-2]; section != "content" { p.Section = section