HuGo博客搭建部署到GitHub Pages

预览

在根目录执行:

hugo server --theme=fuji --buildDrafts --watch          

此时生成的是静态文件,真的很快。
只要server不关,会一直监控文件变化,自动生成静态文件。

我们可以看到命令行提示Web Server is available at …。在浏览器输入http://localhost:1313。

部署

在GitHub上创建一个仓库,名为 用户名.github.io

在根目录执行:

hugo --theme=fuji --buildDrafts --baseUrl="https://wineee.github.io"   

此时,所有的静态页面都会生成到public目录。执行以下命令:

cd public
#git init
#git remote add origin [email protected]:wineee/wineee.github.io.git
git add -A
git commit -m "first commit"
git push -u origin master

https://www.cnblogs.com/RyanXing/p/Hugo.html
https://blog.csdn.net/u013233097/article/details/79950615

猜你喜欢

转载自blog.csdn.net/qq_33831360/article/details/107484580