先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.
cd /usr/local
git clone https://github.com/cattheory/blog cattheory.com
cd cattheory.com
root@AR:/usr/local/cattheory.com# ls
Guardfile assets css images pages site.hs stack.yaml
README.md blog.cabal deploy.sh index.html posts templates
root@AR:/usr/local/cattheory.com# ghc --make site.hs (会在当前目录下,生成可执行文件site)
root@AR:/usr/local/cattheory.com# ./site build
root@AR:/usr/local/cattheory.com# ls
Guardfile _cache assets css images pages site site.hs stack.yaml
README.md _site blog.cabal deploy.sh index.html posts site.hi site.o templates
root@AR:/usr/local/cattheory.com# cd _site
root@AR:/usr/local/cattheory.com/_site# ls
archive.html atom.xml css images index.html pages posts tags
root@AR:/usr/local/cattheory.com/_site#
(可见/usr/local/cattheory.com/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/cattheory.com/_site# cd ../posts
root@AR:/usr/local/cattheory.com/posts# nano 2017-01-22-test-1.md
root@AR:/usr/local/cattheory.com/posts# cat 2017-01-22-test-1.md
---
title: 测试1
author: brite fisherman
tags: misc1, misc2, misc3
description: 点击标题看全文
mathjax: on
---
这是测试1.
看看如何?
root@AR:/usr/local/cattheory.com/posts# cd ..
root@AR:/usr/local/cattheory.com# ./site build
演示网站:http://cb.bright.biz.st
项目地址:https://github.com/cattheory/blog
cd /usr/local
git clone https://github.com/cattheory/blog cattheory.com
cd cattheory.com
root@AR:/usr/local/cattheory.com# ls
Guardfile assets css images pages site.hs stack.yaml
README.md blog.cabal deploy.sh index.html posts templates
root@AR:/usr/local/cattheory.com# ghc --make site.hs (会在当前目录下,生成可执行文件site)
root@AR:/usr/local/cattheory.com# ./site build
root@AR:/usr/local/cattheory.com# ls
Guardfile _cache assets css images pages site site.hs stack.yaml
README.md _site blog.cabal deploy.sh index.html posts site.hi site.o templates
root@AR:/usr/local/cattheory.com# cd _site
root@AR:/usr/local/cattheory.com/_site# ls
archive.html atom.xml css images index.html pages posts tags
root@AR:/usr/local/cattheory.com/_site#
(可见/usr/local/cattheory.com/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/cattheory.com/_site# cd ../posts
root@AR:/usr/local/cattheory.com/posts# nano 2017-01-22-test-1.md
root@AR:/usr/local/cattheory.com/posts# cat 2017-01-22-test-1.md
---
title: 测试1
author: brite fisherman
tags: misc1, misc2, misc3
description: 点击标题看全文
mathjax: on
---
这是测试1.
看看如何?
root@AR:/usr/local/cattheory.com/posts# cd ..
root@AR:/usr/local/cattheory.com# ./site build
演示网站:http://cb.bright.biz.st
项目地址:https://github.com/cattheory/blog
No comments:
Post a Comment