先安装ghc.
cd /usr/local
git clone https://github.com/klpn/static-dust static-dust.klpn.se-site
cd static-dust.klpn.se-site
cd /usr/local
git clone https://github.com/klpn/static-dust static-dust.klpn.se-site
cd static-dust.klpn.se-site
root@AR:/usr/local/static-dust.klpn.se-site# ls
_cache images posts templates
css index.html README.md static-dust.bib
default.csl LICENSE site.hs static-dust.cabal
root@AR:/usr/local/static-dust.klpn.se-site# ghc --make site.hs
root@AR:/usr/local/static-dust.klpn.se-site# ls
_cache images posts site.o templates
css index.html README.md site.hi static-dust.bib
default.csl LICENSE site site.hs static-dust.cabal
root@AR:/usr/local/static-dust.klpn.se-site# ./site build
root@AR:/usr/local/static-dust.klpn.se-site# ls
_cache images posts _site site.o templates
css index.html README.md site.hi static-dust.bib
default.csl LICENSE site site.hs static-dust.cabal
root@AR:/usr/local/static-dust.klpn.se-site# cd _site
root@AR:/usr/local/static-dust.klpn.se-site/_site# ls
archive.html atom.xml css images index.html posts tags
root@AR:/usr/local/static-dust.klpn.se-site/_site#
(可见,/usr/local/static-dust.klpn.se-site/_site/就是静态网站的根目录)
新建源贴:
root@AR:/usr/local/static-dust.klpn.se-site/_site# cd ..
root@AR:/usr/local/static-dust.klpn.se-site# cd posts
root@AR:/usr/local/static-dust.klpn.se-site/posts# rm *.md
root@AR:/usr/local/static-dust.klpn.se-site/posts# nano 2016-08-24-2306-test-1.md
root@AR:/usr/local/static-dust.klpn.se-site/posts# nano 2016-08-24-2306-test-1.md
root@AR:/usr/local/static-dust.klpn.se-site/posts# cat 2016-08-24-2306-test-1.md
---
tags: misc1, misc2, misc3
title: 测试1
author: brite
---
这是测试1.
root@AR:/usr/local/static-dust.klpn.se-site/posts# cd ..
root@AR:/usr/local/static-dust.klpn.se-site# ./site build
演示网站:http://sd.smt.biz.st
项目地址:https://github.com/klpn/static-dust