Total Pageviews

Sunday, 20 April 2014

在linux vps上搭建基于python的静态网站程序-webber(太简陋)

git clone https://gitorious.org/webber/webber.git
cd webber

as3:~/webber# ls
config.py  in  Makefile  plugins  webber  webber.py
as3:~/webber# make (这个就是生成/更新静态网站的命令)
显示:
ln -s in/webber.conf
./webber
info: Reading files ...
info: Scanning files ...
warning: orphan file 'sitemap.md'
warning: orphan file 'index.md'
info: Rendering files ...
as3:~/webber# ls
config.py   in        out      webber       webber.py
config.pyc  Makefile  plugins  webber.conf  webber.pyc
(新出现了out目录)
as3:~/webber# ls out
commandline.html    hooks.html        macros.html      sitemap.html
configuration.html  index.html        pageformat.html  sitemap.xml
functions.html      inheritance.html  plugins
as3:~/webber# cd out
as3:~/webber/out# ls
commandline.html    hooks.html        macros.html      sitemap.html
configuration.html  index.html        pageformat.html  sitemap.xml
functions.html      inheritance.html  plugins
(可见~/webber/out/就是静态网站的根目录)
as3:~/webber/out# nohup Rwebserver 38727 > /dev/null &
访问http://as3.brite.biz:38727/即可看到网站效果。

发贴方法:
as3:~/webber/out# cd ../in/
as3:~/webber/in# nano test1.md
格式为:
title: test2

<h2>测试2</h2>
这是测试2.

然后,
as3:~/webber/in# nano index.md
在此行<table class="softwareproject">的上一行加上:
<p><a href=/test1.html>测试1</a></p>
<p><a href=/test2.html>测试2</a></p>
as3:~/webber/in# cd ..
as3:~/webber# make
./webber
info: Reading files ...
info: Scanning files ...
warning: orphan file 'sitemap.md'
warning: orphan file 'test2.md'
warning: orphan file 'index.md'
warning: orphan file 'test1.md'
info: Rendering files ...
as3:~/webber#

演示站点:http://as3.brite.biz:38727/,太简陋了.
http://www.holgerschurig.de/
项目地址:https://gitorious.org/webber
http://www.holgerschurig.de/projects/webber/index.html