all repos — vite @ ac5f96ba72cde564901fa95c523d077f309ab39c

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

Generate static ids
Anirudh Oppiliappan x@icyphox.sh
Fri, 06 Aug 2021 13:44:32 +0530
commit

ac5f96ba72cde564901fa95c523d077f309ab39c

parent

50ebf6bea9b02cef812535292204a4a05fe084c5

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

jump to
M atom/feed.goatom/feed.go

@@ -2,6 +2,7 @@ package atom

import ( "encoding/xml" + "fmt" "path/filepath" "time"

@@ -63,7 +64,12 @@

entry := AtomEntry{ Title: p.Meta["title"], Updated: rfc3339, - ID: NewUUID().String(), + ID: fmt.Sprintf( + "tag:%s,%s:%s", + config.URL, + dateStr, + filepath.Join(srcDir, p.Meta["slug"]), + ), Link: &AtomLink{Href: filepath.Join(config.URL, srcDir, p.Meta["slug"])}, Summary: &AtomSummary{Content: string(p.HTML), Type: "html"}, }