as3:~# git clone https://github.com/kaihendry/sg-hackandtell sg-hackandtell-site
as3:~# cd sg-hackandtell-site
as3:~/sg-hackandtell-site# ls
2012-12-05 2013-12-10 header.inc js organisation
2013-01-29 2014-01-28 ics list README.md
2013-03-05 2014-03-11 images Makefile style.css
2013-09-10 footer.inc index.mdwn mkfile
as3:~/sg-hackandtell-site# make (这个就是生成/更新静态网站的命令)
organisation/index.mdwn → organisation/index.html
2013-01-29/index.mdwn → 2013-01-29/index.html
index.mdwn → index.html
2013-12-10/index.mdwn → 2013-12-10/index.html
2013-03-05/index.mdwn → 2013-03-05/index.html
2014-01-28/index.mdwn → 2014-01-28/index.html
2013-09-10/index.mdwn → 2013-09-10/index.html
2014-03-11/index.mdwn → 2014-03-11/index.html
as3:~/sg-hackandtell-site#
as3:~/sg-hackandtell-site# ls
2012-12-05 2013-12-10 header.inc index.mdwn mkfile
2013-01-29 2014-01-28 ics js organisation
2013-03-05 2014-03-11 images list README.md
2013-09-10 footer.inc index.html Makefile style.css
(新出现了index.html,可见~/sg-hackandtell-site/就是静态网站的根目录)
as3:~/sg-hackandtell-site# nohup python -m SimpleHTTPServer 45200 > /dev/null &
访问http://as3.brite.biz:45200/即可看到网站效果。
发贴方法:
as3:~/sg-hackandtell-site#
as3:~/sg-hackandtell-site# mkdir 2014-06-16
as3:~/sg-hackandtell-site# cd 2014-06-16
as3:~/sg-hackandtell-site/2014-06-16# nano index.mdwn
格式为:
测试1
===============
这是测试1.
然后,
as3:~/sg-hackandtell-site/2014-06-16# cd ..
as3:~/sg-hackandtell-site# make
2014-06-16/index.mdwn → 2014-06-16/index.html
as3:~/sg-hackandtell-site#
不过所发表的文章并不自动出现在首页,可这样做:
as3:~/sg-hackandtell-site# nano index.mdwn
在<li><a href="2014-01-28">2014-01-28</a></li>的下一行加上:
<li><a href=/2014-06-16>2014-06-16</a></li>
然后,
as3:~/sg-hackandtell-site# make
index.mdwn → index.html
as3:~/sg-hackandtell-site#
演示站点:http://as3.brite.biz:45200/,
项目地址:https://github.com/kaihendry/sg-hackandtell
as3:~# cd sg-hackandtell-site
as3:~/sg-hackandtell-site# ls
2012-12-05 2013-12-10 header.inc js organisation
2013-01-29 2014-01-28 ics list README.md
2013-03-05 2014-03-11 images Makefile style.css
2013-09-10 footer.inc index.mdwn mkfile
as3:~/sg-hackandtell-site# make (这个就是生成/更新静态网站的命令)
organisation/index.mdwn → organisation/index.html
2013-01-29/index.mdwn → 2013-01-29/index.html
index.mdwn → index.html
2013-12-10/index.mdwn → 2013-12-10/index.html
2013-03-05/index.mdwn → 2013-03-05/index.html
2014-01-28/index.mdwn → 2014-01-28/index.html
2013-09-10/index.mdwn → 2013-09-10/index.html
2014-03-11/index.mdwn → 2014-03-11/index.html
as3:~/sg-hackandtell-site#
as3:~/sg-hackandtell-site# ls
2012-12-05 2013-12-10 header.inc index.mdwn mkfile
2013-01-29 2014-01-28 ics js organisation
2013-03-05 2014-03-11 images list README.md
2013-09-10 footer.inc index.html Makefile style.css
(新出现了index.html,可见~/sg-hackandtell-site/就是静态网站的根目录)
as3:~/sg-hackandtell-site# nohup python -m SimpleHTTPServer 45200 > /dev/null &
访问http://as3.brite.biz:45200/即可看到网站效果。
发贴方法:
as3:~/sg-hackandtell-site#
as3:~/sg-hackandtell-site# mkdir 2014-06-16
as3:~/sg-hackandtell-site# cd 2014-06-16
as3:~/sg-hackandtell-site/2014-06-16# nano index.mdwn
格式为:
测试1
===============
这是测试1.
然后,
as3:~/sg-hackandtell-site/2014-06-16# cd ..
as3:~/sg-hackandtell-site# make
2014-06-16/index.mdwn → 2014-06-16/index.html
as3:~/sg-hackandtell-site#
不过所发表的文章并不自动出现在首页,可这样做:
as3:~/sg-hackandtell-site# nano index.mdwn
在<li><a href="2014-01-28">2014-01-28</a></li>的下一行加上:
<li><a href=/2014-06-16>2014-06-16</a></li>
然后,
as3:~/sg-hackandtell-site# make
index.mdwn → index.html
as3:~/sg-hackandtell-site#
演示站点:http://as3.brite.biz:45200/,
项目地址:https://github.com/kaihendry/sg-hackandtell