Total Pageviews

Monday, 27 January 2014

在linux vps上安装基于python的静态博客程序-cytoplasm


pip install cytoplasm
mkdir cytoplasm-site
cd cytoplasm-site

as3:~/cytoplasm-site# cytoplasm init bare
Cloning into ....
remote: Reusing existing pack: 70, done.
remote: Total 70 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (70/70), 7.12 KiB, done.
Resolving deltas: 100% (22/22), done.
Submodule '_controllers/blog' (git://github.com/startling/cytoplasm-blog-controller.git)

registered for path '_controllers/blog'
Cloning into _controllers/blog...
remote: Reusing existing pack: 224, done.
remote: Total 224 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (224/224), 34.23 KiB, done.
Resolving deltas: 100% (88/88), done.
Submodule path '_controllers/blog': checked out 'e78361a1d5dc0705a3da6dce9313e8a304a31f20'
as3:~/cytoplasm-site# ls
_config.py  _controllers
as3:~/cytoplasm-site# cd _controllers/blog/test/
as3:~/cytoplasm-site/_controllers/blog/test# ls
_config.py  _controllers  _posts
as3:~/cytoplasm-site/_controllers/blog/test# nano _posts/test1.md
格式为:
title: test1
date: 2014/01/26
tags: [category1, category2]

这是测试1.
as3:~/cytoplasm-site/_controllers/blog/test# cytoplasm build
as3:~/cytoplasm-site/_controllers/blog/test# ls
_build  _config.py  _config.pyc  _controllers  _posts
(新出现了_build目录)
as3:~/cytoplasm-site/_controllers/blog/test# ls _build
2010  2012  2014  atom.xml  category1  category2  examples  index.html
as3:~/cytoplasm-site/_controllers/blog/test#
(可见~/cytoplasm-site/_controllers/blog/test/_build/就是静态网站的根目录)
发表的帖子竟然无url地址。

演示站点:http://as3.brite.biz:48752/
项目地址:https://github.com/startling/cytoplasm