Skip to content
Tao edited this page Oct 26, 2019 · 3 revisions

1025

1023

1022

Hugo 部署

如果以前没有创建过类似 coderzh.github.io 仓库,可参考:Hugo中文文档

如果像我一样,以前使用过 Hexo,那指定是被占用了,咋办?

第一步:在站点根目录执行 Hugo 命令生成最终页面

# 无域名,doc你可以换成你项目的名称
hugo --theme=bilberry-hugo-theme --baseUrl="https://yangtao2o.github.io/doc/"
# 拥有自已的域名,最好用域名,如果使用类似yangtao2o.github.io,会导致资源跨域等问题
hugo --theme=bilberry-hugo-theme --baseUrl="https://istaotao.com/doc/"

第二步:如同文档一样,推送资源到仓库,只不过不是yangtao2o.github.io而已

cd public
git init
git remote add origin https://github.com/yangtao2o/doc.git
git add .
git commit -m "docs: init"
git push -u origin master

第三步:访问:https://istaotao.com/doc/ 或者:https://yangtao2o.github.io/doc

1013


0918

狼叔说:少抱怨,多思考,未来更美好

0910

0909

Clone this wiki locally