hexo博客迁移步骤

title: hexo博客迁移步骤
date: 2023-07-19 16:54:00
tags: 博客搭建
categories: 生活
cover: https://gulimall-ayu.oss-cn-chengdu.aliyuncs.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20230719171404.png

hexo博客迁移步骤:

  • 旧平台安装git,添加.gitignore文件:
.DS_Store
Thumbs.db
db.json
.log
node_modules/
public/
.deploy/
  • 使用git命令初始化仓库,上传源文件
#初始化仓库
git init

#添加当前位置所有文件
git add -A .

#然后提交文件推送
git commit -m "first commit"
git remote add origin https://gitee.com/ayu-elephant/myblog_origin.git
git push -u origin "master"
  • 在新主机拉下代码,然后拉取theme主题代码
#新主机安装好hexo
npm install -g hexo-cli

#安装推送到github pages 的插件
npm install hexo-deployer-git --save


git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
  • 安装theme主题所需要的依赖

  • 使用hexo命令部署博客

hexo clean
hexo generate
hexo server
hexo deploy


#写博客
hexo new xxx
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值