Skip to content

fix: typo #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions docs/en/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

## Frontend Environment Variables List

| Name | Required | Description | Default Value | Example Value |
|--------------|----------|-----------------------------------------|---------------|----------------------------------------------------|
| API_URL | Yes | Backend URL | None | http://localhost:3001 |
| AVATAR | Yes | Avatar URL for the top left of the site | None | https://avatars.githubusercontent.com/u/36541432 |
| NAME | Yes | Name & Title for the top left of the site | None | Xeu |
| DESCRIPTION | No | Description for the top left of the site | None | Omnivore |
| PAGE_SIZE | No | Default pagination limit | 5 | 5 |
| RSS_ENABLE | No | Enable RSS (displays RSS link at the bottom of the site if enabled) | false | true |
| Name | Required | Description | Default Value | Example Value |
|-------------|----------|---------------------------------------------------------------------|---------------|--------------------------------------------------|
| API_URL | Yes | Backend URL | None | http://localhost:3001 |
| AVATAR | Yes | Avatar URL for the top left of the site | None | https://avatars.githubusercontent.com/u/36541432 |
| NAME | Yes | Name & Title for the top left of the site | None | Xeu |
| DESCRIPTION | No | Description for the top left of the site | None | Omnivore |
| PAGE_SIZE | No | Default pagination limit | 5 | 5 |
| RSS_ENABLE | No | Enable RSS (displays RSS link at the bottom of the site if enabled) | false | true |

**Deployment Environment Variables**

:::caution
The following environment variables are required for deployment to Cloudflare Pages and cannot be modified.
:::

| Name | Value | Description |
|--------------------------|-----------------------------------------------------------|-------------------------------|
| SKIP_DEPENDENCY_INSTALL | true | Skip the default npm install command |
| UNSTABLE_PRE_BUILD | asdf install bun latest && asdf global bun latest && bun i | Install and use Bun for dependency installation |
| Name | Value | Description |
|-------------------------|------------------------------------------------------------|-------------------------------------------------|
| SKIP_DEPENDENCY_INSTALL | true | Skip the default npm install command |
| UNSTABLE_PRE_BUILD | asdf install bun latest && asdf global bun latest && bun i | Install and use Bun for dependency installation |

## Backend Environment Variables List

Expand All @@ -30,27 +30,27 @@ The following environment variables are required for deployment to Cloudflare Pa
The following variables can remain unencrypted in Cloudflare Workers.
:::

| Name | Required | Description | Default Value | Example Value |
|-------------------|----------|-------------------------------------------------------|----------------|-------------------------------------------------------------------|
| FRONTEND_URL | Temporarily required | Required for including comment article link in comment notification Webhook, can be left blank | None | https://xeu.life |
| S3_FOLDER | Yes | File path for storing resources when uploading images | None | images/ |
| S3_BUCKET | Yes | Name of the S3 bucket | None | images |
| S3_REGION | Yes | Region of the S3 bucket, use 'auto' for Cloudflare R2 | None | auto |
| S3_ENDPOINT | Yes | Endpoint address of the S3 bucket | None | https://1234567890abcdef1234567890abcd.r2.cloudflarestorage.com |
| WEBHOOK_URL | No | Target address for sending Webhook notifications when a new comment is added | None | https://webhook.example.com/webhook |
| S3_ACCESS_HOST | No | Access address of the S3 bucket | S3_ENDPOINT | https://image.xeu.life |
| S3_CACHE_FOLDER | No | S3 cache folder (for SEO and high-frequency request caching) | cache/ | cache/ |
| Name | Required | Description | Default Value | Example Value |
|-----------------|----------------------|------------------------------------------------------------------------------------------------|---------------|-----------------------------------------------------------------|
| FRONTEND_URL | Temporarily required | Required for including comment article link in comment notification Webhook, can be left blank | None | https://xeu.life |
| S3_FOLDER | Yes | File path for storing resources when uploading images | None | images/ |
| S3_BUCKET | Yes | Name of the S3 bucket | None | images |
| S3_REGION | Yes | Region of the S3 bucket, use 'auto' for Cloudflare R2 | None | auto |
| S3_ENDPOINT | Yes | Endpoint address of the S3 bucket | None | https://1234567890abcdef1234567890abcd.r2.cloudflarestorage.com |
| WEBHOOK_URL | No | Target address for sending Webhook notifications when a new comment is added | None | https://webhook.example.com/webhook |
| S3_ACCESS_HOST | No | Access address of the S3 bucket | S3_ENDPOINT | https://image.xeu.life |
| S3_CACHE_FOLDER | No | S3 cache folder (for SEO and high-frequency request caching) | cache/ | cache/ |

**Encrypted Environment Variables**

:::note
All of the following variables are required (except Webhook) and must be encrypted after debugging in Cloudflare Workers. Unencrypted variables will be cleared during deployment if not listed in `wrangler.toml`.
:::

