目录

install hugo

按照官方文档操作即可,不再赘述。 https://gohugo.io/getting-started/quick-start/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
brew install hugo
hugo version
hugo new site blog
cd blog
git init

git submodule add https://github.com/panr/hugo-theme-terminal.git themes/terminal
echo 'theme = "terminal"' >> config.toml

hugo new posts/install_hugo.md

hugo server -D

Deploy to GitHub Page

参考 https://segmentfault.com/a/1190000012975914

需注意,配置项中有一处错误,正确的如下

1
2
script:
    hugo

备用参考: https://axdlog.com/zh/2018/using-hugo-and-travis-ci-to-deploy-blog-to-github-pages-automatically/

Add travis-ci badge

获取链接,将其写入 readme 即可。获取方法如下:

Use private repository of github

travis-ci

需要在网站 https://travis-ci.com 进行,操作同 https://travis-ci.org #### wercker > https://axionl.me/2017/12/25/wercker-%E8%A9%A6%E6%B0%B4/ 我的 wercker.yml 内容为:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
box: debian
build:
  steps:
    - install-packages:
        packages: git ssh-client
    - pahnev/gh-pages@0.3.1:
        token: $GIT_TOKEN
        branch: master
        repo: liutao-me/liutao-me.github.io
        domain: liutao-me.github.io
        basedir: public

netlify

暂未尝试,下次可以试一下 > Hexo+Netlify快速搭建个人博客 - 个人文章 - SegmentFault 思否 > https://blog.einverne.info/post/2018/10/use-hub-command-to-interact-with-github.html

add comments

新建文件 layouts/partials/comments.html ,内容为: {{ template "_internal/disqus.html" . }}

自定义域名

https://edward852.github.io/post/hugo%E6%B7%BB%E5%8A%A0algolia%E6%90%9C%E7%B4%A2%E6%94%AF%E6%8C%81/