commit index.ejs files for new years

This commit is contained in:
Sami Samhuri 2016-03-28 09:18:09 -07:00
parent 331b758987
commit 6858634c4e

View file

@ -115,7 +115,7 @@ class HarpBlog
else
save_post(post)
if options[:commit]
git_commit("create post '#{post.title}'", [post_path(post.dir)])
git_commit("create post '#{post.title}'", [year_index_path(post.year), post_path(post.dir)])
end
post
end
@ -213,6 +213,10 @@ class HarpBlog
path_for('public/_data.json')
end
def year_index_path(year)
path_for('public/posts', year, 'index.ejs')
end
def post_path(dir, id = nil)
args = ['public/posts', dir]
args << "#{id}.md" if id