Skip to content

Commit

Permalink
docs: add documentation for gitea
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Dec 31, 2019
1 parent 1a6ea07 commit 3227d6a
Show file tree
Hide file tree
Showing 35 changed files with 184 additions and 11 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<a href="https://vssue.js.org/demo/gitee.html" target="_blank">
<img width="50" src="https://pic3.zhimg.com/50/v2-59ebcea61c2d9e658a2e34b0b8d4b1b7_qhd.jpg" alt="Gitee">
</a>

<a href="https://vssue.js.org/demo/gitea.html" target="_blank">
<img width="50" src="https://docs.gitea.io/images/gitea.png" alt="Gitea">
</a>
</p>

<h1 align="center">
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ function sidebarGuide (titleGuide, titleOAuthApp, titleSiteTools) {
'gitlab',
'bitbucket',
'gitee',
'gitea',
],
},
{
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ features:
- title: Comments
details: Enable comments support for static pages, based on the issue system of code hosting services.
- title: Multi-platform
details: Support multiple code hosting services, including GitHub, GitLab, Bitbucket and Gitee.
details: Support multiple code hosting services, including GitHub, GitLab, Bitbucket, Gitee and Gitea.
- title: Use Vue
details: Use Vssue as a Vue plugin, and can be integrated in your Vue App easily.
footer: MIT Licensed | Vssue
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/demo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Vssue Demo

- [Bitbucket](./bitbucket.md)
- [Gitea](./gitea.md)
- [Gitee](./gitee.md)
- [GitHub](./github.md)
- [GitHub V4](./github-v4.md)
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Then Vssue could get the users' info and get the comments of this page. And user

__Vssue__ is inspired by [__Gitment__](https://github.com/imsun/gitment) and [__Gitalk__](https://github.com/gitalk/gitalk), with some differences:

- __Vssue__ supports Github, Gitlab and Bitbucket, and can be extended to other platform easily. __Gitment__ and __Gitalk__ only support Github.
- __Vssue__ supports Github, Gitlab, Bitbucket, Gitee and Gitea, and can be extended to other platform easily. __Gitment__ and __Gitalk__ only support Github.
- __Vssue__ can post, edit and delete comments. __Gitment__ and __Gitalk__ can only post comments.
- __Vssue__ is based on [Vue.js](https://vuejs.org) so can be integrated into Vue projects, and provides a [VuePress Plugin](./vuepress.md). __Gitment__ is based on vanilla javascript, and __Gitalk__ is based on [Preact](https://github.com/developit/preact).
6 changes: 5 additions & 1 deletion packages/docs/src/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Choose a platform to use

Vssue can enable comments for your static pages via the `Issue System` of `Github`, `Gitlab`, `Bitbucket` or `Gitee`, and you can choose one of those platforms.
Vssue can enable comments for your static pages via the `Issue System` of `Github`, `Gitlab`, `Bitbucket`, `Gitee` or `Gitea`, and you can choose one of those platforms.

Go to [Supported Platforms - Set up OAuth App](./supported-platforms.md) for detailed instructions.

Expand Down Expand Up @@ -43,6 +43,8 @@ Vssue can be used directly via a `<script>` tag in browser. As Vssue depends on
<script src="https://unpkg.com/vssue/dist/vssue.bitbucket.min.js"></script>
<!-- OR: Vssue Gitee build -->
<script src="https://unpkg.com/vssue/dist/vssue.gitee.min.js"></script>
<!-- OR: Vssue Gitea build -->
<script src="https://unpkg.com/vssue/dist/vssue.gitea.min.js"></script>

<!-- Use Vssue as a Vue component -->

Expand Down Expand Up @@ -127,6 +129,8 @@ npm install @vssue/api-gitlab-v4
npm install @vssue/api-bitbucket-v2
# OR: use Gitee V5
npm install @vssue/api-gitee-v5
# OR: use Gitea V1
npm install @vssue/api-gitea-v1
```

### Use as a Vue Plugin
Expand Down
55 changes: 55 additions & 0 deletions packages/docs/src/guide/gitea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Gitea Application

> Vssue can also work with self-hosted Gitea. Set the `baseURL` options to your Gitea URL. See [Options Reference - baseURL](../options/README.md#baseurl)
> Gitea requires `clientSecret` because Gitea does not support implicit grant type
## Create a new Application

- Go to [Settings - Applications](https://gitea.com/user/settings/applications)

->![Set up OAuth App - Gitea 01](/assets/img/oauth-app-gitea-01.png)<-
->![Set up OAuth App - Gitea 02](/assets/img/oauth-app-gitea-02.png)<-

- Set the `Redirect URI` to your website URL (Here we take `localhost:8080` for example)
- Click `Create Application`

->![Set up OAuth App - Gitea 03](/assets/img/oauth-app-gitea-03.png)<-

## Get the Client ID and Secret

Then you've created a new Application, and here is your `Client ID` and `Client Secret`.

->![Set up OAuth App - Gitea 04](/assets/img/oauth-app-gitea-04.png)<-

## Config and start your Vssue

Copy the `Client ID` and `Client Secret`, and set `owner` and `repo`.

> The URL pattern of gitea repo is `https://gitea.com/${owner}/${repo}`
Here we take `https://gitea.com/meteorlxy/vssue-demo` for example, and set the `title` of issue to `Vssue Demo`.

Then run `anywhere -h localhost 8080` to serve the `index.html` on `localhost:8080`.

->![Set up OAuth App - Gitea 05](/assets/img/oauth-app-gitea-05.png)<-

## Try out Vssue locally

Vssue has already run here. Click `Login` to login with gitea account and `Click to create issue`.

->![Set up OAuth App - Gitea 06](/assets/img/oauth-app-gitea-06.png)<-

Redirect to Gitea Authorization page. Click `Authorize Application` to login.

->![Set up OAuth App - Gitea 07](/assets/img/oauth-app-gitea-07.png)<-

Leave a comment on this page ~

->![Set up OAuth App - Gitea 08](/assets/img/oauth-app-gitea-08.png)<-

->![Set up OAuth App - Gitea 09](/assets/img/oauth-app-gitea-09.png)<-

::: tip
You can go to the repo [meteorlxy/vssue-demo](https://gitea.com/meteorlxy/vssue-demo) to get the demo code. Check the [first issue](https://gitea.com/meteorlxy/vssue-demo/issues/1) of that repo to see what happened.
:::
23 changes: 22 additions & 1 deletion packages/docs/src/guide/supported-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Guide: [Set up GitLab Application](./gitlab.md)
- comments editable
- comments deletable
- requires login to view comments
- need to add redirect_uri one by one - [Ref](https://gitlab.com/gitlab-org/gitlab/issues/23054)
- Developer Reference: [Official Docs](https://docs.gitlab.com/ce/api)

## Bitbucket
Expand All @@ -57,7 +58,7 @@ Guide: [Set up Bitbucket OAuth Consumer](./bitbucket.md)

## Gitee

Guide: [Set up Gitee OAuth Application](./gitee.md)
Guide: [Set up Gitee Third Party Application](./gitee.md)

### Gitee API V5

Expand All @@ -69,4 +70,24 @@ Guide: [Set up Gitee OAuth Application](./gitee.md)
- comments deletable
- can view comments without login
- cannot post emoji reactions to comments (heart, like, unlike, etc.)
- only support a single fixed redirect_uri - [Ref](https://gitee.com/oschina/git-osc/issues/IV0FL)
- Developer Reference: [Official Docs](https://gitee.com/api/v5/swagger)

## Gitea

Guide: [Set up Gitea Application](./gitea.md)

### Gitea API V1

- Vssue API package: [@vssue/api-gitea-v1](https://www.npmjs.com/package/@vssue/api-gitea-v1)
- Features or drawbacks:
- [clientSecret](../options/README.md#clientsecret) is required
- comments not sortable, and no pagination support - [Ref](https://github.com/go-gitea/gitea/issues/6132)
- comments editable
- comments deletable
- can view comments without login
- only support unicode emoji - [Ref](https://github.com/go-gitea/gitea/issues/6628)
- only support a single fixed redirect_uri - [Ref](https://github.com/go-gitea/gitea/issues/9514)
- Developer Reference:
- [Official Docs](https://docs.gitea.io/en-us)
- [Official API Reference](https://gitea.com/api/swagger)
1 change: 1 addition & 0 deletions packages/docs/src/guide/vuepress.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The only difference is that, you should set `platform` rather than the `api` pac
- platform `gitlab` - api package `@vssue/api-gitlab-v4`
- platform `bitbucket` - api package `@vssue/api-bitbucket-v2`
- platform `gitee` - api package `@vssue/api-gitee-v5`
- platform `gitea` - api package `@vssue/api-gitea-v1`
:::

::: tip
Expand Down
6 changes: 4 additions & 2 deletions packages/docs/src/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``:
- Gitlab: `https://gitlab.com/${owner}/${repo}`
- Bitbucket: `https://bitbucket.org/${owner}/${repo}`
- Gitee: `https://gitee.com/${owner}/${repo}`
- Gitea: `https://gitea.com/${owner}/${repo}`
:::

### clientId
Expand Down Expand Up @@ -109,7 +110,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``:
::: tip
Some platforms (e.g. Bitbucket and GitLab) support [Implicit Grant](https://tools.ietf.org/html/rfc6749#section-4.2), so we don't need `clientSecret` for those platforms.

However, some platforms (e.g. GitHub and Gitee) do not support it now, so `clientSecret` is required for those platforms.
However, some platforms (e.g. GitHub, Gitee and Gitea) do not support it now, so `clientSecret` is required for those platforms.
:::

- __Reference__:
Expand All @@ -131,6 +132,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``:
- `'https://gitlab.com'` for Gitlab
- `'https://bitbucket.org'` for Bitbucket
- `'https://gitee.com'` for Gitee
- `'https://gitea.com'` for Gitea

::: warning ATTENTION
Only when you choose to use __self-hosted__ platform should you set this option. (e.g. __GitLab Community / Enterprise Edition__ or __GitHub Enterprise Server__)
Expand Down Expand Up @@ -240,7 +242,7 @@ The common pattern of repository's URL is `` `${baseURL}/${owner}/${repo}` ``:
- __Default__: `` url => `https://cors-anywhere.herokuapp.com/${url}` ``
- __Details__:

Some platforms (e.g. GitHub and Gitee) do not support Implicit Grant, so we have to request the API of the platform to get the access token.
Some platforms (e.g. GitHub, Gitee and Gitea) do not support Implicit Grant, so we have to request the API of the platform to get the access token.

However, the access token API of the platforms do not support CORS (see [related issue of GitHub](https://github.com/isaacs/github/issues/330)). As Vssue is a pure front-end plugin, we have to use a proxy to request access token.

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/zh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ features:
- title: 页面评论
details: 为静态页面开启评论功能,基于代码托管服务的 Issue 系统。
- title: 多平台
details: 支持多个代码托管平台,包括 GitHub, GitLab, Bitbucket 和 Gitee
details: 支持多个代码托管平台,包括 GitHub, GitLab, Bitbucket, Gitee 和 Gitea
- title: 基于Vue
details: 可以作为 Vue 插件使用,轻松集成到你的 Vue 应用中。
footer: MIT Licensed | Vssue
Expand Down
1 change: 1 addition & 0 deletions packages/docs/src/zh/demo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Vssue Demo

- [Bitbucket](./bitbucket.md)
- [Gitea](./gitea.md)
- [Gitee](./gitee.md)
- [GitHub](./github.md)
- [GitHub V4](./github-v4.md)
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/zh/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Vssue 获取 `token` 后,会将 `token` 存储在 localstorage 中,于是用

__Vssue__ 的灵感来自于 [__Gitment__](https://github.com/imsun/gitment)[__Gitalk__](https://github.com/gitalk/gitalk),但是和它们有些区别:

- __Vssue__ 支持 GithubGitlab 和 Bitbucket,并且很容易扩展到其它平台。__Gitment____Gitalk__ 仅支持 Github。
- __Vssue__ 支持 Github, Gitlab, Bitbucket, Gitee 和 Gitea,并且很容易扩展到其它平台。__Gitment____Gitalk__ 仅支持 Github。
- __Vssue__ 可以发表、编辑、删除评论。__Gitment____Gitalk__ 仅能发表评论。
- __Vssue__ 是基于 [Vue.js](https://vuejs.org) 开发的,可以集成到 Vue 项目中,并且提供了一个 [VuePress 插件](./vuepress.md)__Gitment__ 基于原生JS,而 __Gitalk__ 基于 [Preact](https://github.com/developit/preact)
6 changes: 5 additions & 1 deletion packages/docs/src/zh/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 选择你要使用的代码托管平台

Vssue 支持通过 Github, Gitlab, Bitbucket 或者 Gitee 的 Issue 系统来为你的静态页面提供评论功能,你可以选择其中之一来使用。
Vssue 支持通过 Github, Gitlab, Bitbucket, Gitee 或者 Gitea 的 Issue 系统来为你的静态页面提供评论功能,你可以选择其中之一来使用。

前往 [支持的代码托管平台 - 创建 OAuth App](./supported-platforms.md) 查看详细指引。

Expand Down Expand Up @@ -43,6 +43,8 @@ Vssue 可以在浏览器中通过 `<script>` 标签直接使用。由于 Vssue
<script src="https://unpkg.com/vssue/dist/vssue.bitbucket.min.js"></script>
<!-- 或: Vssue Gitee 版 -->
<script src="https://unpkg.com/vssue/dist/vssue.gitee.min.js"></script>
<!-- 或: Vssue Gitea 版 -->
<script src="https://unpkg.com/vssue/dist/vssue.gitea.min.js"></script>

<!-- 将 Vssue 作为 Vue 组件使用 -->

Expand Down Expand Up @@ -127,6 +129,8 @@ npm install @vssue/api-gitlab-v4
npm install @vssue/api-bitbucket-v2
# 或:使用 Gitee V5
npm install @vssue/api-gitee-v5
# 或:使用 Gitea V1
npm install @vssue/api-gitea-v1
```

### 作为 Vue 插件使用
Expand Down
55 changes: 55 additions & 0 deletions packages/docs/src/zh/guide/gitea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Gitea 应用

> Vssue 同样可以配合自己搭建的 Gitea 使用。只需要将 `baseURL` 设置为你的 Gitea URL 即可。查看 [配置参考 - baseURL](../options/README.md#baseurl)
> Gitea 需要设置 `clientSecret`,因为 Gitea 目前还不支持 implicit grant type
## 创建一个新的应用

- 前往 [设置 - 应用](https://gitea.com/user/settings/applications)

->![配置 OAuth App - Gitea 01](/assets/img/oauth-app-gitea-zh-01.png)<-
->![配置 OAuth App - Gitea 02](/assets/img/oauth-app-gitea-zh-02.png)<-

-`重定向 URI` 设置为你的网站 URL (这里我们用 `localhost:8080` 作为示例)
- 点击 `创建应用`

->![配置 OAuth App - Gitea 03](/assets/img/oauth-app-gitea-zh-03.png)<-

## 获取 Client ID 和 Secret

现在你已经创建了一个新的第三方应用,并得到了相应的 客户端 ID (`Client ID`) 和 客户端密钥 (`Client Secret`) 。

->![配置 OAuth App - Gitea 04](/assets/img/oauth-app-gitea-zh-04.png)<-

## 配置并启动你的 Vssue

复制 `Client ID``Client Secret`, 并设置 `owner``repo`

> Gitea repository 的 URL 模式为 `https://gitea.com/${owner}/${repo}`
这里我们以 `https://gitea.com/meteorlxy/vssue-demo` 为例,并把 issue 的 `title` 设置为 `Vssue Demo`

然后运行 `anywhere -h localhost 8080`,在 `localhost:8080` 监听一个 http server 并返回 `index.html`

->![配置 OAuth App - Gitea 05](/assets/img/oauth-app-gitea-05.png)<-

## 在本地尝试 Vssue

Vssue 已经成功运行。点击 `登录` 使用 Gitea 帐号登录,并通过 `点击创建 Issue` 创建 Issue。

->![配置 OAuth App - Gitea 06](/assets/img/oauth-app-gitea-zh-06.png)<-

重定向到 Gitea 授权页面。点击 `应用授权` 来登录。

->![配置 OAuth App - Gitea 07](/assets/img/oauth-app-gitea-zh-07.png)<-

在当前页面写下评论吧 ~

->![配置 OAuth App - Gitea 08](/assets/img/oauth-app-gitea-zh-08.png)<-

->![配置 OAuth App - Gitea 09](/assets/img/oauth-app-gitea-zh-09.png)<-

::: tip 提示
你可以前往 [meteorlxy/vssue-demo](https://gitea.com/meteorlxy/vssue-demo) 来获取 demo 代码。前往该仓库的 [第一个 issue](https://gitea.com/meteorlxy/vssue-demo/issues/1) 看看发生了什么。
:::
21 changes: 21 additions & 0 deletions packages/docs/src/zh/guide/supported-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- 评论可以编辑
- 评论可以删除
- 要求登陆后才能浏览评论
- 需要逐个添加回调地址 - [参考](https://gitlab.com/gitlab-org/gitlab/issues/23054)
- 开发者参考: [官方文档](https://docs.gitlab.com/ce/api)

## Bitbucket
Expand Down Expand Up @@ -69,4 +70,24 @@
- 评论可以删除
- 可以不登录浏览评论,但 API 有调用频率限制
- 不能对评论做出 emoji 响应 (喜欢、点赞、踩 等)
- 只支持单个固定的回调地址 - [参考](https://gitee.com/oschina/git-osc/issues/IV0FL)
- 开发者参考: [官方文档](https://gitee.com/api/v5/swagger)

## Gitea

指南: [创建 Gitea 应用](./gitea.md)

### Gitea API V1

- Vssue API 包: [@vssue/api-gitea-v1](https://www.npmjs.com/package/@vssue/api-gitea-v1)
- 特点 / 缺点:
- 需要设置 [clientSecret](../options/README.md#clientsecret)
- 评论无法排序,且不支持分页 - [参考](https://github.com/go-gitea/gitea/issues/6132)
- 评论可以编辑
- 评论可以删除
- 可以不登录浏览评论
- 只支持 unicode emoji 表情 - [参考](https://github.com/go-gitea/gitea/issues/6628)
- 只支持单个固定的回调地址 - [参考](https://github.com/go-gitea/gitea/issues/9514)
- 开发者参考:
- [官方文档](https://docs.gitea.io/zh-cn)
- [官方 API 参考](https://gitea.com/api/swagger)
1 change: 1 addition & 0 deletions packages/docs/src/zh/guide/vuepress.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports = {
- platform `gitlab` - api 包 `@vssue/api-gitlab-v4`
- platform `bitbucket` - api 包 `@vssue/api-bitbucket-v2`
- platform `gitee` - api 包 `@vssue/api-gitee-v5`
- platform `gitea` - api 包 `@vssue/api-gitea-v1`
:::

::: tip
Expand Down
6 changes: 4 additions & 2 deletions packages/docs/src/zh/options/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Vue.use(Vssue, {
- Gitlab: `https://gitlab.com/${owner}/${repo}`
- Bitbucket: `https://bitbucket.org/${owner}/${repo}`
- Gitee: `https://gitee.com/${owner}/${repo}`
- Gitea: `https://gitea.com/${owner}/${repo}`
:::

### clientId
Expand Down Expand Up @@ -109,7 +110,7 @@ Vue.use(Vssue, {
::: tip
一些平台(如 Bitbucket 和 GitLab)支持 [Implicit Grant](https://tools.ietf.org/html/rfc6749#section-4.2),所以在使用这些平台时不需要 `clientSecret`

然而,有一些平台(如 GitHub 和 Gitee)不支持它,所以在使用这些平台时 `clientSecret` 是必须的。
然而,有一些平台(如 GitHub, Gitee 和 Gitea)不支持它,所以在使用这些平台时 `clientSecret` 是必须的。
:::

- __参考__:
Expand All @@ -131,6 +132,7 @@ Vue.use(Vssue, {
- Gitlab 是 `'https://gitlab.com'`
- Bitbucket 是`'https://bitbucket.org'`
- Gitee 是`'https://gitee.com'`
- Gitea 是`'https://gitea.com'`

::: warning 注意
只有在你要使用 __自行搭建的__ 平台时才需要设置这个选项。(比如 __GitLab Community / Enterprise Edition____GitHub Enterprise Server__
Expand Down Expand Up @@ -240,7 +242,7 @@ Vue.use(Vssue, {
- __默认值__: `` url => `https://cors-anywhere.herokuapp.com/${url}` ``
- __详细__:

某些平台(如 GitHub 和 Gitee)不支持 Implicit Grant,所以我们必须通过请求平台的 API 来获取 Access Token。
某些平台(如 GitHub, Gitee 和 Gitea)不支持 Implicit Grant,所以我们必须通过请求平台的 API 来获取 Access Token。

然而,平台的 Access Token API 不支持 CORS (详见 [GitHub 的相关 Issue](https://github.com/isaacs/github/issues/330))。由于 Vssue 是一个纯前端插件,我们必须要通过代理来请求 Access Token。

Expand Down

0 comments on commit 3227d6a

Please sign in to comment.