implement blog

This commit is contained in:
Aleks Rūtiņš 2024-10-06 22:07:20 -04:00
parent b4dcd84581
commit a52f258402
8 changed files with 77 additions and 2 deletions

5
util/post_loader.rb Normal file
View 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