fix incorrect post filename
1 file changed, 2 insertions(+), 2 deletions(-)
jump to
M internal/content/posts.go → internal/content/posts.go
@@ -76,7 +76,7 @@ ) func (pc *PostsCollection) GetPost(filename string) (*Post, error) { fp := filepath.Join(pc.config.Root, filename) - url := path.Join("/", pc.config.InputDir, urlReplacer.Replace(filename)) + "/" + url := path.Join("/", urlReplacer.Replace(filename)) + "/" post := &Post{ Input: fp, Output: path.Join(pc.config.InputDir, outputReplacer.Replace(filename)),@@ -134,7 +134,7 @@ for _, f := range files { fn := f.Name() if !f.IsDir() && path.Ext(fn) == ".md" { log.Debug("reading post", "post", fn) - post, err := pc.GetPost(filepath.Join(subdir, fn)) + post, err := pc.GetPost(filepath.Join(config.InputDir, fn)) if err != nil { return nil, err }