ref: c713beba4d4ac00f17a28ab4aab10be1acadd0b1
parent: ec821739bc31e2decb568bec1153a871a82a1cc7
author: Noah Campbell <[email protected]>
date: Tue Aug 13 10:58:50 EDT 2013
Formatting cleanup
--- a/hugolib/indexing_test.go
+++ b/hugolib/indexing_test.go
@@ -1,8 +1,8 @@
package hugolib
import (
- "testing"
"strings"
+ "testing"
)
func TestSitePossibleIndexes(t *testing.T) {
@@ -14,5 +14,3 @@
t.Fatalf("possible indexes do not match [tags categories]. Got: %s", indexes)
}
}
-
-
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -326,9 +326,9 @@
if len(strings.TrimSpace(p.Slug)) > 0 {
// Use Slug if provided
if s.Config.UglyUrls {
- outfile = p.Slug + "." + p.Extension
+ outfile = strings.TrimSpace(p.Slug) + "." + p.Extension
} else {
- outfile = p.Slug + slash + "index." + p.Extension
+ outfile = filepath.Join(strings.TrimSpace(p.Slug), "index."+p.Extension)
}
} else {
// Fall back to filename
@@ -337,7 +337,7 @@
outfile = replaceExtension(strings.TrimSpace(t), p.Extension)
} else {
file, _ := fileExt(strings.TrimSpace(t))
- outfile = file + slash + "index." + p.Extension
+ outfile = filepath.Join(file, "index."+p.Extension)
}
}