先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.
cd /usr/local
git clone https://github.com/bgapinski/blog bgapinski-blog
cd bgapinski-blog
root@AR:/usr/local/bgapinski-blog# ls
blog.cabal deployAssets posts site.hs
css images
about.markdown deploy.sh index.html templates
root@AR:/usr/local/bgapinski-blog# ghc --make site.hs
root@AR:/usr/local/bgapinski-blog# ls
blog.cabal deployAssets posts site.hs
css images site site.o
about.markdown deploy.sh index.html site.hi templates
root@AR:/usr/local/bgapinski-blog# ./site build
root@AR:/usr/local/bgapinski-blog# ls
_cache blog.cabal deployAssets posts site.hs
_site css images site site.o
about.markdown deploy.sh index.html site.hi templates
root@AR:/usr/local/bgapinski-blog# cd _site
root@AR:/usr/local/bgapinski-blog/_site# ls
about.html archive.html css images index.html posts
root@AR:/usr/local/bgapinski-blog/_site#
(可见/usr/local/bgapinski-blog/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/bgapinski-blog/_site# cd ../posts
root@AR:/usr/local/bgapinski-blog/posts# nano 2017-01-22-test-1.markdown
root@AR:/usr/local/bgapinski-blog/posts# cat 2017-01-22-test-1.markdown
---
title: 测试1
---
这是测试1.
看看如何?
root@AR:/usr/local/bgapinski-blog/posts# cd ..
root@AR:/usr/local/bgapinski-blog# ./site build
演示网站:http://bb.bright.biz.st
项目地址:https://github.com/bgapinski/blog
cd /usr/local
git clone https://github.com/bgapinski/blog bgapinski-blog
cd bgapinski-blog
root@AR:/usr/local/bgapinski-blog# ls
blog.cabal deployAssets posts site.hs
css images
about.markdown deploy.sh index.html templates
root@AR:/usr/local/bgapinski-blog# ghc --make site.hs
root@AR:/usr/local/bgapinski-blog# ls
blog.cabal deployAssets posts site.hs
css images site site.o
about.markdown deploy.sh index.html site.hi templates
root@AR:/usr/local/bgapinski-blog# ./site build
root@AR:/usr/local/bgapinski-blog# ls
_cache blog.cabal deployAssets posts site.hs
_site css images site site.o
about.markdown deploy.sh index.html site.hi templates
root@AR:/usr/local/bgapinski-blog# cd _site
root@AR:/usr/local/bgapinski-blog/_site# ls
about.html archive.html css images index.html posts
root@AR:/usr/local/bgapinski-blog/_site#
(可见/usr/local/bgapinski-blog/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/bgapinski-blog/_site# cd ../posts
root@AR:/usr/local/bgapinski-blog/posts# nano 2017-01-22-test-1.markdown
root@AR:/usr/local/bgapinski-blog/posts# cat 2017-01-22-test-1.markdown
---
title: 测试1
---
这是测试1.
看看如何?
root@AR:/usr/local/bgapinski-blog/posts# cd ..
root@AR:/usr/local/bgapinski-blog# ./site build
演示网站:http://bb.bright.biz.st
项目地址:https://github.com/bgapinski/blog
No comments:
Post a Comment