Total Pageviews

Tuesday, 3 June 2014

在linux vps上搭建基于java的静态网站程序-monkeyman

wget http://monkeyman.flotsam.nl/release/monkeyman-0.3-gibbon.jar

as3:~# git clone https://github.com/wspringer/monkeyman monkeyman-site
as3:~# cd monkeyman-site/sample/
as3:~/monkeyman-site/sample# ls
layout  source
as3:~/monkeyman-site/sample# java -jar /root/monkeyman-0.3-gibbon.jar generate (这个就是生成静态网站的命令)
as3:~/monkeyman-site/sample# ls
layout  source  target
(新出现了target目录)
as3:~/monkeyman-site/sample# cd target
as3:~/monkeyman-site/sample/target# ls
css          index      organizing-your-posts.html
favicon.ico  monkeyman  very-first-monkeyman-post-ever.html
as3:~/monkeyman-site/sample/target# mv index index.html
as3:~/monkeyman-site/sample/target# ls
css          index.html  organizing-your-posts.html
favicon.ico  monkeyman   very-first-monkeyman-post-ever.html
(可见~/monkeyman-site/sample/target/就是静态网站的根目录)
as3:~/monkeyman-site/sample/target# nohup Rwebserver 34293 > /dev/null &
访问http://as3.brite.biz:34293/即可看到网站效果。

发贴方法:
as3:~/monkeyman-site/sample/target# cd ../source
as3:~/monkeyman-site/sample/source# ls
1.md  2.md  css  index.scaml
as3:~/monkeyman-site/sample/source# nano 3.md
按1.md的格式,新建帖子3.md,格式为:
---
tags: misc1, misc2, misc3
pubDateTime: 2014-05-23
---
#test1

这是测试1.

然后,
as3:~/monkeyman-site/sample/source# cd ..
as3:~/monkeyman-site/sample# java -jar /root/monkeyman-0.3-gibbon.jar generate


演示站点:http://as3.brite.biz:34293/,不过新发布的帖子,比如http://as3.brite.biz:34293/test1.html 并不自动出现在首页。
http://monkeyman.flotsam.nl/ (程序作者的演示站点)
项目地址:https://github.com/wspringer/monkeyman