diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 16:45:53 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 16:45:53 -0500 |
commit | 5022d1a0df1534b1cbec1cbee23568f201ea1cc6 (patch) | |
tree | 559db39e2be5933c621a02c3f9874641b7f1a70c /tmpl/page.atom.erb | |
parent | f63a89bb8c494ea6b049285ec7c904d6d6136a88 (diff) |
Implement actual file generation, go through fixing things.
Diffstat (limited to 'tmpl/page.atom.erb')
-rw-r--r-- | tmpl/page.atom.erb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tmpl/page.atom.erb b/tmpl/page.atom.erb index ea37ea5..d690974 100644 --- a/tmpl/page.atom.erb +++ b/tmpl/page.atom.erb @@ -1,10 +1,11 @@ -<entry xmlns="http://www.w3.org/2005/Atom"> - <link rel="alternate" type="text/html" href="<%= page.url %>"/> - <id><%= page.url %></id> - <updated><%= page.updated.rfc3339 %></updated> - <published><%= page.published.rfc3339 %></published> - <title><%= page.title %></title> - <author><%= page.author.atom %></author> - <% if page.content %><content type="html"><%= html_escape(page.content) %></content><% end %> - <% if page.rights %><rights type="html"><%= html_escape(page.rights) %></rights><% end %> +<% require 'siteutil' %><entry xmlns="http://www.w3.org/2005/Atom"> + <link rel="alternate" type="text/html" href="<%= url %>"/> + <id><%= url %></id> + <updated><%= atom_updated.to_datetime.rfc3339 %></updated> + <published><%= atom_published.to_datetime.rfc3339 %></published> + <title><%= atom_title %></title> + <author><%= atom_author.atom %></author> + <% atom_categories.each do |c| %><%= c.atom %><% end %> + <% if atom_content %><content type="html"><%= SiteUtil::html_escape(atom_content) %></content><% end %> + <% if atom_rights %><rights type="html"><%= SiteUtil::html_escape(atom_rights) %></rights><% end %> </entry> |