Skip to content

Commit

Permalink
Fixed year problem in atom.xml and added published tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Mar 25, 2013
1 parent c281501 commit e6f37b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions _ext/patched_atomizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ def execute(site)

entries.each do |entry|
entry_clone = entry.clone
entry_clone.author = site.identities.lookup(entry_clone.author)
entry_clone.author = site.identities.lookup(entry_clone.author)
entry_clone.additional_tags = @additional_tags
# move date forward one day so post is not in the past
entry_clone.date += (60*60*24)
atom_pages << entry_clone
end

Expand All @@ -49,3 +47,4 @@ def execute(site)
end
end
end

3 changes: 2 additions & 1 deletion _layouts/atom.xml.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
%id #{site.base_url}#{entry.url}
%title= escape_once(entry.title)
%updated= entry.date.xmlschema
%published= entry.date.xmlschema
%link{:rel=>"alternate", :type=>"text/html", :href=>"#{site.base_url}#{entry.url}" }
- if (defined?(entry.author))
%author
Expand All @@ -39,4 +40,4 @@
#{summarize(html_to_text(entry.content), 100 )}...
%content{:type=>'html'}
= clean_html(html_escape(fully_qualify_urls(site.base_url, find_and_preserve(entry.content))))

0 comments on commit e6f37b6

Please sign in to comment.