lib/gram/blog/parser.rb in gram-0.0.1 vs lib/gram/blog/parser.rb in gram-0.1.0
- old
+ new
@@ -8,15 +8,12 @@
def parse(file)
raw_content = File.read(file)
headers = raw_content.match(/---(.*)---/m)
yaml = YAML.load($1.strip)
- title = yaml["title"]
- tagline = yaml["tagline"]
-
content = raw_content.gsub(/---.*---/m, '').strip
- { title: title, tagline: tagline, body: content }
+ yaml.update({ 'body' => content })
end
end
end
end