diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/page.rb | 6 | ||||
-rw-r--r-- | lib/page_local.rb | 2 | ||||
-rw-r--r-- | lib/siteutil.rb (renamed from lib/util.rb) | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/page.rb b/lib/page.rb index 130abdf..98223c5 100644 --- a/lib/page.rb +++ b/lib/page.rb @@ -65,11 +65,11 @@ class Page def years # => Enumerable<Fixnum> if @years.nil? - if published.nil? || updated.nil? + if atom_published.nil? || atom_updated.nil? @years = Set[] else - first = published.year - last = updated.year + first = atom_published.year + last = atom_updated.year years = page_years years.add(first) diff --git a/lib/page_local.rb b/lib/page_local.rb index 7846a3b..ca3aa31 100644 --- a/lib/page_local.rb +++ b/lib/page_local.rb @@ -53,7 +53,7 @@ class LocalPage < Page # if the title was inferred from the the body content, # then it is already in the page. unless _pandoc['title'].nil? - @content += "<h1 class=title>#{title}</h1>\n" + @content += "<h1 class=title>#{atom_title}</h1>\n" end # Insert the body diff --git a/lib/util.rb b/lib/siteutil.rb index 075ebb8..2b4eda7 100644 --- a/lib/util.rb +++ b/lib/siteutil.rb @@ -1,6 +1,6 @@ # coding: utf-8 -module Util +module SiteUtil def self.html_escape(html) html .gsub('&', '&') |