Skip to content

Commit

Permalink
update to local images
Browse files Browse the repository at this point in the history
  • Loading branch information
qxdo committed Mar 24, 2024
1 parent 52b673f commit 73af5eb
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 30 deletions.
40 changes: 20 additions & 20 deletions elog.cache.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{
"docs": [
{
"id": "d3c30edc-8fe7-4d59-ba0f-540e634e2853",
"doc_id": "d3c30edc-8fe7-4d59-ba0f-540e634e2853",
"updated": 1711283400000,
"id": "65df9265-9b4e-49d9-8ec0-cf55d98803cf",
"doc_id": "65df9265-9b4e-49d9-8ec0-cf55d98803cf",
"updated": 1711268400000,
"properties": {
"cover": "",
"category": "博客折腾手册",
"tags": [
"elog",
"notion",
"hexo",
"blog",
"elog"
"blog"
],
"status": "已发布",
"date": "2024-03-24 00:00:00",
"catalog": [],
"urlname": "d3c30edc-8fe7-4d59-ba0f-540e634e2853",
"title": "测试一下内容更新",
"urlname": "notion-hexo",
"title": "Notion + Hexo + GitHub Actions + Vercel 博客解决方案",
"summary": "",
"updated": "2024-03-24 20:30:00"
"updated": "2024-03-24 16:20:00"
},
"realName": "测试一下内容更新",
"relativePath": "/测试一下内容更新.md",
"realName": "Notion + Hexo + GitHub Actions + Vercel 博客解决方案",
"relativePath": "/Notion + Hexo + GitHub Actions + Vercel 博客解决方案.md",
"docPath": "./source/_posts"
},
{
"id": "65df9265-9b4e-49d9-8ec0-cf55d98803cf",
"doc_id": "65df9265-9b4e-49d9-8ec0-cf55d98803cf",
"updated": 1711268400000,
"id": "d3c30edc-8fe7-4d59-ba0f-540e634e2853",
"doc_id": "d3c30edc-8fe7-4d59-ba0f-540e634e2853",
"updated": 1711283400000,
"properties": {
"cover": "",
"category": "博客折腾手册",
"tags": [
"elog",
"notion",
"hexo",
"blog"
"blog",
"elog"
],
"status": "已发布",
"date": "2024-03-24 00:00:00",
"catalog": [],
"urlname": "notion-hexo",
"title": "Notion + Hexo + GitHub Actions + Vercel 博客解决方案",
"urlname": "d3c30edc-8fe7-4d59-ba0f-540e634e2853",
"title": "测试一下内容更新",
"summary": "",
"updated": "2024-03-24 16:20:00"
"updated": "2024-03-24 20:30:00"
},
"realName": "Notion + Hexo + GitHub Actions + Vercel 博客解决方案",
"relativePath": "/Notion + Hexo + GitHub Actions + Vercel 博客解决方案.md",
"realName": "测试一下内容更新",
"relativePath": "/测试一下内容更新.md",
"docPath": "./source/_posts"
}
],
Expand Down
12 changes: 6 additions & 6 deletions elog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ module.exports = {
},
image: {
enable: true,
platform: 'github',
platform: 'local',
local: {
outputDir: './public/images',
outputDir: './source/images',
prefixKey: '/images',
pathFollowDoc: false,
},
Expand Down Expand Up @@ -106,10 +106,10 @@ module.exports = {
},
github: {
token: process.env.ELOG_GITHUB_TOKEN,
user: 'qxdo',
repo: 'qxdo_image_bed',
branch: 'main',
host: 'cdn.jsdelivr.net',
user: process.env.ELOG_GITHUB_USER,
repo: process.env.ELOG_GITHUB_REPO,
branch: process.env.ELOG_GITHUB_BRANCH,
host: process.env.ELOG_GITHUB_HOST,
prefixKey: ''
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
abbrlink: '0'
---

# 博客工具

Expand Down Expand Up @@ -87,10 +90,10 @@ npm run server
注册 Vercel 账号并绑定 Github,在 Vercel 导入 该项目,Vercel 会自动识别出该 Hexo 项目,不需要改动,直接选择 Deploy 部署。部署完成会有一个 Vercel 临时域名,你也可以绑定自己的域名。


![Untitled.png](https://cdn.jsdelivr.net/gh/qxdo/qxdo_image_bed/a4c7d4b4b4872e6cda52442b260d5339.png)
![Untitled.png](/images/a4c7d4b4b4872e6cda52442b260d5339.png)


![Untitled.png](https://cdn.jsdelivr.net/gh/qxdo/qxdo_image_bed/317468d0f2533d8008cd0e0798501cce.png)
![Untitled.png](/images/317468d0f2533d8008cd0e0798501cce.png)


## 10. 配置 Github Actions 权限
Expand All @@ -99,7 +102,7 @@ npm run server
在 Github 仓库的设置中找到 `Actions-General`,打开流水线写入权限`Workflow permissions`


![Untitled.png](https://cdn.jsdelivr.net/gh/qxdo/qxdo_image_bed/385c2589f0d9d1976eea3b6f14a44bfd.png)
![Untitled.png](/images/385c2589f0d9d1976eea3b6f14a44bfd.png)


## 11. 配置环境变量
Expand All @@ -111,7 +114,7 @@ npm run server
在 Github 仓库的设置中找到 `Secrets and variables`,新增仓库的环境变量`NOTION_DATABASE_ID``NOTION_TOKEN``.elog.env`保持一致即可


![Untitled.png](https://cdn.jsdelivr.net/gh/qxdo/qxdo_image_bed/578ab28ece17d39591a969eb3897df0a.png)
![Untitled.png](/images/578ab28ece17d39591a969eb3897df0a.png)


## 12. 自动化部署
Expand Down
3 changes: 3 additions & 0 deletions source/_posts/测试一下内容更新.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
abbrlink: '0'
---

### 测试一下

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 73af5eb

Please sign in to comment.