Pages

Thursday, 9 February 2017

搭建基于haskell的静态博客程序jameslawson.github.io

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

cd /usr/local
git clone https://github.com/jameslawson//jameslawson.github.io
cd  jameslawson.github.io

root@AR:/usr/local/jameslawson.github.io#  ghc --make site.hs
root@AR:/usr/local/jameslawson.github.io# ./site build
root@AR:/usr/local/jameslawson.github.io#  cd _site
root@AR:/usr/local/jameslawson.github.io/_site# ls
archive.html  css  images  index.html  posts
root@AR:/usr/local/jameslawson.github.io/_site# 

(可见/usr/local/jameslawson.github.io/_site就是静态网站的根目录)

新建源帖:
 root@AR:/usr/local/jameslawson.github.io/_site# cd ../posts
root@AR:/usr/local/jameslawson.github.io/posts# nano
2017-02-08-test-1.markdown
root@AR:/usr/local/jameslawson.github.io/posts# cat 2017-02-08-test-1.markdown
---
title: 测试1
description: 点击标题看全文
---

这是测试1.

看看如何?

root@AR:/usr/local/jameslawson.github.io/posts# cd ..

root@AR:/usr/local/jameslawson.github.io# ./site rebuild

演示网站:http://jgi.bright.biz.st/
项目地址:https://github.com/jameslawson//jameslawson.github.io

No comments:

Post a Comment