Total Pageviews

Wednesday, 27 November 2013

在linux vps上搭建基于python的静态博客程序-igor

git clone git://github.com/aconbere/igor.git
cd igor
python setup.py install
pip install pyparsing
as3:~/igor# igor init igor-site
cd igor-site
as3:~/igor/igor-site# igor publish . output (这个就是生成/更新静态网站的命令)
会显示:
... publishing: welcome_to_your_igor_blog to ~/igor/igor-site/output/2013/11/28/welcome_to_your_igor_blog/index.html
... publishing: home to ~/igor/igor-site/output/index.html
... publishing: feed to ~/igor/igor-site/output/feed.atom
... publishing: archive to ~/igor/igor-site/output/archive/index.html
copying: media to: ~/igor/igor-site/output
as3:~/igor/igor-site# cd ~/igor/igor-site/output
as3:~/igor/igor-site/output# ls
2013  archive  feed.atom  index.html  media
as3:~/igor/igor-site/output#
可见~/igor/igor-site/output/就是静态网站的根目录。

发贴方法:
as3:~/igor/igor-site# ls
_config.yaml  media  _posts  _templates
as3:~/igor/igor-site# cd _posts
as3:~/igor/igor-site/_posts# ls
welcome.txt
as3:~/igor/igor-site/_posts#
按welcome.txt的格式,新建帖子test1.txt,格式如下:
test1 (这是标题)

这是测试1.

然后:
as3:~/igor/igor-site/_posts# cd ~/igor/igor-site
as3:~/igor/igor-site# igor publish .

演示站点:http://igor.brite.biz
项目地址:https://github.com/aconbere/igor