代码拉取完成,页面将自动刷新
A super concise theme for Hugo
brew install hugo
export GOPATH=$HOME/go
go get -u -v github.com/spf13/hugo
hugo new site /path/to/site
cd /path/to/site
hugo new about.md
about.md 自动生成到了 content/about.md
hugo new post/first.md
到 皮肤列表 挑选一个心仪的皮肤, 比如 Hugo Hyde themes/blog
$ git clone https://github.com/olOwOlo/hugo-theme-even themes/even
cd ./themes/even/
git pull
var gitalk = new Gitalk({
id: '{{ .Date }}',
title: '{{ .Title }}',
clientID: '{{ .Site.Params.gitalk.clientId }}',
clientSecret: '{{ .Site.Params.gitalk.clientSecret }}',
repo: '{{ .Site.Params.gitalk.repo }}',
owner: '{{ .Site.Params.gitalk.owner }}',
admin: ['{{ .Site.Params.gitalk.owner }}'],
body: decodeURI(location.href)
});
将Gitalk中的id,由'{{ .Date }}'
修改为路径location.pathname
id用在github中创建issues lables,在github中为单个页面创建一个issues, 并为issues创建2个lables,一个为Gitalk,一个和页面id相同(即当前页面路径), 则当前页面可以进行评论。
var gitalk = new Gitalk({
id: location.pathname,
title: '{{ .Title }}',
clientID: '{{ .Site.Params.gitalk.clientId }}',
clientSecret: '{{ .Site.Params.gitalk.clientSecret }}',
repo: '{{ .Site.Params.gitalk.repo }}',
owner: '{{ .Site.Params.gitalk.owner }}',
admin: ['{{ .Site.Params.gitalk.owner }}'],
body: decodeURI(location.href)
});
hugo server --theme=even --buildDrafts
浏览器里打开: http://localhost:1313/
hugo --theme=even --baseUrl="https://piao.gitee.io/"
cd public
git init
git remote add origin https://gitee.com/piao/piao.git
git add -A
git commit -m "first commit"
git push -u origin master
浏览器里访问:https://piao.gitee.io/
cd public
git init
git remote add origin https://github.com/piaohua/piaohua.github.io.git
git add -A
git commit -m "first commit"
git push -u origin master
浏览器里访问:https://piaohua.github.io/
hugo new deploy.sh
Released under the MIT License.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。