Total Pageviews

Monday 22 August 2016

搭建基于hakyll的静态博客程序metasepi-website

先安装ghc和hakyll.

cd /usr/local
git clone https://github.com/metasepi/metasepi-website
cd metasepi-website

404.html  draw       js   plan     
50x.html  en       Makefile   po     
about.md  favicon.ico       map.md   posts    
_cache   googlef5fb4c1f27601161.html  memories.md    templates
css   img       papers.md   hakyll.hs
doc   index.html       past-supporters.md  

root@AR:/usr/local/metasepi-website# mv hakyll.hs site.hs
root@AR:/usr/local/metasepi-website# ghc --make site.hs
404.html  draw       js   plan     site.hs
50x.html  en       Makefile   po     site.o
about.md  favicon.ico       map.md   posts    templates
_cache   googlef5fb4c1f27601161.html  memories.md   site
css   img       papers.md    site.hi
doc   index.html       past-supporters.md  
root@AR:/usr/local/metasepi-website# ./site build
404.html  draw       js   plan     site.hs
50x.html  en       Makefile   po     site.o
about.md  favicon.ico       map.md   posts    templates
_cache   googlef5fb4c1f27601161.html  memories.md   site
css   img       papers.md   _site
doc   index.html       past-supporters.md  site.hi
root@AR:/usr/local/metasepi-website# cd _site
root@AR:/usr/local/metasepi-website/_site# ls
404.html    en map.html       posts.html
50x.html    favicon.ico memories.html       rss_en.xml
about.html  googlef5fb4c1f27601161.html  papers.html       rss.xml
css     img past-supporters.html  tags
doc     index.html plan
draw     js posts
root@AR:/usr/local/metasepi-website/_site#
(可见/usr/local/metasepi-website/_site/就是静态网站的根目录)

新建源贴:
root@AR:/usr/local/metasepi-website/_site# cd ..
root@AR:/usr/local/metasepi-website# cd en
root@AR:/usr/local/metasepi-website/en# ls
posts
root@AR:/usr/local/metasepi-website/en# cd posts
root@AR:/usr/local/metasepi-website/en/posts# ls
2012-08-05-start-metasepi.md   2014-08-24-sprosym2014.md
2013-01-09-design_arafura.md   2014-09-04-haskell-symposium.md
2013-12-23-ml_guide_to_ats.md  2014-09-14-ats2_internal_overview.md
2013-12-24-jats-ug.md       2014-10-19-osc-tokyo.md
2014-01-05-mbed_fp_0.md        2015-03-06-ppl2015.md
2014-01-10-prosym55.md       2015-12-31-yuku-kuru.md
2014-01-17-11th_wocs2.md       2016-01-30-fpiot_0.md
2014-03-01-osc-tokyo.md        
2014-05-11-functional_lt.md    
2014-07-04-osc-nagoya-ats.md   
2014-07-26-ajhc-tlug.md        
2014-08-02-osc2014-kyoto.md
root@AR:/usr/local/metasepi-website/en/posts# nano 2016-08-23-0001-test-1.md
root@AR:/usr/local/metasepi-website/en/posts# cat 2016-08-23-0001-test-1.md
---
title: 测试1
tags: misc1, misc2, misc3
description: 测试
---

这是测试1.
root@AR:/usr/local/metasepi-website/en/posts# cd ../..
root@AR:/usr/local/metasepi-website# ./site build

演示网站:http://surmount.biz.st:8537/en/posts.html,
http://msp.smt.biz.st
http://msp.smt.biz.st/en/posts.html
项目地址:https://github.com/metasepi/metasepi-website