From: Noah Campbell Date: Thu, 1 Aug 2013 20:27:07 +0000 (-0700) Subject: Fixed section labels causing panic on windows. X-Git-Tag: v0.8~10^2~2 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c9a09418e7b1cf0d6c77d46ac1dc8a703b341ac2;p=brevno-suite%2Fhugo 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. --- diff --git a/hugolib/page.go b/hugolib/page.go index 7541257d..ff00493b 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