fast and minimal static site generator
ssg

Fix atom feed link construction

anirudh.fi 589694da 39b8d08c

verified
+3 -3
+3 -3
commands/build.go
··· 183 183 // ex: build/blog/foo-bar -> build/foo-bar 184 184 if post.Meta["atroot"] == "true" { 185 185 os.Mkdir(filepath.Join(types.BuildDir, slug), 0755) 186 - dstFile := filepath.Join(types.BuildDir, slug+".html") 187 - util.CopyFile(filepath.Join(dstDir, slug, "index.html"), dstFile) 186 + df := filepath.Join(types.BuildDir, slug+".html") 187 + util.CopyFile(filepath.Join(dstDir, slug, "index.html"), df) 188 188 } 189 189 } 190 190 ··· 205 205 } 206 206 } 207 207 208 - xml, err := atom.NewAtomFeed(filepath.Join(types.PagesDir, dir.Name), posts) 208 + xml, err := atom.NewAtomFeed(dir.Name, posts) 209 209 if err != nil { 210 210 return fmt.Errorf("error: failed to create atom feed for: %s: %w", dir.Name, err) 211 211 }