git clone https://github.com/obsoleter/plume plume-site
cd plume-site
as3:~/plume-site# ls
plume.py requirements.txt static templates
as3:~/plume-site# pip install -r requirements.txt
as3:~/plume-site# ls
build plume.py requirements.txt static templates
as3:~/plume-site#
as3:~/plume-site# python plume.py
显示:
Please provide a command:
build
page
post
runserver
shell Runs a Python shell inside Flask application context.
as3:~/plume-site# python plume.py post test3 (这个是新建帖子的命令)
Begin editing content/posts/2014-04-20-test3.md
Cannot open file in editor gvim.exe.
as3:~/plume-site# nano content/posts/2014-04-20-test3.md
格式为:
title: 测试3
date: 2014-04-20
summary: 点击标题看全文
tags: [misc1, misc2]
published: true
这是测试3.
然后,
as3:~/plume-site# python plume.py build (这个就是生成/更新静态网站的命令)
as3:~/plume-site# ls
build content plume.py requirements.txt static templates
as3:~/plume-site# ls build
2014 404.html index.html pygments.css recent.atom static
as3:~/plume-site# cd build
as3:~/plume-site/build# ls
2014 404.html index.html pygments.css recent.atom static
as3:~/plume-site/build#
可见~/plume-site/build/就是静态网站的根目录。
as3:~/plume-site/build# nohup Rwebserver 43284 > /dev/null &
访问http://as3.brite.biz:43284/即可看到网站效果。
发贴方法:上面已说。
新建页面的方法:
as3:~/plume-site# python plume.py page about (这个是新建页面的命令)
Begin editing content/pages/about.md
Cannot open file in editor gvim.exe.
as3:~/plume-site# nano content/pages/about.md
as3:~/plume-site# python plume.py build (这个就是生成/更新静态网站的命令)
as3:~/plume-site# python plume.py page portfolio
Begin editing content/pages/portfolio.md
Cannot open file in editor gvim.exe.
as3:~/plume-site# nano content/pages/portfolio.md
as3:~/plume-site# python plume.py build (这个就是生成/更新静态网站的命令)
演示站点:http://as3.brite.biz:43284,http://plume.brite.biz.st
http://obsoleter.github.com (程序作者的演示站点)
项目地址:
https://github.com/obsoleter/plume
(https://github.com/obsoleter/obsoleter.github.com,
https://github.com/obsoleter/obsoleter.com)
http://obsoleter.com/2012/12/12/creating-plume-a-static-site-generator-with-flask-
part-1/