From c713beba4d4ac00f17a28ab4aab10be1acadd0b1 Mon Sep 17 00:00:00 2001 From: Noah Campbell Date: Tue, 13 Aug 2013 14:58:50 -0700 Subject: [PATCH] Formatting cleanup --- hugolib/indexing_test.go | 4 +--- 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) } }