JekyllのFront matterを抽出する
更新日:2022.07.02
作成日:2014.06.24
require 'rubygems'
require 'english'
require 'yaml'
content = File.read('test.markdown')
content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
YAML.load($MATCH)
参考
Related contents

TECH
2014.12.13
Jekyllのタグとカテゴリを整理するために、一覧表示するWebアプリ(個人用)をつくった

TECH
2014.12.02
Jekyllに月別アーカイブを実装する

TECH
2014.12.01
Jekyllにタグクラウドを実装する

TECH
2014.11.29
UTF-8-MACとは何か?〜Jekyllのカテゴリ(タグ)ページで濁点を含むページが表示されない〜

TECH
2014.11.25
Macのsedで改行コードを出力させる 〜改行コードの違い再確認〜

TECH
2014.10.29
JekyllでPygmentsを使ってのシンタックスハイライト

TECH
2014.10.21
Jekyllでページ分割する -pagenation-

TECH
2014.09.03
YouTube埋め込みタグをレスポンシブ化する