Total Pageviews

Thursday 26 January 2017

搭建基于haskell的静态博客程序charukiewicz

先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.

cd /usr/local
git clone https://github.com/charukiewicz/charukiewicz charukiewi.cz
cd charukiewi.cz

root@AR:/usr/local/charukiewi.cz# ghc --make site.hs
root@AR:/usr/local/charukiewi.cz# mv _site _site-bak
root@AR:/usr/local/charukiewi.cz# ./site build (会生成_site目录)
root@AR:/usr/local/charukiewi.cz# cd _site
root@AR:/usr/local/charukiewi.cz/_site# ls
about  assets  atom.xml  css  files  images  index.html  posts    resume
root@AR:/usr/local/charukiewi.cz/_site#
(可见/usr/local/charukiewi.cz/_site就是静态网站的根目录)

新建源帖:
root@AR:/usr/local/charukiewi.cz/_site# cd ../posts
root@AR:/usr/local/charukiewi.cz/posts# nano test-1.md
root@AR:/usr/local/charukiewi.cz/posts# cat test-1.md
---
title: 测试1
disqus: yes
date: 2017-01-26 21:09:00
---

这是测试1.

看看如何?

root@AR:/usr/local/charukiewi.cz/posts# cd ..
root@AR:/usr/local/charukiewi.cz# ./site build

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

No comments:

Post a Comment