Formatting cleanup - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit c713beba4d4ac00f17a28ab4aab10be1acadd0b1
DIR parent ec821739bc31e2decb568bec1153a871a82a1cc7
HTML Author: Noah Campbell <noahcampbell@gmail.com>
Date: Tue, 13 Aug 2013 14:58:50 -0700
Formatting cleanup
Diffstat:
M hugolib/indexing_test.go | 4 +---
M hugolib/site.go | 6 +++---
2 files changed, 4 insertions(+), 6 deletions(-)
---
DIR diff --git 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 @@ func TestSitePossibleIndexes(t *testing.T) {
t.Fatalf("possible indexes do not match [tags categories]. Got: %s", indexes)
}
}
-
-
DIR diff --git a/hugolib/site.go b/hugolib/site.go
@@ -326,9 +326,9 @@ func (s *Site) setOutFile(p *Page) {
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 @@ func (s *Site) setOutFile(p *Page) {
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)
}
}