aboutsummaryrefslogtreecommitdiff
path: root/page/atom.go
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@x230.my.domain>2021-07-11 11:55:47 -0400
committerMitchell Riedstra <mitch@x230.my.domain>2021-07-11 11:55:47 -0400
commit1c6c1f1597b71f4d4f3a1722655b8864c0d33e6d (patch)
tree023701c9d033269d83be8415809b292ae1f3cee0 /page/atom.go
parente6d53f71c9718ecdb9fde16a924d75a71aadd2d2 (diff)
downloadgo-website-1c6c1f1597b71f4d4f3a1722655b8864c0d33e6d.tar.gz
go-website-1c6c1f1597b71f4d4f3a1722655b8864c0d33e6d.tar.xz
Initial banging away at adding an Atom feed to the site
Diffstat (limited to 'page/atom.go')
-rw-r--r--page/atom.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/page/atom.go b/page/atom.go
new file mode 100644
index 0000000..4a89117
--- /dev/null
+++ b/page/atom.go
@@ -0,0 +1,31 @@
+package page
+
+/*
+
+import (
+ "github.com/gorilla/feeds"
+ "io"
+)
+
+// Atom returns an Atom feed for all of the articles with the specified tag
+func (p *Page) Atom(wr io.Writer, tag string) error {
+ index, err := p.Index()
+ if err != nil {
+ return err
+ }
+
+ pages, ok := index[tag]
+ if !ok {
+ pages = PageList{}
+ }
+
+ feed := &feeds.Feed{
+ Title: "",
+ Link: &feeds.Link{Href: "http://jmoiron.net/blog"},
+ Description: "discussion about tech, footie, photos",
+ Author: &feeds.Author{Name: "Jason Moiron", Email: "jmoiron@jmoiron.net"},
+ Created: now,
+ }
+
+}
+*/