clone 主题仓库

1
$ git clone [repo URL] themes/[theme name]

将仓库 clone 到本地后,打开 themes/[theme name] 文件夹,将.git 隐藏文件夹删除才能正常 push

更改根目录下_config.yml 文件夹主题名称

1
theme: [theme name]

注意冒号前有空格

生产的应用程序构建到构建文件夹

1
$ npm run build

本地运行测试

1
hexo s

博客默认运行在 localhost:4000,访问以检查主题是否正常,按 CTRL+C 结束运行

将更改 push 到远程

1
2
3
4
$ git status
$ git add .
$ git commit -m""
$ git push

等待 GitHub 完成部署
访问你的博客,至此,你的博客已经成功的更改了主题!