Fix AtomLink
Anirudh Oppiliappan x@icyphox.sh
Fri, 06 Aug 2021 08:43:05 +0530
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
atom/feed.go
→
atom/feed.go
@@ -2,6 +2,7 @@ package atom
import ( "encoding/xml" + "path/filepath" "time" "git.icyphox.sh/vite/config"@@ -63,7 +64,7 @@ entry := AtomEntry{
Title: p.Meta["title"], Updated: rfc3339, ID: NewUUID().String(), - Link: &AtomLink{Href: config.URL + srcDir + p.Meta["slug"]}, + Link: &AtomLink{Href: filepath.Join(config.URL, srcDir, p.Meta["slug"])}, Summary: &AtomSummary{Content: string(p.HTML), Type: "html"}, } entries = append(entries, entry)