diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-27 19:12:36 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-27 19:12:36 -0400 |
commit | 75d4d72a1f5352d1c3520fbaf96911309fc7f96a (patch) | |
tree | 942dfa89658964e5954f159fa4d9b41c6b7bc423 /index.atom.erb | |
parent | b373a3a6e1702e7514bb405122a2311d16d85fcd (diff) |
index.atom, also: write-atomic
Diffstat (limited to 'index.atom.erb')
-rw-r--r-- | index.atom.erb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/index.atom.erb b/index.atom.erb new file mode 100644 index 0000000..1784635 --- /dev/null +++ b/index.atom.erb @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + + <title>Luke Shumaker's Web Log</title> + <link rel="self" type="application/atom+xml" href="/blog/index.atom"/> + <link rel="alternate" type="text/markdown" href="/blog/index.md"/> + <link rel="alternate" type="text/html" href="/blog"/> + <updated><%= @pages.map{|p|p.gitdate}.sort.last.rfc3339 %></updated> + <author><%= Person.new("Luke Shumaker").atom %></author> + <id>https://lukeshu.com/blog/</id> + + <% @pages.sort_by{|p| p.date}.reverse.each do |page| %> + <entry xmlns="http://www.w3.org/2005/Atom"> + <link rel="alternate" type="text/markdown" href="/blog/<%= page.slug %>.md"/> + <link rel="alternate" type="text/html" href="/blog/<%= page.slug %>.html"/> + <id>https://lukeshu.com/blog/<%= page.slug %>.html</id> + <updated><%= page.gitdate.rfc3339 %></updated> + <published><%= page.date.rfc3339 %></published> + <title><%= page.title %></title> + <content type="html"><%= html_escape(page.content) %></content> + <author><%= page.author.atom %></author> + <rights type="html"><%= html_escape(page.rights) %></rights> + </entry> + <% end %> +</feed> |