Fix atom feed link construction
Anirudh Oppiliappan x@icyphox.sh
Mon, 20 Jan 2025 19:55:55 +0200
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
commands/build.go
→
commands/build.go
@@ -183,8 +183,8 @@ // Copy the post to the root if it's marked as such.
// ex: build/blog/foo-bar -> build/foo-bar if post.Meta["atroot"] == "true" { os.Mkdir(filepath.Join(types.BuildDir, slug), 0755) - dstFile := filepath.Join(types.BuildDir, slug+".html") - util.CopyFile(filepath.Join(dstDir, slug, "index.html"), dstFile) + df := filepath.Join(types.BuildDir, slug+".html") + util.CopyFile(filepath.Join(dstDir, slug, "index.html"), df) } }@@ -205,7 +205,7 @@ return fmt.Errorf("error: failed to render index %s: %w", dstFile, err)
} } - xml, err := atom.NewAtomFeed(filepath.Join(types.PagesDir, dir.Name), posts) + xml, err := atom.NewAtomFeed(dir.Name, posts) if err != nil { return fmt.Errorf("error: failed to create atom feed for: %s: %w", dir.Name, err) }