一、安装初始化hugo
注意安装的版本和文件位置
echo blog/xxxx.github.io-creatorhugo new site /xxxx.github.io-creatorcd /xxxx.github.io-creator
git init
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
echo 'theme = "ananke"' >> config.toml
hugo new posts/xxxx.md
hugo
二、创建仓库和连接仓库
创建:用户名.github.io的仓库
在xxxx.github.io-creator目录下,新建.gitignore文件,写入/public(将public加入忽略名单)。
关联仓库并上传文件:git remote add origin <仓库地址> 、 git push -u origin master
打开:用户名.github.io 即可看到效果