| Name | Description | Example Value |
|--------------------------|----------------------------------------------------------|-----------------------------------------------------------------|
| RIN_GITHUB_CLIENT_ID | Client ID for GitHub OAuth | Ux66poMrKi1k11M1Q1b2 |
| RIN_GITHUB_CLIENT_SECRET | Client secret for GitHub OAuth | 1234567890abcdef1234567890abcdef12345678 |
| JWT_SECRET | Secret key required for JWT authentication, can be any regular format password | J0sT%Ch@nge#Me1 |
| S3_ACCESS_KEY_ID | KEY ID required for accessing the S3 bucket, for Cloudflare R2 use an API token ID with R2 edit permissions | 1234567890abcdef1234567890abcd |
| S3_SECRET_ACCESS_KEY | Secret required for accessing the S3 bucket, for Cloudflare R2 use an API token with R2 edit permissions | 1234567890abcdef1234567890abcd|
| Name | Description | Example Value |
|--------------------------|-------------------------------------------------------------------------------------------------------------|------------------------------------------|
| RIN_GITHUB_CLIENT_ID | Client ID for GitHub OAuth | Ux66poMrKi1k11M1Q1b2 |
| RIN_GITHUB_CLIENT_SECRET | Client secret for GitHub OAuth | 1234567890abcdef1234567890abcdef12345678 |
| JWT_SECRET | Secret key required for JWT authentication, can be any regular format password | J0sT%Ch@nge#Me1 |
| S3_ACCESS_KEY_ID | KEY ID required for accessing the S3 bucket, for Cloudflare R2 use an API token ID with R2 edit permissions | 1234567890abcdef1234567890abcd |
| S3_SECRET_ACCESS_KEY | Secret required for accessing the S3 bucket, for Cloudflare R2 use an API token with R2 edit permissions | 1234567890abcdef1234567890abcd |
4 changes: 2 additions & 2 deletions docs/en/guide/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bun wrangler d1 create rin

后端负责处理具体的逻辑,在本项目中后端运行在 Cloudflare Workers 上,前端通过 API 与后端通信,后端通过 Cloudflare D1 保存文章等数据,通过 Cloudflare R2 存储文章中的图片

下文提到的前端与后端你可以分别等价代换为 Cloudflare Pages 与 Cloudflare Workers,当提到说需要前端地址或者后端地址时,即为 Cloudflare Pages 地址或 Cloudflare Workers 地址,你可以在 oudflare 控制面板中通过少量的操作找到这两个地址,如下面的截图所示:
下文提到的前端与后端你可以分别等价代换为 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)
图中的`rin-6qe.pages.dev`,`direct.xeu.life` 都是前端地址,如果有更多的地址,你还可以点击形如 `+2 个域` 的链接查看更多的地址,这些地址都是可以访问的,你可以使用其中任意一个地址,但是需持不同地方都填写的是同一个前端地址(如果有多个环境变量要求填写前端地址的话),通常来说前端地址是 `https://rin-6qe.pages.dev` 或 `https://direct.xeu.life` 这样的形式
Expand Down Expand Up @@ -193,7 +193,7 @@ S3_SECRET_ACCESS_KEY=<你的S3SecretAccessKey>

## 接入 GitHub OAuth

打开 https://github.com/settings/developers,选择 `New OAuth App` 创建一个新的 Oauth App,填入自己的应用名称与主页地址(带`http://`或`https://`),`Authorization callback URL` 填写
打开 https://github.com/settings/developers ,选择`New OAuth App` 创建一个新的 Oauth App,填入自己的应用名称与主页地址(带`http://`或`https://`),`Authorization callback URL` 填写

```
https://<你的后端地址>/user/github/callback
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/guide/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bun wrangler d1 create rin

后端负责处理具体的逻辑,在本项目中后端运行在 Cloudflare Workers 上,前端通过 API 与后端通信,后端通过 Cloudflare D1 保存文章等数据,通过 Cloudflare R2 存储文章中的图片

下文提到的前端与后端你可以分别等价代换为 Cloudflare Pages 与 Cloudflare Workers,当提到说需要前端地址或者后端地址时,即为 Cloudflare Pages 地址或 Cloudflare Workers 地址,你可以在 oudflare 控制面板中通过少量的操作找到这两个地址,如下面的截图所示:
下文提到的前端与后端你可以分别等价代换为 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)
图中的`rin-6qe.pages.dev`,`direct.xeu.life` 都是前端地址,如果有更多的地址,你还可以点击形如 `+2 个域` 的链接查看更多的地址,这些地址都是可以访问的,你可以使用其中任意一个地址,但是需持不同地方都填写的是同一个前端地址(如果有多个环境变量要求填写前端地址的话),通常来说前端地址是 `https://rin-6qe.pages.dev` 或 `https://direct.xeu.life` 这样的形式
Expand Down Expand Up @@ -190,7 +190,7 @@ S3_SECRET_ACCESS_KEY=<你的S3SecretAccessKey>

## 接入 GitHub OAuth

打开 https://github.com/settings/developers,选择 `New OAuth App` 创建一个新的 Oauth App,填入自己的应用名称与主页地址(带`http://`或`https://`),`Authorization callback URL` 填写
打开 https://github.com/settings/developers ,选择`New OAuth App` 创建一个新的 Oauth App,填入自己的应用名称与主页地址(带`http://`或`https://`),`Authorization callback URL` 填写

```
https://<你的后端地址>/user/github/callback
Expand Down