先按此文http://briteming.blogspot.jp/2016/07/hakyll.html,安装stack,ghc,hakyll.
cd /usr/local
git clone https://bitbucket.org/alhassy/blog alhassy.bitbucket.org
cd alhassy.bitbucket.org
root@AR:/usr/local/alhassy.bitbucket.org# rm site site.hi site.o
root@AR:/usr/local/alhassy.bitbucket.org# mv _site _site-bak
root@AR:/usr/local/alhassy.bitbucket.org# ghc --make site.hs
root@AR:/usr/local/alhassy.bitbucket.org# ./site build
root@AR:/usr/local/alhassy.bitbucket.org# cd _site
root@AR:/usr/local/alhassy.bitbucket.org/_site# ls
about.html archive.html contact.html css images index.html posts tags
root@AR:/usr/local/alhassy.bitbucket.org/_site#
(可见/usr/local/alhassy.bitbucket.org/_site就是静态网站的根目录)
新建源帖:
root@AR:/usr/local/alhassy.bitbucket.org/_site# cd ../posts
root@AR:/usr/local/alhassy.bitbucket.org/posts# nano test-1.markdown
root@AR:/usr/local/alhassy.bitbucket.org/posts# cat test-1.markdown
---
title: 测试1
date: January 31, 2017
tags: misc1, misc2, misc3
---
这是测试1.
看看如何?
root@AR:/usr/local/alhassy.bitbucket.org/posts# ls (查看后来我新建的帖子)
15-01-11-setup.markdown~ blogliterately.markdown vtest.markdown
15-01-12-setup.markdown blogliterately.markdown~ whydp.markdown
15-01-12-setup.markdown~ silly.markdown~ whydp.markdown~
PathCat.markdown test-1.markdown z0-ask-liu-shijiu.markdown
SoP0.markdown test-2.markdown z1-qingming.markdown
SoP1.markdown uce.markdown z2-send-mhr.markdown
SoP2.markdown vbilu.markdown z3-traveller-song.markdown
root@AR:/usr/local/alhassy.bitbucket.org/posts# cd ..
root@AR:/usr/local/alhassy.bitbucket.org# ./site rebuild
演示网站:http://ab.bright.biz.st
项目地址: https://bitbucket.org/alhassy/blog
No comments:
Post a Comment