hexo搭建部署到gitee教程

hexo部署到github和部署到gitee都差不多,这里选择gitee

准备工作:
  • 安装软件:node.js 和 git
  • 注册 gitee /github
配置:

git Bash Here中输入下面的两个命令进行配置

$ git config --globale user.name "gitee空间地址"
$ git config --globale user.email "你的邮箱"
生成 SSH:

打开git Bash Here输入以下命令:

$ ssh-keygen -t rsa -C "你的邮箱"

然后一直回车,若出现 Overwrite (y/n)?,则输入y,若没有,则一直回车。结束后你的ssh就生成了,我的自动生成路径是:C:\Users\dell\.ssh,在.ssh中有两个文件id_rsa(私人密钥)和id_rsa.pub(公共密钥),这里我们选择id_rsa.pub公共密钥。id_rsa.pub用记事本打开,然后复制。

到gitee新建仓库:

打开gitee:新建建仓库->设置-&

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
在使用Hexo搭建博客并将其部署Gitee的过程中,你需要进行一些修改以确保正确的部署。 首先,你需要在_config.yml文件中找到deploy配置部分。在这里,你需要对deploy进行如下修改: ``` deploy: - type: git repo: https://gitee.com/你的用户名/你的仓库名.git branch: master ``` 将上述代码中的"你的用户名"替换为你在Gitee上的用户名,并将"你的仓库名"替换为你的博客仓库在Gitee上的名称。 接下来,你需要将你的博客同时部署GitHub,以便在无法访问Gitee时,仍可通过GitHub访问你的博客。在_config.yml文件的deploy配置中,添加以下代码: ``` - type: git repo: https://github.com/你的用户名/你的仓库名.git branch: master ``` 同样,将上述代码中的"你的用户名"替换为你在GitHub上的用户名,并将"你的仓库名"替换为你的博客仓库在GitHub上的名称。 完成以上修改后,保存并关闭_config.yml文件。接下来,你可以通过运行命令`hexo deploy`将你的博客部署GiteeGitHub。 请注意,部署Gitee相对于GitHub可能会稍微麻烦一些,因为你需要手动去Gitee的网站上更新一次才能看到更新效果。这是因为Gitee是国内版的GitHub,速度相对较快,但在部署时需要手动同步。<span class="em">1</span><span class="em">2</span> #### 引用[.reference_title] - *1* [搭建hexo博客——Gitee篇](https://blog.csdn.net/qq_939317133/article/details/124046319)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [hexo博客同时部署giteegithub,搭建镜像站](https://blog.csdn.net/liegu0317/article/details/123058346)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

「已注销」

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值