Total Pageviews

Saturday 28 January 2017

搭建基于haskell的静态博客程序decomputed.com


先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.
cd /usr/local
git clone  https://github.com/decomputed/decomputed.com
cd decomputed.com

root@AR:/usr/local/decomputed.com# ghc --make site.hs
root@AR:/usr/local/decomputed.com# ./site build
root@AR:/usr/local/decomputed.com# cd _site
root@AR:/usr/local/decomputed.com/_site# ls
archive.html  atom.xml    contact.html  css  images  index.html  posts
root@AR:/usr/local/decomputed.com/_site#
(可见/usr/local/decomputed.com/_site就是静态网站的根目录)

新建源帖:
root@AR:/usr/local/decomputed.com/_site# cd ../posts
root@AR:/usr/local/decomputed.com/posts# nano 2017-01-29-test-1.md
root@AR:/usr/local/decomputed.com/posts# cat 2017-01-29-test-1.md
---
title: 测试1
---

这是测试1.

看看如何?

root@AR:/usr/local/decomputed.com/posts# cd ..
root@AR:/usr/local/decomputed.com# ./site build

演示网站:http://dcp.bright.biz.st/
项目地址:https://github.com/decomputed/decomputed.com

No comments:

Post a Comment