diff --git a/dir.go b/dir.go index f5c5a3b..07ac7a1 100644 --- a/dir.go +++ b/dir.go @@ -136,11 +136,11 @@ func (d *Dir) _read(srcDir, path string, task *Task, cfg *Config) error { path = "/" + strings.TrimSuffix(path, name) } else { path = "/" + strings.TrimSuffix(path, ext) - } - if task.UglyURLs { - path += task.OutputExt - } else { - path += "/" + if task.UglyURLs { + path += task.OutputExt + } else { + path += "/" + } } page.Path = path if permalink, ok := cfg.permalinks[d.Path]; ok {