先按照此文http://briteming.blogspot.com/2017/03/gosimple-website.html的红色文字部分,搭建go环境。
cd /usr/local/go/gopath
cd /usr/local/go/gopath
go get github.com/zserge/zs
所生成的可执行文件zs将出现在/usr/local/go/bin/里面.
cd
/usr/local/
git clone https://github.com/zserge/zserge.github.io
cd
zserge.github.io
root@localhost:/usr/local/zserge.github.io# ls
404.html blog.html images projects.html six.html
about.html CNAME index.html robots.txt src
blog favicon.ico jsmn.html rss.xml styles.css
root@localhost:/usr/local/zserge.github.io# cd src
root@localhost:/usr/local/zserge.github.io/src# zs build
(此即生成/更新静态网站的根目录的命令)
root@localhost:/usr/local/zserge.github.io/src# ls -la
total 72
drwxr-xr-x 7 root root 4096 Apr 11 15:04 .
drwxr-xr-x 7 root root 4096 Mar 27 11:49 ..
-rw-r--r-- 1 root root 728 Mar 27 11:44 404.amber
-rw-r--r-- 1 root root 860 Mar 27 11:44 about.md
drwxr-xr-x 2 root root 4096 Apr 14 07:12 blog
-rw-r--r-- 1 root root 207 Apr 14 10:19 blog.md
-rw-r--r-- 1 root root 12 Mar 27 11:44 CNAME
-rw-r--r-- 1 root root 1150 Mar 27 11:44 favicon.ico
drwxr-xr-x 2 root root 4096 Mar 27 11:44 images
-rw-r--r-- 1 root root 194 Apr 14 10:19 index.md
-rw-r--r-- 1 root root 7451 Mar 27 11:44 jsmn.md
-rw-r--r-- 1 root root 241 Mar 27 11:44 projects.amber
drwxr-xr-x 4 root root 4096 Apr 11 15:04 .pub
-rw-r--r-- 1 root root 372 Apr 14 10:19 rss.xml
-rw-r--r-- 1 root root 1993 Mar 27 11:44 styles.gcss
drwxr-xr-x 2 root root 4096 Mar 27 11:44 .zs
(生成了.pub目录)
root@localhost:/usr/local/zserge.github.io/src#
root@localhost:/usr/local/zserge.github.io/src# cd .pub
root@localhost:/usr/local/zserge.github.io/src/.pub# ls
404.html blog CNAME images jsmn.html rss.xml
about.html blog.html favicon.ico index.html projects.html styles.css
root@localhost:/usr/local/zserge.github.io/src/.pub#
(可见
/usr/local/zserge.github.io/src/.pub目录就是所生成的静态网站的根目录)
新建源帖:
root@localhost:/usr/local/zserge.github.io/src/.pub# cd ../blog
root@localhost:/usr/local/zserge.github.io/src/blog# nano test-1.md
root@localhost:/usr/local/zserge.github.io/src/blog# cat test-1.md
title: 测试1
description: 点击标题,看全文
date: 2017-03-27T14:20:00
---
# {{ title }}
这是测试1.
看看如何?
root@localhost:/usr/local/zserge.github.io/src/blog#
root@localhost:/usr/local/zserge.github.io/src/blog# cd ..
root@localhost:/usr/local/zserge.github.io/src# zs build
演示网站:http://zs.bright.biz.st/
项目地址:https://github.com/zserge/zs
https://github.com/zserge/zserge.github.io/
https://github.com/zserge/zserge.github.io/issues/4
No comments:
Post a Comment