diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 19:46:12 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-09 19:46:12 -0500 |
commit | 3290015d64bf739adb00da719dfe15ae5165c840 (patch) | |
tree | 3ca615d45b46dd2085b189be56bebecc93e6db65 | |
parent | 0c73fda3ed731b9dbfbc32fae31fd497e02acf90 (diff) |
page_index: make the data flow clearer
-rw-r--r-- | lib/page_index.rb | 4 | ||||
-rw-r--r-- | lib/page_tag.rb | 4 | ||||
-rw-r--r-- | tmpl/index.md.erb | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/page_index.rb b/lib/page_index.rb index 3c2f504..6ae4318 100644 --- a/lib/page_index.rb +++ b/lib/page_index.rb @@ -69,10 +69,10 @@ class IndexPage < LocalPage ret += "\n" return ret.gsub(/\n\n+/, "\n\n") end - def atom_title + def index_title _metadata['title'] end - def atom_author + def index_author Person::new(_metadata['author'] || Config::get.default_author) end diff --git a/lib/page_tag.rb b/lib/page_tag.rb index 01ef31d..03c15d2 100644 --- a/lib/page_tag.rb +++ b/lib/page_tag.rb @@ -9,7 +9,7 @@ class TagPage < IndexPage @category = Category::new(abbr) super("src/tags/#{@category.abbr}.phony") end - def atom_title + def index_title return "Tag: #{@category.name}" end def index_pages @@ -41,7 +41,7 @@ class TagIndexPage < IndexPage def initialize super("src/tags") end - def atom_title + def index_title return "Tags" end def index_pages diff --git a/tmpl/index.md.erb b/tmpl/index.md.erb index 2febcb5..e7e9b9f 100644 --- a/tmpl/index.md.erb +++ b/tmpl/index.md.erb @@ -1,5 +1,6 @@ --- -title: "<%= atom_title %>" +title: "<%= index_title %>" +author: "<%= index_author.name %>" class: "index" --- |