Move to Hugo
I have moved my homepage to Hugo which I think is the fastest static website generator.
Intro
I have moved my homepage to Hugo which I think is the fastest static website generator. On the other hand, I like the theme - Acadmic which is best for the persons who like me is in academia.
However, there is one problem that Hugo can not be automatically generated as Jekyll in Github Page. I referred to the solution which is provided by the author of Acadmic 1 to use Wercker to automatically generate the pages from source files to HTML. The processes are as below.
Setup Website
You need to firstly setup a hugo website, test it locally and upload to one of your github repositories.
I assume the repository is homepage
.
Create Personal Website Repository
I use xujinlai.github.io
as the personal website repository.
Setup Wercker
You can treat Wercker as an automatically builder which can build your website imediatly after you push your update with git.
It is also very easy to use, which you just need to setup an application on Wercker with logining wity your Github account. You just need to follow the instruction below to setup the automatically builder for your website:
- Login to Wercker with your github account such as Jinlai Xu.
- Add an application and setup the repository of the application to
homepage
. - Add an
wercker.yml
file in your repository for example Wercker.yml example - You need to modify the above
wercker.yml
with your ownrepo
name and your owndomain
name. - Add a
$GIT_TOKEN
parameter in your wercker application to make it possible to access your github repositories. You can refer to 2 to get the details. - Add a
deploy
step afterbuild
step in your wercker application’sWorkflows
page. - Upload you website to
homepage
to test if your wercker application is automatically run.
Wercker.yml example
box: golang
build:
steps:
- add-to-known_hosts:
hostname: github.com
fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
type: rsa
- script:
name: initialize and update git submodules
code: |
git submodule init
git submodule update --remote --recursive
- arjen/hugo-build:
version: "0.20.7"
deploy:
steps:
- lukevivier/gh-pages:
token: $GIT_TOKEN
basedir: public
repo: xujinlai/xujinlai.github.io
domain: jinlaixu.net