shadowsocks是一款著名的翻墙软件,它有很多版本。它的官方网站shadowsocks.org本身就是用nodejs搭建的静态网站。
npm install -g grunt-cli
git clone https://github.com/madeye/shadowsocks-org shadowsocks.org-site
cd shadowsocks.org-site
npm install
nohup grunt > /dev/null &
as3:~/shadowsocks.org-site# ls
assets debian gruntfile.coffee package.json tasks
en index.html README.md
CNAME googlece4e3889b18bc841.html node_modules src
as3:~/shadowsocks.org-site#
可见~/shadowsocks.org-site/就是静态网站的根目录。绑定域名到该目录,即可看到网站效果.
我的示例:http://ss.brite.biz.st
as3:~/shadowsocks.org-site# cd src
as3:~/shadowsocks.org-site/src# ls
content jade js less
as3:~/shadowsocks.org-site/src# cd jade
as3:~/shadowsocks.org-site/src/jade# ls
footer.jade homepage.jade layout.jade scripts.jade
head.jade html.jade lib.jade
as3:~/shadowsocks.org-site/src/jade# nano homepage.jade
在
h1
| A secure socks5 proxy,
的上方加上:
h1
| <a href=/en/about/>点此访问博客</a>
as3:~/shadowsocks.org-site/src/jade# killall grunt
as3:~/shadowsocks.org-site/src/jade# cd ~/shadowsocks.org-site/
as3:~/shadowsocks.org-site# nohup grunt > /dev/null &
发贴方法:
as3:~/shadowsocks.org-site# cd src/content/en/
as3:~/shadowsocks.org-site/src/content/en# ls
about config download index.md
as3:~/shadowsocks.org-site/src/content/en#
可见~/shadowsocks.org-site/src/content/en/就是源贴所在的目录。
as3:~/shadowsocks.org-site/src/content/en# cd about
as3:~/shadowsocks.org-site/src/content/en/about# ls
01-contributors.md
as3:~/shadowsocks.org-site/src/content/en/about# nano test1.md
格式为:
## 测试1
这是测试1.
然后,
as3:~/shadowsocks.org-site/src/content/en/about# killall grunt
as3:~/shadowsocks.org-site/src/content/en/about# cd ~/shadowsocks.org-site/
as3:~/shadowsocks.org-site# ls
assets debian googlece4e3889b18bc841.html index.html package.json src
CNAME en Gruntfile.coffee node_modules README.md tasks
as3:~/shadowsocks.org-site# nohup grunt > /dev/null & (这个就是生成/更新静态网站的命令)
如果又写了新帖,要更新网站,请先运行killall grunt,然后再
as3:~/shadowsocks.org-site# nohup grunt > /dev/null &
演示站点:
http://ss.brite.biz.st
http://ss.brite.biz.st/en/about/test1.html
http://ss.brite.biz.st/en/myblog/first-entry.html,
项目地址:https://github.com/madeye/shadowsocks-org
npm install -g grunt-cli
git clone https://github.com/madeye/shadowsocks-org shadowsocks.org-site
cd shadowsocks.org-site
npm install
nohup grunt > /dev/null &
as3:~/shadowsocks.org-site# ls
assets debian gruntfile.coffee package.json tasks
en index.html README.md
CNAME googlece4e3889b18bc841.html node_modules src
as3:~/shadowsocks.org-site#
可见~/shadowsocks.org-site/就是静态网站的根目录。绑定域名到该目录,即可看到网站效果.
我的示例:http://ss.brite.biz.st
as3:~/shadowsocks.org-site# cd src
as3:~/shadowsocks.org-site/src# ls
content jade js less
as3:~/shadowsocks.org-site/src# cd jade
as3:~/shadowsocks.org-site/src/jade# ls
footer.jade homepage.jade layout.jade scripts.jade
head.jade html.jade lib.jade
as3:~/shadowsocks.org-site/src/jade# nano homepage.jade
在
h1
| A secure socks5 proxy,
的上方加上:
h1
| <a href=/en/about/>点此访问博客</a>
as3:~/shadowsocks.org-site/src/jade# killall grunt
as3:~/shadowsocks.org-site/src/jade# cd ~/shadowsocks.org-site/
as3:~/shadowsocks.org-site# nohup grunt > /dev/null &
发贴方法:
as3:~/shadowsocks.org-site# cd src/content/en/
as3:~/shadowsocks.org-site/src/content/en# ls
about config download index.md
as3:~/shadowsocks.org-site/src/content/en#
可见~/shadowsocks.org-site/src/content/en/就是源贴所在的目录。
as3:~/shadowsocks.org-site/src/content/en# cd about
as3:~/shadowsocks.org-site/src/content/en/about# ls
01-contributors.md
as3:~/shadowsocks.org-site/src/content/en/about# nano test1.md
格式为:
## 测试1
这是测试1.
然后,
as3:~/shadowsocks.org-site/src/content/en/about# killall grunt
as3:~/shadowsocks.org-site/src/content/en/about# cd ~/shadowsocks.org-site/
as3:~/shadowsocks.org-site# ls
assets debian googlece4e3889b18bc841.html index.html package.json src
CNAME en Gruntfile.coffee node_modules README.md tasks
as3:~/shadowsocks.org-site# nohup grunt > /dev/null & (这个就是生成/更新静态网站的命令)
如果又写了新帖,要更新网站,请先运行killall grunt,然后再
as3:~/shadowsocks.org-site# nohup grunt > /dev/null &
演示站点:
http://ss.brite.biz.st
http://ss.brite.biz.st/en/about/test1.html
http://ss.brite.biz.st/en/myblog/first-entry.html,
项目地址:https://github.com/madeye/shadowsocks-org