Skip to content

Commit

Permalink
docs: change repo path
Browse files Browse the repository at this point in the history
  • Loading branch information
OXeu committed Jul 10, 2024
1 parent d05a21a commit f64d86a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 54 deletions.
28 changes: 10 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ English | [简体中文](./README_zh_CN.md)

![Cover](https://repository-images.githubusercontent.com/803866357/958bc2c1-1703-4127-920c-853291495bdc)

![GitHub commit activity](https://img.shields.io/github/commit-activity/w/OXeu/Rin?style=for-the-badge)
![GitHub branch check runs](https://img.shields.io/github/check-runs/OXeu/Rin/main?style=for-the-badge)
![GitHub top language](https://img.shields.io/github/languages/top/OXeu/Rin?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/OXeu/Rin?style=for-the-badge)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/OXeu/Rin/deploy.yaml?style=for-the-badge)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/openRin/Rin?style=for-the-badge)
![GitHub branch check runs](https://img.shields.io/github/check-runs/openRin/Rin/main?style=for-the-badge)
![GitHub top language](https://img.shields.io/github/languages/top/openRin/Rin?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/openRin/Rin?style=for-the-badge)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/openRin/Rin/deploy.yaml?style=for-the-badge)

# Introduction

Expand All @@ -34,23 +34,15 @@ Rin is a blog based on Cloudflare Pages + Workers + D1 + R2. It does not require
13. For more features, please refer to https://xeu.life

# Documentation
1. [Deployment Documentation](./docs/DEPLOY.md)

2. [Environment Variables List](./docs/ENV.md)

3. [SEO Optimization Configuration](./docs/SEO.md)

4. [Contribution Guide](./CONTRIBUTING.md)

5. [Code of Conduct](./CODE_OF_CONDUCT.md)
[rin-docs.xeu.life](https://rin-docs.xeu.life)

## Star History

<a href="https://star-history.com/#OXeu/Rin&Date">
<a href="https://star-history.com/#openRin/Rin&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=OXeu/Rin&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=OXeu/Rin&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=OXeu/Rin&type=Date" />
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=openRin/Rin&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=openRin/Rin&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=openRin/Rin&type=Date" />
</picture>
</a>

Expand Down
27 changes: 10 additions & 17 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

![封面](https://repository-images.githubusercontent.com/803866357/958bc2c1-1703-4127-920c-853291495bdc)

![GitHub commit activity](https://img.shields.io/github/commit-activity/w/OXeu/Rin?style=for-the-badge)
![GitHub branch check runs](https://img.shields.io/github/check-runs/OXeu/Rin/main?style=for-the-badge)
![GitHub top language](https://img.shields.io/github/languages/top/OXeu/Rin?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/OXeu/Rin?style=for-the-badge)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/OXeu/Rin/deploy.yaml?style=for-the-badge)
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/openRin/Rin?style=for-the-badge)
![GitHub branch check runs](https://img.shields.io/github/check-runs/openRin/Rin/main?style=for-the-badge)
![GitHub top language](https://img.shields.io/github/languages/top/openRin/Rin?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/openRin/Rin?style=for-the-badge)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/openRin/Rin/deploy.yaml?style=for-the-badge)

# 介绍

Expand All @@ -36,23 +36,16 @@ Rin 是一个基于 Cloudflare Pages + Workers + D1 + R2 全家桶的博客,
13. 更多特性请参考 https://xeu.life

# 文档
1. [部署文档(Github)](./docs/DEPLOY.md)

2. [环境变量列表](./docs/ENV.md)

3. [SEO 优化配置](./docs/SEO.md)

4. [贡献指南](./CONTRIBUTING.md)

5. [行为准则](./CODE_OF_CONDUCT.md)
[rin-docs.xeu.life](https://rin-docs.xeu.life)

## Star History

<a href="https://star-history.com/#OXeu/Rin&Date">
<a href="https://star-history.com/#openRin/Rin&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=OXeu/Rin&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=OXeu/Rin&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=OXeu/Rin&type=Date" />
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=openRin/Rin&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=openRin/Rin&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=openRin/Rin&type=Date" />
</picture>
</a>

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function Footer() {
<div className="flex flex-col mb-8 space-y-2 justify-center items-center t-primary ani-show">
<p className='text-sm text-neutral-500 font-normal link-line'>
<span>
© 2024 Powered by <a className='hover:underline' href="https://github.com/OXeu/Rin" target="_blank">Rin</a>
© 2024 Powered by <a className='hover:underline' href="https://github.com/openRin/Rin" target="_blank">Rin</a>
</span>
{config.get<boolean>('rss') && <>
<Spliter />
Expand Down
30 changes: 15 additions & 15 deletions docs/DEPLOY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 部署

项目目前处于开发阶段,文档可能未及时更新或存在描述不清,如遇部署失败请提 [Issue](https://github.com/OXeu/Rin/issues/new?assignees=&labels=help+wanted&projects=&template=need-help.md&title=%5BHelp%5D+%E9%97%AE%E9%A2%98%E6%8F%8F%E8%BF%B0)
项目目前处于开发阶段,文档可能未及时更新或存在描述不清,如遇部署失败请提 [Issue](https://github.com/openRin/Rin/issues/new?assignees=&labels=help+wanted&projects=&template=need-help.md&title=%5BHelp%5D+%E9%97%AE%E9%A2%98%E6%8F%8F%E8%BF%B0)

> [!TIP]
> 我们在文档末尾追加了完整的部署流程演示视频,以便解决您在部署期间遇到的部分困难
Expand Down Expand Up @@ -63,12 +63,12 @@ S3_SECRET_ACCESS_KEY=<你的S3SecretAccessKey>
>
> 这就是最终的命令
打开仓库页面:https://github.com/OXeu/Rin
打开仓库页面:https://github.com/openRin/Rin
## Fork
点击 Fork 按钮 fork 出一个新仓库
![1000000657](https://github.com/OXeu/Rin/assets/36541432/df3607ca-a8a9-49b8-92ce-6b348afeb13f)
![1000000657](https://github.com/openRin/Rin/assets/36541432/df3607ca-a8a9-49b8-92ce-6b348afeb13f)
## 前端
Expand All @@ -79,20 +79,20 @@ S3_SECRET_ACCESS_KEY=<你的S3SecretAccessKey>
>
> 下文提到的前端与后端你可以分别等价代换为 Cloudflare Pages 与 Cloudflare Workers,当提到说需要前端地址或者后端地址时,即为 Cloudflare Pages 地址或 Cloudflare Workers 地址,你可以在 Cloudflare 控制面板中通过少量的操作找到这两个地址,如下面的截图所示:
> 前端(Pages)的地址在 `Workers 和 Pages` > 你的 Pages 项目 > `部署` 中可以找到:
> ![图片](https://github.com/OXeu/Rin/assets/36541432/d9dcc5f2-6930-4487-af4b-0ab52e948114)
> ![图片](https://github.com/openRin/Rin/assets/36541432/d9dcc5f2-6930-4487-af4b-0ab52e948114)
> 图中的`rin-6qe.pages.dev`,`direct.xeu.life` 都是前端地址,如果有更多的地址,你还可以点击形如 `+2 个域` 的链接查看更多的地址,这些地址都是可以访问的,你可以使用其中任意一个地址,但是需要保持不同地方都填写的是同一个前端地址(如果有多个环境变量要求填写前端地址的话),通常来说前端地址是 `https://rin-6qe.pages.dev` 或 `https://direct.xeu.life` 这样的形式
>
> 后端(Workers)的地址在 `Workers 和 Pages` > 你的 Workers 项目 > `设置` > `触发器` 中可以找到:
> ![图片](https://github.com/OXeu/Rin/assets/36541432/0a2385b7-94db-4469-bef9-399cc334f1b6)
> ![图片](https://github.com/openRin/Rin/assets/36541432/0a2385b7-94db-4469-bef9-399cc334f1b6)
> 图中的 `rin.xeu.life` 和 `rin-server.xeu.workers.dev` 都是后端地址,前者是自定义域名,后者是默认分配的域名,你可以使用默认分配的域名,也可以自定义域名,自定义域名需要在 Cloudflare 控制面板中进行配置,在本文档中当要求填写后端地址时,你可以填写形如 `https://rin.xeu.life` 或 `https://rin-server.xeu.workers.dev`的地址,但需保持不同地方都填写的是同一个后端地址(如果有多个环境变量要求填写后端地址的话)
登录 [Cloudflare](https://dash.cloudflare.com) 控制台,进入 `Workers 和 Pages` 页面,点击`创建应用程序`,选择 Pages
![1000000658](https://github.com/OXeu/Rin/assets/36541432/35d4f9e3-3af3-4ec8-8060-2a352f4d51ae)
![1000000658](https://github.com/openRin/Rin/assets/36541432/35d4f9e3-3af3-4ec8-8060-2a352f4d51ae)
点击连接到 Git 连接自己的 GitHub 账号并选择 Fork 的存储库
![1000000666](https://github.com/OXeu/Rin/assets/36541432/e3b6da75-1a5f-46ec-9820-636cc5238023)
![1000000666](https://github.com/openRin/Rin/assets/36541432/e3b6da75-1a5f-46ec-9820-636cc5238023)
点击 `开始设置` 进入配置页面:
Expand All @@ -105,7 +105,7 @@ S3_SECRET_ACCESS_KEY=<你的S3SecretAccessKey>
路径:<留空>
```
![1000000659](https://github.com/OXeu/Rin/assets/36541432/98fb3021-932b-4bfa-8118-3378f98ff628)
![1000000659](https://github.com/openRin/Rin/assets/36541432/98fb3021-932b-4bfa-8118-3378f98ff628)
环境变量复制以下内容,根据自身情况修改变量值:
Expand All @@ -122,15 +122,15 @@ SKIP_DEPENDENCY_INSTALL=true
UNSTABLE_PRE_BUILD=asdf install bun latest && asdf global bun latest && bun i
```

![1000000660](https://github.com/OXeu/Rin/assets/36541432/0fe9276f-e16f-4b8a-87c5-14de582c9a3a)
![1000000660](https://github.com/openRin/Rin/assets/36541432/0fe9276f-e16f-4b8a-87c5-14de582c9a3a)

点击`保存并部署`,等待构建部署,不出意外的话约 30s 后即可部署完成:

![1000000661](https://github.com/OXeu/Rin/assets/36541432/979810b7-3f6f-415b-a8e8-5b08b0da905d)
![1000000661](https://github.com/openRin/Rin/assets/36541432/979810b7-3f6f-415b-a8e8-5b08b0da905d)

点击打开即可看见前端页面

![1000000662](https://github.com/OXeu/Rin/assets/36541432/57c61ad6-c324-48e4-a28f-a1708fd7d41a)
![1000000662](https://github.com/openRin/Rin/assets/36541432/57c61ad6-c324-48e4-a28f-a1708fd7d41a)

前端就全部部署完成啦 🎉

Expand Down Expand Up @@ -169,7 +169,7 @@ UNSTABLE_PRE_BUILD=asdf install bun latest && asdf global bun latest && bun i
ID 随意点击一个自己绑定的域名,进入后在右侧(需要向下滑动一段距离)可以找到`账户ID`

创建 API 令牌:点击右上角`头像` > `我的个人资料` > `API 令牌` > `创建令牌`,模板选择`编辑 Cloudflare Workers`
![1000000663](https://github.com/OXeu/Rin/assets/36541432/3a34a2ad-b993-47fe-965d-31cca4a8e92a)
![1000000663](https://github.com/openRin/Rin/assets/36541432/3a34a2ad-b993-47fe-965d-31cca4a8e92a)

创建完成后保存令牌

Expand Down Expand Up @@ -232,7 +232,7 @@ https://<你的后端地址>/user/github/callback
```

这里附上我的参数
![GitHub OAuth 配置](https://github.com/OXeu/Rin/assets/36541432/74ab8d16-93ca-4919-beec-4beb7a2003a6)
![GitHub OAuth 配置](https://github.com/openRin/Rin/assets/36541432/74ab8d16-93ca-4919-beec-4beb7a2003a6)

随后配置环境变量中 OAuth 部分

Expand All @@ -243,7 +243,7 @@ https://<你的后端地址>/user/github/callback
理论上支持任意遵循 S3 协议的对象存储服务,这里只介绍接入 Cloudflare R2 的操作

Cloudflare 面板中点击 `R2` > `创建存储桶`,填写名称,选择距离自己近的位置:
![1000000665](https://github.com/OXeu/Rin/assets/36541432/17c5ad7b-8a3a-49b2-845a-8d043484aa63)
![1000000665](https://github.com/openRin/Rin/assets/36541432/17c5ad7b-8a3a-49b2-845a-8d043484aa63)

创建存储桶之后进入存储桶详情页 > `设置`,复制 S3 API 地址,去除末尾的存储桶名称后填入 `S3_ENDPOINT`,如:

Expand Down Expand Up @@ -276,6 +276,6 @@ S3_ACCESS_HOST=https://image.xeu.life
由于时间原因未对以下视频做剪辑与后期说明处理,如果对于部署流程不了解或疑惑可参考视频步骤


https://github.com/OXeu/Rin/assets/36541432/3ed98e93-2cc3-4e5f-a885-4d16a48500c3
https://github.com/openRin/Rin/assets/36541432/3ed98e93-2cc3-4e5f-a885-4d16a48500c3


4 changes: 2 additions & 2 deletions docs/SEO.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ S3_SECRET_ACCESS_KEY=<你的S3SecretAccessKey>
```
xeu.life/seo/*
```
![图片](https://github.com/OXeu/Rin/assets/36541432/ed0ecc72-f61f-4460-8ede-4475ca54ffcb)
![图片](https://github.com/openRin/Rin/assets/36541432/ed0ecc72-f61f-4460-8ede-4475ca54ffcb)

Worker 选择为部署的 Worker,点击保存。

Expand All @@ -58,6 +58,6 @@ concat("/seo",http.request.uri.path)
选择`保留查询`

参考配置截图:
![转换规则](https://github.com/OXeu/Rin/assets/36541432/657e9546-1dc0-4390-9bfc-5d3eb725e792)
![转换规则](https://github.com/openRin/Rin/assets/36541432/657e9546-1dc0-4390-9bfc-5d3eb725e792)

点击部署,即可完成 SEO 配置。
2 changes: 1 addition & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const app = () => new Elysia({ aot: false })
origin: '*',
methods: '*',
allowedHeaders: [
'Authorization',
'authorization',
'content-type'
],
maxAge: 600,
Expand Down

0 comments on commit f64d86a

Please sign in to comment.