diff options
author | Noah Campbell <noahcampbell@gmail.com> | 2013-08-13 14:58:50 -0700 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2013-08-17 23:52:16 -0400 |
commit | c713beba4d4ac00f17a28ab4aab10be1acadd0b1 (patch) | |
tree | 234ba57a3720e97d0726825d0ad05b4331de1ce6 | |
parent | ec821739bc31e2decb568bec1153a871a82a1cc7 (diff) |
Formatting cleanup
-rw-r--r-- | hugolib/indexing_test.go | 4 | ||||
-rw-r--r-- | hugolib/site.go | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/hugolib/indexing_test.go b/hugolib/indexing_test.go index 4d7d04f31..8bf74188b 100644 --- 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) } } - - diff --git a/hugolib/site.go b/hugolib/site.go index a35300d21..c9104564a 100644 --- 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) } } |