From 4a3a404a5cb2a8d5be83e28cec5c539928fa30f4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 6 Jan 2017 23:18:24 -0500 Subject: aaaah --- tmpl/index.atom.erb | 17 +---------------- tmpl/index.md.erb | 11 +++-------- tmpl/index.md.erb.bak | 12 ++++++++++++ tmpl/page.atom.erb | 10 ++++++++++ 4 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 tmpl/index.md.erb.bak create mode 100644 tmpl/page.atom.erb (limited to 'tmpl') diff --git a/tmpl/index.atom.erb b/tmpl/index.atom.erb index cd70f7e..54e4b72 100644 --- a/tmpl/index.atom.erb +++ b/tmpl/index.atom.erb @@ -1,4 +1,3 @@ - AndrewDM.me <%= @title %> @@ -9,19 +8,5 @@ <%= Person.new("Andrew Murrell").atom %> <%= $url %> - <% @pages.sort_by{|p| p.updated}.reverse.each do |page| %> - - - <%= 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 %> - - <% end %> + <% @pages.sort_by{|p| p.updated}.reverse.each do |page| %><%=@page.atom %><% end %> diff --git a/tmpl/index.md.erb b/tmpl/index.md.erb index a3ec547..680647d 100644 --- a/tmpl/index.md.erb +++ b/tmpl/index.md.erb @@ -1,12 +1,7 @@ --- -title: "<%= @title %>" +title: "<%= atom_title %>" class: "index" --- -<% @sections.keys.sort.each do |path| %> -<% unless path.empty? %>## [<%= @sections[path]['head'] %>](<%= path %>)<% end %> - -<% @sections[path]['body'].sort_by{|a|a.published}.reverse.each do |a| %> - * class="external" <% end %>href="<%= @url.route_to(a.url) %>" title="Published on <%= a.published.strftime('%Y-%m-%d') %><% if a.updated != a.published %> (updated on<%= a.updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %><% a.tags.each do |t| %><%= t.html %><% end %><% end %> - -<% end %> +<% index_pages.sort_by{|a|a.atom_published}.reverse.each do |a| %> + * class="external" <% end %>href="<%= Config::get.url.route_to(a.url) %>" title="Published on <%= a.atom_published.strftime('%Y-%m-%d') %><% if a.atom_updated != a.atom_published %> (updated on<%= a.atom_updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %><% a.atom_categories.each do |t| %><%= t.html %><% end %><% end %> diff --git a/tmpl/index.md.erb.bak b/tmpl/index.md.erb.bak new file mode 100644 index 0000000..a3ec547 --- /dev/null +++ b/tmpl/index.md.erb.bak @@ -0,0 +1,12 @@ +--- +title: "<%= @title %>" +class: "index" +--- + +<% @sections.keys.sort.each do |path| %> +<% unless path.empty? %>## [<%= @sections[path]['head'] %>](<%= path %>)<% end %> + +<% @sections[path]['body'].sort_by{|a|a.published}.reverse.each do |a| %> + * class="external" <% end %>href="<%= @url.route_to(a.url) %>" title="Published on <%= a.published.strftime('%Y-%m-%d') %><% if a.updated != a.published %> (updated on<%= a.updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %><% a.tags.each do |t| %><%= t.html %><% end %><% end %> + +<% end %> diff --git a/tmpl/page.atom.erb b/tmpl/page.atom.erb new file mode 100644 index 0000000..ea37ea5 --- /dev/null +++ b/tmpl/page.atom.erb @@ -0,0 +1,10 @@ + + + <%= 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 %> + -- cgit v1.2.3