git clone https://github.com/lingyunyumo/PyLinden.git pylinden
cd pylinden
as3:~/pylinden# ls
admin LICENSE pygments pylinden.wpr README.md
app.conf local_run.py pylinden pylinden.wpu site_source
as3:~/pylinden# python local_run.py (这个就是生成/更新静态网站的命令)
as3:~/pylinden# ls
admin LICENSE pygments pylinden.wpr README.md site_source
app.conf local_run.py pylinden pylinden.wpu site_output
(新出现了site_output目录)
as3:~/pylinden# cd site_output
as3:~/pylinden/site_output#
as3:~/pylinden/site_output# ls
404.html gallery.html photos posts static
about.html index.html photos.html posts.html
(可见~/pylinden/site_output/就是静态网站的根目录)
发贴方法:
as3:~/pylinden/site_output# cd ~/pylinden/site_source/_posts/
as3:~/pylinden/site_source/_posts#
按~/pylinden/site_source/_posts/里面的1970-08-22-hello-world.md的格式,新建帖子
2013-11-26-test1.md,格式如下:
---
layout: post
title: 测试1
tags:
- misc
---
这是测试1.
然后,
as3:~/pylinden/site_source/_posts# cd ~/pylinden
as3:~/pylinden# python local_run.py
演示站点:http://pld.brite.biz
作者的演示站点:http://pylinden.duapp.com/
项目地址:https://github.com/lingyunyumo/PyLinden
http://pylindendocs.duapp.com/
python环境需为2.7版,需要先安装的python modules:pyYAML, markdown, jinja2, pygments.