博客迁移

步骤

  1. 创建 Hexo 文件夹

  2. 克隆博客仓库

  3. 替换配置文件

由于 hexo init 必须执行于 空文件夹,因此无法在博客仓库中初始化 Hexo 。

创建 Hexo 文件夹

hexo init [destination]

创建hexo文件夹

删除配置文件

删除 Hexo 文件夹下的 source 文件夹和 .gitignore_config.landscape.yml_config.yml 三个文件。

删除配置文件

设置仓库

cd blog

git remote add origin 仓库地址

git pull origin master:master

安装主题

https://github.com/fluid-dev/hexo-theme-fluid/releases
将主题文件拷贝至 themes 文件夹中并改名为 fluid

或使用命令

npm install --save hexo-theme-fluid

导入静态资源

  1. woshixiaoguo.github.io\img 中的图片拷贝至 博客路径/source/img

  2. 修改 博客路径/themes/fluid/languages 目录下的 zh-CN.yml 文件

安装部署插件

npm install hexo-deployer-git --save

博客迁移
http://example.com/2021/05/25/hexo-05-migrate/
作者
Guoguo
发布于
2021年5月25日
许可协议