在linux vps上搭建基于lua的静态博客程序-luapress
时间:2014-08-05 09:34 来源: 我爱IT技术网 作者:山风
先安装lua.
- as3:~# git clone https://github.com/nickl1/Luapress luapress-old
- as3:~# cd luapress-old
- as3:~/luapress-old#
- as3:~/luapress-old# ls
- build inc LICENSE.md posts README.md
- config.example.lua lib pages luapress.lua templates
- as3:~/luapress-old# cp config.example.lua config.lua
- as3:~/luapress-old# ls
- build config.lua lib pages luapress.lua templates
- config.example.lua inc LICENSE.md posts README.md
- as3:~/luapress-old# nano config.lua
(修改url的值为http://as3.brite.biz:34294
以后再改为所绑定的域名地址:http://lp.briteming.yi.org)
- root@as3:~/luapress-old# cd build
- root@as3:~/luapress-old/build# ls
- inc pages posts
- as3:~/luapress-old/build#
- ~/luapress-old/build/里面暂时没有index.html,需先建立至少一个源贴才行。
- as3:~/luapress-old/build# cd ..
- as3:~/luapress-old# cd posts
- as3:~/luapress-old/posts# ls
- as3:~/luapress-old/posts# (此时posts里面什么源贴都没有)
- as3:~/luapress-old/posts# nano test1.md
格式为:
## 测试1
这是测试1.
然后,
- as3:~/luapress-old/posts# cd ..
- as3:~/luapress-old# ./luapress.lua (这个就是生成/更新静态网站的命令)
会显示:
- [Luapress]: Posts
- Post added: test1
- [Luapress]: Pages
- [Luapress]: Building posts
- [Luapress]: Building pages
- [Luapress]: Building indexes
- [Luapress]: Building rss
- [Luapress]: Copy inc
- [Luapress]: Complete! Upload ./build to your website
- root@as3:~/luapress-old# cd build
- root@as3:~/luapress-old/build# ls
- inc index.html index.xml pages posts
(可见~/luapress-old/build/就是静态网站的根目录)
- root@as3:~/luapress-old/build# nohup Rwebserver 34294 > /dev/null &
访问http://as3.brite.biz:34294/即可看到网站效果。
不支持发表180kb的长文。
项目地址:https://github.com/nickl1/Luapress
(不要用这里https://github.com/Fizzadar/Luapress的源码,此处的源码有问题)
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
