mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
replace markdown extensions with html extension
This commit is contained in:
parent
1cf1101ee0
commit
79d0e858ab
1 changed files with 1 additions and 1 deletions
2
blog.rb
2
blog.rb
|
|
@ -123,7 +123,7 @@ class Blag
|
|||
prefix = File.join(@src, 'published') + '/'
|
||||
@posts ||= Dir[File.join(prefix, '*')].sort.reverse.map do |filename|
|
||||
lines = File.readlines(filename)
|
||||
post = { :filename => filename.sub(prefix, '') }
|
||||
post = { :filename => filename.sub(prefix, '').sub(/\.m(ark)?d(own)?$/i, '.html') }
|
||||
loop do
|
||||
line = lines.shift.strip
|
||||
m = line.match(/(\w+):/)
|
||||
|
|
|
|||
Loading…
Reference in a new issue