新建一篇博文
hugo new post/newblog.md
用Typora打开编辑
修改一篇博文
直接Typora修改 会自动刷新
本地启动项目
hugo server -t meme --buildDrafts
- meme是主题名
没修改配置文件默认到 http://localhost:1313/访问
更新到github
cd到根目录下
-
把更新的博文更新到public目录
hugo --theme=meme --baseUrl="https://jiong952.github.io" --buildDrafts
cd到public目录下
-
更新到github
-
将public的所有更新内容添加到git暂存区
git add -A
-
将暂存区文件提交到当前分支
git commit -m "提交信息"
-
将本地版本库推到github的版本库
git push -u origin master
-
如果修改了主题则使用
git pull origin master --allow-unrelated-histories
-