implement blog
This commit is contained in:
parent
b4dcd84581
commit
a52f258402
8 changed files with 77 additions and 2 deletions
5
util/post_loader.rb
Normal file
5
util/post_loader.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
module Util
|
||||
module PostLoader
|
||||
def posts = Dir['posts/*.md'].sort.reverse.map { |filename| {slug: File.basename(filename, '.md'), data: FrontMatterParser::Parser.parse_file(filename)} }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue