mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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
|
else
|
||||||
save_post(post)
|
save_post(post)
|
||||||
if options[:commit]
|
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
|
end
|
||||||
post
|
post
|
||||||
end
|
end
|
||||||
|
|
@ -213,6 +213,10 @@ class HarpBlog
|
||||||
path_for('public/_data.json')
|
path_for('public/_data.json')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def year_index_path(year)
|
||||||
|
path_for('public/posts', year, 'index.ejs')
|
||||||
|
end
|
||||||
|
|
||||||
def post_path(dir, id = nil)
|
def post_path(dir, id = nil)
|
||||||
args = ['public/posts', dir]
|
args = ['public/posts', dir]
|
||||||
args << "#{id}.md" if id
|
args << "#{id}.md" if id
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue