mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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') + '/'
|
prefix = File.join(@src, 'published') + '/'
|
||||||
@posts ||= Dir[File.join(prefix, '*')].sort.reverse.map do |filename|
|
@posts ||= Dir[File.join(prefix, '*')].sort.reverse.map do |filename|
|
||||||
lines = File.readlines(filename)
|
lines = File.readlines(filename)
|
||||||
post = { :filename => filename.sub(prefix, '') }
|
post = { :filename => filename.sub(prefix, '').sub(/\.m(ark)?d(own)?$/i, '.html') }
|
||||||
loop do
|
loop do
|
||||||
line = lines.shift.strip
|
line = lines.shift.strip
|
||||||
m = line.match(/(\w+):/)
|
m = line.match(/(\w+):/)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue