hexo的备份与迁移

hexo的备份与迁移
chenlei【备份和迁移hexo博客-哔哩哔哩】 https://b23.tv/8EKZnGL
上传脚本
push.shscript
1 | ##!/bin/sh |
迁移
在新设备安装环境
- 安装 node.js 和 npm
1 | 下载并解压 Node.js 包(示例版本) |
Node.js是一个跨平台、开源的 JavaScript 运行时环境,基于 Google Chrome 的 V8 JavaScript 引擎构建。它由 Ryan Dahl 于 2009 年发布,核心目标是将 JavaScript 从浏览器扩展到服务器端,实现全栈开发能力。npm是 Node.js 官方管理器,提供完整的 Javascript 包生态和工具链。
- 安装啊 git
1 | sudo apt-get install git -y |
- 装好 hexo 环境
1 | npm config set registry https://registry.npm.taobao.org |
配置 ssh 密钥
1 | ssh-keygen -t rsa -C "[email protected]" # -t指定算法,-C添加注释[1,2,3](@ref) |
之后将id_rsa.pub文件内容添加到github : settings->SSH and GPG keys-> New SSH Key粘贴并保存
之后使用ssh -T [email protected]测试密钥是否生效
git clone 仓库地址shh,下载远程仓库到本地
1 | git clone [email protected]:username/repository.git |
生成模块目录node_momdlues(实现功能)
1 | cd my-blog |
package.json是用来描述目录,从而生成模块目录。
评论
匿名评论隐私政策
✅ 你无需删除空行,直接评论以获取最佳展示效果







