Fixed bug where Url specified in front matter as pretty url wouldnt render

Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
This commit is contained in:
Mark Sanborn
2013-08-29 09:37:37 -07:00
committed by Noah Campbell
parent 71678a7183
commit 4ed43e8076
2 changed files with 22 additions and 0 deletions

View File

@@ -332,6 +332,10 @@ func (s *Site) setOutFile(p *Page) {
// Always use Url if it's specified
if len(strings.TrimSpace(p.Url)) > 2 {
p.OutFile = strings.TrimSpace(p.Url)
if strings.HasSuffix(p.OutFile, "/") {
p.OutFile = p.OutFile + "index.html"
}
return
}