Formatting cleanup
This commit is contained in:
parent
ec821739bc
commit
c713beba4d
2 changed files with 4 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
||||||
package hugolib
|
package hugolib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSitePossibleIndexes(t *testing.T) {
|
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)
|
t.Fatalf("possible indexes do not match [tags categories]. Got: %s", indexes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -326,9 +326,9 @@ func (s *Site) setOutFile(p *Page) {
|
||||||
if len(strings.TrimSpace(p.Slug)) > 0 {
|
if len(strings.TrimSpace(p.Slug)) > 0 {
|
||||||
// Use Slug if provided
|
// Use Slug if provided
|
||||||
if s.Config.UglyUrls {
|
if s.Config.UglyUrls {
|
||||||
outfile = p.Slug + "." + p.Extension
|
outfile = strings.TrimSpace(p.Slug) + "." + p.Extension
|
||||||
} else {
|
} else {
|
||||||
outfile = p.Slug + slash + "index." + p.Extension
|
outfile = filepath.Join(strings.TrimSpace(p.Slug), "index."+p.Extension)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Fall back to filename
|
// Fall back to filename
|
||||||
|
@ -337,7 +337,7 @@ func (s *Site) setOutFile(p *Page) {
|
||||||
outfile = replaceExtension(strings.TrimSpace(t), p.Extension)
|
outfile = replaceExtension(strings.TrimSpace(t), p.Extension)
|
||||||
} else {
|
} else {
|
||||||
file, _ := fileExt(strings.TrimSpace(t))
|
file, _ := fileExt(strings.TrimSpace(t))
|
||||||
outfile = file + slash + "index." + p.Extension
|
outfile = filepath.Join(file, "index."+p.Extension)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue