all repos — vite @ 589694da6b9c219b6627980ac86d1a6435d0176a

a fast (this time, actually) and minimal static site generator

Fix atom feed link construction
Anirudh Oppiliappan x@icyphox.sh
Mon, 20 Jan 2025 19:55:55 +0200
commit

589694da6b9c219b6627980ac86d1a6435d0176a

parent

39b8d08cf911e22d238d5b30f18434a346c02733

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M commands/build.gocommands/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) }