Hugo+github博客第一次上传到github及提交更新
2021/7/14 6:04:57
本文主要是介绍Hugo+github博客第一次上传到github及提交更新,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
首先在 GitHub 上创建一个Repository,命名为yourname.github.io
把 config.toml 或 config.yaml 里的 basaeURL 修改为 https://yourname.github.io/
cd 你的 public 目录,按照正常 Git 命令操作即可
第一次提交
$ cd public $ git init $ git remote add origin https://github.com/yourname/yourname.github.io.git $ git add -A $ git commit -m "first commit" $ git push -u origin master
更新文章后
生成新的静态页面
hugo --theme=your-theme-name --baseUrl="https://yourname.github.io/" --buildDrafts
更新提交
$ cd public $ git add . $ git status $ git commit -m "add blog post" $ git push
这篇关于Hugo+github博客第一次上传到github及提交更新的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-26解决google chrome helper 内存占用较高!
- 2024-04-01got an unexpected keyword argument
- 2024-03-30维多利亚的秘密 golang入坑系统
- 2024-03-29mongodb sort by date
- 2024-03-29go swagger
- 2024-03-25mongodb cdc
- 2024-03-25how to use go in vscode
- 2024-03-22mongooseserverselectionerror: connect econnrefused ::1:27017
- 2024-03-21pymongo insert_many
- 2024-03-18projection mongodb