all repos — homestead @ 82f1154db73a2a2b9cf1fc5a66119c91249c5d3c

Code for my website

fix incorrect post filename

Alan Pearce
commit

82f1154db73a2a2b9cf1fc5a66119c91249c5d3c

parent

54a45addca4d07b2b3fc5d8337dc5d921b7c05e7

1 file changed, 2 insertions(+), 2 deletions(-)

jump to
M internal/content/posts.gointernal/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 }