all repos — vite @ e0dc7bd326a18d8004efd5b706b941b2265ad64b

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

Add <h2> to RSS for subtitles
Anirudh Oppiliappan x@icyphox.sh
Mon, 16 Aug 2021 22:25:26 +0530
commit

e0dc7bd326a18d8004efd5b706b941b2265ad64b

parent

9221f0d1c90e7944aeaa7201bd54be04bb475542

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

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

@@ -72,8 +72,13 @@ cfg.URL[8:], // strip https://

dateStr, filepath.Join(srcDir, p.Meta["slug"]), ), - Link: &AtomLink{Href: filepath.Join(cfg.URL, srcDir, p.Meta["slug"])}, - Summary: &AtomSummary{Content: string(p.HTML), Type: "html"}, + Link: &AtomLink{Href: filepath.Join(cfg.URL, srcDir, p.Meta["slug"])}, + Summary: &AtomSummary{ + Content: fmt.Sprintf("<h2>%s</h2>\n%s", + p.Meta["subtitle"], + string(p.HTML)), + Type: "html", + }, } entries = append(entries, entry) }