From 5022d1a0df1534b1cbec1cbee23568f201ea1cc6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 9 Jan 2017 16:45:53 -0500 Subject: Implement actual file generation, go through fixing things. --- tmpl/index.atom.erb | 10 +++++----- tmpl/page.atom.erb | 19 ++++++++++--------- tmpl/page.html.erb | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) (limited to 'tmpl') diff --git a/tmpl/index.atom.erb b/tmpl/index.atom.erb index 54e4b72..8719d05 100644 --- a/tmpl/index.atom.erb +++ b/tmpl/index.atom.erb @@ -1,12 +1,12 @@ - AndrewDM.me <%= @title %> + <%= atom_title %> - <%= @pages.map{|p|p.updated}.sort.last.rfc3339 %> - <%= Person.new("Andrew Murrell").atom %> - <%= $url %> + <%= index_pages_leaves.map{|p|p.atom_updated}.sort.last.to_datetime.rfc3339 %> + <%= Person.new(Config::get.default_author).atom %> + <%= url %> - <% @pages.sort_by{|p| p.updated}.reverse.each do |page| %><%=@page.atom %><% end %> + <% index_pages_leaves.sort_by{|p|p.atom_updated}.reverse.each do |page| %><%= page.atom %><% end %> 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 @@ - - - <%= page.url %> - <%= page.updated.rfc3339 %> - <%= page.published.rfc3339 %> - <%= page.title %> - <%= page.author.atom %> - <% if page.content %><%= html_escape(page.content) %><% end %> - <% if page.rights %><%= html_escape(page.rights) %><% end %> +<% require 'siteutil' %> + + <%= url %> + <%= atom_updated.to_datetime.rfc3339 %> + <%= atom_published.to_datetime.rfc3339 %> + <%= atom_title %> + <%= atom_author.atom %> + <% atom_categories.each do |c| %><%= c.atom %><% end %> + <% if atom_content %><%= SiteUtil::html_escape(atom_content) %><% end %> + <% if atom_rights %><%= SiteUtil::html_escape(atom_rights) %><% end %> diff --git a/tmpl/page.html.erb b/tmpl/page.html.erb index dae08eb..fb5ddaa 100644 --- a/tmpl/page.html.erb +++ b/tmpl/page.html.erb @@ -29,7 +29,7 @@ -- cgit v1.2.3