hakyll
TRANSCRIPT
Hakyll
• Haskell製の静的サイトジェネレーター – pandocでフォーマット変換 – unixFilterで任意の外部コマンドが使える • sassとかjadeとかstylusとか
• GithubPagesとも相性が良い – deployとかラクチン
install Hakyll
$ mkvhenv hakyll # make virtualenv for hakyll $ cabal install hakyll
# download shizuru-site$ git clone https://github.com/shizuru/shizuru.github.com.git
# edit site.hs$ ghc –-make site.hs$ ./site build # build site$ ./site server # check site$ ./site deploy # deploy site
設定の書き方
main :: IO ()main = hakyllWith config $ do match "images/*" $ do route idRoute compile copyFileCompiler
match "css/*" $ do route idRoute compile compressCssCompiler
match "templates/*" $ compile templateCompiler
match "bootstrap/bootstrap/**" $ do route $ gsubRoute "bootstrap/bootstrap/" (const "") compile copyFileCompiler
マッチさせて、出力先を決めて、コンパイルする