mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
commit index.ejs files for new years
This commit is contained in:
parent
331b758987
commit
6858634c4e
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue