先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack和ghc.
然后stack install cabal-install (此命令是安装cabal程序)
cd /usr/local
git clone https://github.com/travisbrown/metaplasm meta.plasm.us-site
cd meta.plasm.us-site
root@AR:/usr/local/meta.plasm.us-site# ls
app dist metaplasm.cabal src
cabal.sandbox.config images Setup.hs stack.yaml
content lib README.md syntax
css LICENSE.txt templates
root@AR:/usr/local/meta.plasm.us-site# cabal sandbox init
root@AR:/usr/local/meta.plasm.us-site# cabal install
root@AR:/usr/local/meta.plasm.us-site# cd .cabal-sandbox/bin
root@AR:/usr/local/meta.plasm.us-site/.cabal-sandbox/bin# ls
aeson-pretty json2yaml pandoc-citeproc warp
hakyll-init pandoc site yaml2json
(site就是可执行文件)
root@AR:/usr/local/meta.plasm.us-site/.cabal-sandbox/bin# cd ../..
root@AR:/usr/local/meta.plasm.us-site# .cabal-sandbox/bin/site build (此即生成/更新静态网站的根目录的命令)
root@AR:/usr/local/meta.plasm.us-site# ls
app dist metaplasm.cabal _site templates
cabal.sandbox.config images src
content lib README.md stack.yaml
css LICENSE.txt Setup.hs syntax
root@AR:/usr/local/meta.plasm.us-site# cd _site
root@AR:/usr/local/meta.plasm.us-site/_site# ls
about archive.html atom.xml index.html posts running
root@AR:/usr/local/meta.plasm.us-site/_site#
(可见/usr/local/meta.plasm.us-site/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/meta.plasm.us-site/_site# cd ../content/posts
root@AR:/usr/local/meta.plasm.us-site/content/posts# nano 2017-01-04-test-1.markdown
root@AR:/usr/local/meta.plasm.us-site/content/posts# cat 2017-01-04-test-1.markdown
---
title: 测试1
date: Wed Jan 04 20:41:16 2017
tags: misc1, misc2
---
这是测试1.
看看如何?
root@AR:/usr/local/meta.plasm.us-site/content/posts# cd ../..
root@AR:/usr/local/meta.plasm.us-site# .cabal-sandbox/bin/site build
演示网站:http://mpu.bright.biz.st/ ,http://meta.plasm.us/(程序作者的网站)
项目地址:https://github.com/travisbrown/metaplasm
然后stack install cabal-install (此命令是安装cabal程序)
cd /usr/local
git clone https://github.com/travisbrown/metaplasm meta.plasm.us-site
cd meta.plasm.us-site
root@AR:/usr/local/meta.plasm.us-site# ls
app dist metaplasm.cabal src
cabal.sandbox.config images Setup.hs stack.yaml
content lib README.md syntax
css LICENSE.txt templates
root@AR:/usr/local/meta.plasm.us-site# cabal sandbox init
root@AR:/usr/local/meta.plasm.us-site# cabal install
root@AR:/usr/local/meta.plasm.us-site# cd .cabal-sandbox/bin
root@AR:/usr/local/meta.plasm.us-site/.cabal-sandbox/bin# ls
aeson-pretty json2yaml pandoc-citeproc warp
hakyll-init pandoc site yaml2json
(site就是可执行文件)
root@AR:/usr/local/meta.plasm.us-site/.cabal-sandbox/bin# cd ../..
root@AR:/usr/local/meta.plasm.us-site# .cabal-sandbox/bin/site build (此即生成/更新静态网站的根目录的命令)
root@AR:/usr/local/meta.plasm.us-site# ls
app dist metaplasm.cabal _site templates
cabal.sandbox.config images src
content lib README.md stack.yaml
css LICENSE.txt Setup.hs syntax
root@AR:/usr/local/meta.plasm.us-site# cd _site
root@AR:/usr/local/meta.plasm.us-site/_site# ls
about archive.html atom.xml index.html posts running
root@AR:/usr/local/meta.plasm.us-site/_site#
(可见/usr/local/meta.plasm.us-site/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/meta.plasm.us-site/_site# cd ../content/posts
root@AR:/usr/local/meta.plasm.us-site/content/posts# nano 2017-01-04-test-1.markdown
root@AR:/usr/local/meta.plasm.us-site/content/posts# cat 2017-01-04-test-1.markdown
---
title: 测试1
date: Wed Jan 04 20:41:16 2017
tags: misc1, misc2
---
这是测试1.
看看如何?
root@AR:/usr/local/meta.plasm.us-site/content/posts# cd ../..
root@AR:/usr/local/meta.plasm.us-site# .cabal-sandbox/bin/site build
演示网站:http://mpu.bright.biz.st/ ,http://meta.plasm.us/(程序作者的网站)
项目地址:https://github.com/travisbrown/metaplasm