title: 备份hexo博客
author: HaoQi
top: false
cover: false
toc: true
summary: 更换电脑设备,备份hexo博客文件
reprintPolicy: cc_by
coverlmg:
img: https://cdn.jsdelivr.net/gh/haoqiyung/image/lmages/5.jpg
date: 2022-03-27 10:14:46
categories: 博客篇
tags:
- hexo
备份
scaffolds | 文章模版 | 必须备份 |
---|---|---|
source | 博客文章 | 必须备份 |
themes | 主题文件 | 必须备份 |
.gitignore | 限定在push时那些文件可以忽略 | 必须备份 |
_config.yml | 站点配置文件 | 必须备份 |
package.json | 安装包的名称 | 必须备份 |
.ssh | 密钥文件 | 必须备份 |
安装配置 Hexo
1.用之前的套路安装 Node.js 环境 Git 环境安装hexo
npm install -g hexo
2.新建 hexo 文件夹,放入备份的hexo博客文件
3.安装依赖包
npm install
4.安装上传插件
npm install hexo-deployer-git --save
5.如果你使用了更多的插件,在这里安装就可以了。
配置Git 输入你自己的邮箱地址
git config --global user.name "qq88561280"
git config --global user.email "8353651280@qq.com"
6.生成新的 public 文件夹,开始上传 hexo博客
hexo g
hexo d