先按此文http://briteming.blogspot.com/2016/07/haskellghc.html ,安装ghc/cabal.
cd /usr/local
git clone https://github.com/Keruspe/blog Keruspe-blog
cd Keruspe-blog
root@AR:/usr/local/Keruspe-blog# ls
cabal.sandbox.config _cache css data dist files images keruspe-blog.cabal LICENSE Makefile posts scripts Setup.hs src templates TODO
root@AR:/usr/local/Keruspe-blog# make
root@AR:/usr/local/Keruspe-blog# cabal run -- blog build (这个就是生成/更新静态网站的命令)
root@AR:/usr/local/Keruspe-blog# ls
cabal.sandbox.config _cache css data dist files images keruspe-blog.cabal LICENSE Makefile posts scripts Setup.hs _site src templates TODO
(生成了_site目录)
root@AR:/usr/local/Keruspe-blog# cd _site
root@AR:/usr/local/Keruspe-blog/_site# ls
css files index.html posts robots.txt tags
favicon.png images keybase.txt posts.html rss.xml
root@AR:/usr/local/Keruspe-blog/_site#
(可见/usr/local/Keruspe-blog/_site/就是静态网站的根目录)
新建源贴:
root@AR:/usr/local/Keruspe-blog/_site# cd ..
root@AR:/usr/local/Keruspe-blog# cd posts
root@AR:/usr/local/Keruspe-blog/posts#
root@AR:/usr/local/Keruspe-blog/posts# nano 2016-08-19-0944-test-1.md
(内容格式如下:
---
title: 测试1
author: brite
tags: misc1, misc2, misc3, misc4
---
这是测试1. )
root@AR:/usr/local/Keruspe-blog/posts# cd ..
root@AR:/usr/local/Keruspe-blog# cabal run -- blog build
演示网站:http://kb.smt.biz.st
项目地址:https://github.com/Keruspe/blog
此静态博客程序不能分页。