先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.
cd /usr/local
git clone https://github.com/gphil/gphils_blog gphil.net
cd gphil.net
oot@AR:/usr/local/gphil.net# ls
README.md copy_site.sh img posts site.hs
css index.html
gphil_blog.cabal js templates
root@AR:/usr/local/gphil.net# ghc --make site.hs
(这里的site.hs是程序作者更新过的,基于hakyll4的site.hs文件。之前的
site.hs文件是基于hakyll3的,因为我的hakyll程序是4.x版,所以运行ghc --make site.hs遇到了很多的错误。)
root@AR:/usr/local/gphil.net# ./site build
oot@AR:/usr/local/gphil.net# ls
README.md copy_site.sh img posts site.hs
_cache css index.html site site.o
_site gphil_blog.cabal js site.hi templates
(生成了_site目录)
root@AR:/usr/local/gphil.net# cd _site
root@AR:/usr/local/gphil.net/_site# ls
css img index.html js posts posts.html rss.xml tags
root@AR:/usr/local/gphil.net/_site#
(可见/usr/local/gphil.net/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/gphil.net/_site# cd ../posts
root@AR:/usr/local/gphil.net/posts# nano 2017-02-24-test-1.markdown
root@AR:/usr/local/gphil.net/posts# cat 2017-02-24-test-1.markdown
---
title: 测试1
author: brite fisherman
tags: misc1, misc2, misc3
---
这是测试1.
看看如何?
root@AR:/usr/local/gphil.net/posts# cd ..
root@AR:/usr/local/gphil.net# ./site rebuild
演示网站:http://ggb.bright.biz.st/
项目地址:https://github.com/gphil/gphils_blog
https://github.com/gphil/gphils_blog/issues/1
cd /usr/local
git clone https://github.com/gphil/gphils_blog gphil.net
cd gphil.net
oot@AR:/usr/local/gphil.net# ls
README.md copy_site.sh img posts site.hs
css index.html
gphil_blog.cabal js templates
root@AR:/usr/local/gphil.net# ghc --make site.hs
(这里的site.hs是程序作者更新过的,基于hakyll4的site.hs文件。之前的
site.hs文件是基于hakyll3的,因为我的hakyll程序是4.x版,所以运行ghc --make site.hs遇到了很多的错误。)
root@AR:/usr/local/gphil.net# ./site build
oot@AR:/usr/local/gphil.net# ls
README.md copy_site.sh img posts site.hs
_cache css index.html site site.o
_site gphil_blog.cabal js site.hi templates
(生成了_site目录)
root@AR:/usr/local/gphil.net# cd _site
root@AR:/usr/local/gphil.net/_site# ls
css img index.html js posts posts.html rss.xml tags
root@AR:/usr/local/gphil.net/_site#
(可见/usr/local/gphil.net/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/gphil.net/_site# cd ../posts
root@AR:/usr/local/gphil.net/posts# nano 2017-02-24-test-1.markdown
root@AR:/usr/local/gphil.net/posts# cat 2017-02-24-test-1.markdown
---
title: 测试1
author: brite fisherman
tags: misc1, misc2, misc3
---
这是测试1.
看看如何?
root@AR:/usr/local/gphil.net/posts# cd ..
root@AR:/usr/local/gphil.net# ./site rebuild
演示网站:http://ggb.bright.biz.st/
项目地址:https://github.com/gphil/gphils_blog
https://github.com/gphil/gphils_blog/issues/1
No comments:
Post a Comment