Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit deeafdd

Browse files
committed
update docs
1 parent 0bea971 commit deeafdd

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/docs/content/docs/backends-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Individual backends provide their own configuration documentation, but there are
1717
| branch | string | `main` | _Optional_. The branch where published content is stored. All CMS commits and PRs are made to this branch |
1818
| api_root | string | GitHub<br />`https://api.github.com`<br /><br />GitLab<br/>`https://gitlab.com/api/v4`<br /><br />Bitbucket<br />`https://api.bitbucket.org/2.0`<br /><br />Gitea<br />`https://try.gitea.io/api/v1` | _Optional_. The API endpoint. Only necessary in certain cases, like with GitHub Enterprise or self-hosted GitLab |
1919
| site_domain | string | `location.hostname`<br /><br />On `localhost`<br />`cms.netlify.com` | _Optional_. Sets the `site_id` query param sent to the API endpoint. Non-Netlify auth setups will often need to set this for local development to work properly |
20-
| base_url | string | GitHub or Bitbucket<br />`https://api.netlify.com`<br /><br />GitLab<br />`https://gitlab.com` | _Optional_. OAuth client hostname (just the base domain, no path). **Required** when using an external OAuth server or self-hosted GitLab/Gitea |
20+
| base_url | string | GitHub or Bitbucket<br />`https://api.netlify.com`<br /><br />GitLab<br />`https://gitlab.com`<br /><br />Gitea<br />`https://try.gitea.io` | _Optional_. OAuth client hostname (just the base domain, no path). **Required** when using an external OAuth server or self-hosted GitLab/Gitea |
2121
| auth_endpoint | string | GitHub or Bitbucket<br />`auth`<br /><br />GitLab<br />`oauth/authorize` | _Optional_. Path to append to `base_url` for authentication requests. |
2222

2323
## Creating a New Backend

packages/docs/content/docs/gitea-backend.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,23 @@ beta: true
99

1010
For repositories stored on Gitea, the `gitea` backend allows CMS users to log in directly with their Gitea account. Note that all users must have push access to your content repository for this to work.
1111

12-
<Alert severity="warning">Because of the [lack](https://github.com/go-gitea/gitea/issues/14619) of a Gitea API endpoint for multifile commits, when using this backend, separate commits are created for every changed file. Please make sure this is handled correctly by your CI.</Alert>
12+
Please note that only Gitea **1.20** and upwards is supported due to API limitations in previous versions.
1313

1414
## Authentication
1515

16-
Because Gitea requires a server for authentication and Netlify doesn't support Gitea, a custom OAuth provider needs to be used for basic Gitea authentication.
16+
With Gitea's PKCE authorization, users can authenticate with Gitea directly from the client. To do this:
1717

18-
To enable basic Gitea authentication:
19-
20-
1. Setup an own OAuth provider, for example with [Teabag](https://github.com/denyskon/teabag).
21-
2. Add the following lines to your Static CMS `config` file:
18+
1. Add your Static CMS instance as an OAuth application in your user/organization settings or through the admin panel of your Gitea instance. Please make sure to uncheck the **Confidential Client** checkbox. For the **Redirect URIs**, enter the addresses where you access Static CMS, for example, `https://www.mysite.com/admin/`.
19+
2. Gitea provides you with a **Client ID**. Copy it and insert it into your `config` file along with the other options:
2220

2321
<CodeTabs>
2422
```yaml
2523
backend:
2624
name: gitea
2725
repo: owner-name/repo-name # Path to your Gitea repository
28-
base_url: https://oauth.example.com # URL of your OAuth provider
29-
api_root: https://gitea.example.com/api/v1 # API url of your Gitea instance
26+
app_id: your-client-id # The Client ID provided by Gitea
27+
api_root: https://gitea.example.com/api/v1 # API URL of your Gitea instance
28+
base_url: https://gitea.example.com # Root URL of your Gitea instance
3029
# optional, defaults to main
3130
# branch: main
3231
```
@@ -35,8 +34,9 @@ backend:
3534
backend: {
3635
name: 'gitea',
3736
repo: 'owner-name/repo-name', // Path to your Gitea repository
38-
base_url: 'https://oauth.example.com', // URL of your OAuth provider
39-
api_root: 'https://gitea.example.com/api/v1' // API url of your Gitea instance
37+
app_id: 'your-client-id', // The Client ID provided by Gitea
38+
api_root: 'https://gitea.example.com/api/v1', // API URL of your Gitea instance
39+
base_url: 'https://gitea.example.com', // Root URL of your Gitea instance
4040
// optional, defaults to main
4141
// branch: 'main'
4242
},

0 commit comments

Comments
 (0)