fix: 维护一下远古文章们
This commit is contained in:
@@ -14,21 +14,26 @@ date: 2024-06-21 16:04:22
|
||||
## Gitea 配置
|
||||
|
||||
### 创建仓库
|
||||
首先创建一个仓库,例如`blog-web`
|
||||
|
||||
首先创建一个仓库,例如`blog-web`
|
||||
|
||||
### 配置SSH
|
||||
进入命令行,执行`ssh-keygen -t ed25519 -C "你的 Gitea 邮箱"`
|
||||
然后一路按 Enter ,完成后进入`C:\Users\ 用户名 \.ssh`目录
|
||||
|
||||
进入命令行,执行`ssh-keygen -t ed25519 -C "你的 Gitea 邮箱"`
|
||||
然后一路按 Enter ,完成后进入`C:\Users\ 用户名 \.ssh`目录
|
||||
打开`ed25519.pub`并复制内容
|
||||
点击Gitea界面的`设置`
|
||||
点击Gitea界面的`设置`
|
||||

|
||||
添加一个SSH密钥
|
||||
添加一个SSH密钥
|
||||

|
||||
将先前获得的`ed25519.pub`中的内容填入`密钥内容`中,点击`增加密钥`
|
||||
将先前获得的`ed25519.pub`中的内容填入`密钥内容`中,点击`增加密钥`
|
||||
|
||||
## Hexo配置
|
||||
|
||||
先cd到Hexo的目录,然后`npm install hexo-deployer-git --save`
|
||||
|
||||
然后修改`_config.yml`,移动到最下方,添加
|
||||
|
||||
```yaml
|
||||
# Deployment
|
||||
## Docs: https://hexo.io/docs/one-command-deployment
|
||||
@@ -37,11 +42,10 @@ deploy:
|
||||
repository: <你的仓库地址> # example: https://example.net/user/repo.git
|
||||
branch: main
|
||||
```
|
||||
|
||||
保存后`hexo d`测试一下
|
||||
|
||||
|
||||
|
||||
## 参考资料
|
||||
|
||||
[One-Command Deployment](https://hexo.io/docs/one-command-deployment)
|
||||
[Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user