如何搭建hugo博客
- 安装git
- 安装brew
安装Hugo,建立博客
1
hugo new site myblog
下载主题
1 2
cd myblog git clone https://github.com/olOwOlo/hugo-theme-even themes/even
本地启动
1
hugo server -t even --buildDrafts
创建一个文章
1
hugo new post/new.md
部署到github
1 2 3 4 5 6 7
hugo --theme=even --baseUrl=“https://minghaochen.github.io/“ --buildDrafts cd public/ git init git add . git commit -m “first commit” git remote add origin https://github.com/minghaochen/minghaochen.github.io.git git push -u origin master
本地写完新博客后更新到github上
1 2 3 4
cd public/ git add -A git commit -m "update" git push origin master