Total Pageviews

Monday 28 October 2013

在linux vps上搭建基于nodejs的静态博客程序-quill

npm install quill -g
quill new quill-site
cd quill-site
quill post "My First Post" (这将在posts/目录创建一个md文件)
npm install
node quill (Now you can navigate to http://localhost:8000 and see your blog)


as3:~# cd quill-site
as3:~/quill-site# ls
config.json  package.json  posts  quill  quill.js  themes
as3:~/quill-site# quill post "My First Post"
Successfully created post: /root/quill-site/posts/1382945567-my-first-post.md
as3:~/quill-site# nano posts/1382945567-my-first-post.md (这里很奇怪,只写正文或源码即可。不需写header部分)
as3:~/quill-site# npm install
as3:~/quill-site# nohup node quill > /dev/null & (Now you can navigate to http://localhost:8000 and see your blog)
as3:~/quill-site# ls
config.json  node_modules  package.json  posts  quill  quill.js  _site  themes (新出现了node_modules和_site目录.nohup node quill > /dev/null & 就是生成/更新静态网站的命令
as3:~/quill-site# cd _site
as3:~/quill-site/_site# ls
assets  index.html  my-first-post
(可见~/quill-site/_site/就是静态网站的根目录。可绑定一个域名到该目录)

demo site: http://as3.brite.biz:8000/, http://ql.brite.biz/

项目地址:https://github.com/theycallmeswift/quill,它的模板用的是twitter bootstrap的模板