Fix permalink bug in uglyurls mode (refs #187).

This commit is contained in:
Anton Ageev
2014-02-02 04:58:14 +04:00
committed by spf13
parent 3e87d7a86e
commit 72ba6d633d
2 changed files with 20 additions and 8 deletions

View File

@@ -277,7 +277,8 @@ func (p *Page) permalink() (*url.URL, error) {
if len(pSlug) > 0 {
if p.Site.Config != nil && p.Site.Config.UglyUrls {
permalink = path.Join(dir, p.Slug, p.Extension)
filename := fmt.Sprintf("%s.%s", p.Slug, p.Extension)
permalink = path.Join(dir, filename)
} else {
permalink = path.Join(dir, p.Slug) + "/"
}