mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-09 17:38:04 +02:00
Add Vitepress docs (#326)
* Add vitepress for docs * some fix * Use vitepress and update docs * Use vitepress and update docs * Update README.md * Add favicon * Add docs by @jiriks74 Co-authored-by: jiriks74 <jiri@stefka.eu> --------- Co-authored-by: jiriks74 <jiri@stefka.eu>
This commit is contained in:
53
docs/configuration/admin-panel.md
Normal file
53
docs/configuration/admin-panel.md
Normal file
@ -0,0 +1,53 @@
|
||||
# Admin panel
|
||||
|
||||
The first user created on your Opengist instance has access to the Admin panel.
|
||||
|
||||
To access the Admin panel:
|
||||
|
||||
1. Log in
|
||||
2. Click your username in the upper right corner
|
||||
3. Select `Admin`
|
||||
|
||||
## Usage
|
||||
|
||||
### General
|
||||
|
||||
Here you can see some basic information, like Opengist version, alongside some stats.
|
||||
|
||||
You can also start some actions like forcing synchronization of gists,
|
||||
starting garbage collection, etc.
|
||||
|
||||
### Users
|
||||
|
||||
Here you can see your users and delete them.
|
||||
|
||||
### Gists
|
||||
|
||||
Here you can see all the gists and some basic information about them. You also have an option
|
||||
to delete them.
|
||||
|
||||
|
||||
### Invitations
|
||||
|
||||
Here you can create invitation links with some options like limiting the number of signed up
|
||||
users or setting an expiration date.
|
||||
|
||||
> [!Note]
|
||||
> Invitation links override the `Disable signup` option but not the `Disable login form` option.
|
||||
>
|
||||
> Users will see only the OAuth providers when `Disable login form` is enabled.
|
||||
|
||||
### Configuration
|
||||
|
||||
Here you can change a limited number of settings without restarting the instance.
|
||||
|
||||
- Disable signup
|
||||
- Forbid the creation of new accounts.
|
||||
- Require login
|
||||
- Enforce users to be logged in to see gists.
|
||||
- Allow individual gists without login
|
||||
- Allow individual gists to be viewed and downloaded without login, while requiring login for discovering gists.
|
||||
- Disable login form
|
||||
- Forbid logging in via the login form to force using OAuth providers instead.
|
||||
- Disable Gravatar
|
||||
- Disable the usage of Gravatar as an avatar provider.
|
@ -1,3 +1,7 @@
|
||||
---
|
||||
aside: false
|
||||
---
|
||||
|
||||
# Configuration Cheat Sheet
|
||||
|
||||
| YAML Config Key | Environment Variable | Default value | Description |
|
||||
|
@ -27,7 +27,7 @@ Usage via command line :
|
||||
./opengist --config /path/to/config.yml
|
||||
```
|
||||
|
||||
You can start by copying and/or modifying the provided [config.yml](/config.yml) file.
|
||||
You can start by copying and/or modifying the provided [config.yml](https://github.com/thomiceli/opengist/blob/stable/config.yml) file.
|
||||
|
||||
|
||||
## Configuration via Environment Variables
|
@ -52,11 +52,11 @@ If you want your custom page to integrate well into the existing theme, you can
|
||||
</header>
|
||||
<main>
|
||||
<h3 class="text-xl font-bold leading-tight mt-4">Sub-Heading</h3>
|
||||
<p class="mt-4 ml-1"><!-- content --></p>
|
||||
<p class="mt-4 ml-1"><!-- my content --></p>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{{ template "footer" . }}
|
||||
```
|
||||
|
||||
You can adjust above as needed. Opengist uses Tailwind CSS classes.
|
||||
You can adjust above as needed. Opengist uses TailwindCSS classes.
|
||||
|
77
docs/configuration/oauth-providers.md
Normal file
77
docs/configuration/oauth-providers.md
Normal file
@ -0,0 +1,77 @@
|
||||
# Use OAuth providers
|
||||
|
||||
Opengist can be configured to use OAuth to authenticate users, with GitHub, Gitea, or OpenID Connect.
|
||||
|
||||
## GitHub
|
||||
|
||||
* Add a new OAuth app in your [GitHub account settings](https://github.com/settings/applications/new)
|
||||
* Set 'Authorization callback URL' to `http://opengist.url/oauth/github/callback`
|
||||
* Copy the 'Client ID' and 'Client Secret' and add them to the [configuration](cheat-sheet.md) :
|
||||
```yaml
|
||||
github.client-key: <key>
|
||||
github.secret: <secret>
|
||||
```
|
||||
```shell
|
||||
OG_GITHUB_CLIENT_KEY=<key>
|
||||
OG_GITHUB_SECRET=<secret>
|
||||
```
|
||||
|
||||
|
||||
## GitLab
|
||||
|
||||
* Add a new OAuth app in Application settings from the [GitLab instance](https://gitlab.com/-/user_settings/applications)
|
||||
* Set 'Redirect URI' to `http://opengist.url/oauth/gitlab/callback`
|
||||
* Copy the 'Client ID' and 'Client Secret' and add them to the [configuration](cheat-sheet.md) :
|
||||
```yaml
|
||||
gitlab.client-key: <key>
|
||||
gitlab.secret: <secret>
|
||||
# URL of the GitLab instance. Default: https://gitlab.com/
|
||||
gitlab.url: https://gitlab.com/
|
||||
```
|
||||
```shell
|
||||
OG_GITLAB_CLIENT_KEY=<key>
|
||||
OG_GITLAB_SECRET=<secret>
|
||||
# URL of the GitLab instance. Default: https://gitlab.com/
|
||||
OG_GITLAB_URL=https://gitlab.com/
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Gitea
|
||||
|
||||
* Add a new OAuth app in Application settings from the [Gitea instance](https://gitea.com/user/settings/applications)
|
||||
* Set 'Redirect URI' to `http://opengist.url/oauth/gitea/callback`
|
||||
* Copy the 'Client ID' and 'Client Secret' and add them to the [configuration](cheat-sheet.md) :
|
||||
```yaml
|
||||
gitea.client-key: <key>
|
||||
gitea.secret: <secret>
|
||||
# URL of the Gitea instance. Default: https://gitea.com/
|
||||
gitea.url: http://localhost:3000
|
||||
```
|
||||
```shell
|
||||
OG_GITEA_CLIENT_KEY=<key>
|
||||
OG_GITEA_SECRET=<secret>
|
||||
# URL of the Gitea instance. Default: https://gitea.com/
|
||||
OG_GITEA_URL=http://localhost:3000
|
||||
```
|
||||
|
||||
|
||||
|
||||
## OpenID Connect
|
||||
|
||||
* Add a new OAuth app in Application settings of your OIDC provider
|
||||
* Set 'Redirect URI' to `http://opengist.url/oauth/openid-connect/callback`
|
||||
* Copy the 'Client ID', 'Client Secret', and the discovery endpoint, and add them to the [configuration](cheat-sheet.md) :
|
||||
```yaml
|
||||
oidc.client-key: <key>
|
||||
oidc.secret: <secret>
|
||||
# Discovery endpoint of the OpenID provider. Generally something like http://auth.example.com/.well-known/openid-configuration
|
||||
oidc.discovery-url: http://auth.example.com/.well-known/openid-configuration
|
||||
```
|
||||
```shell
|
||||
OG_OIDC_CLIENT_KEY=<key>
|
||||
OG_OIDC_SECRET=<secret>
|
||||
# Discovery endpoint of the OpenID provider. Generally something like http://auth.example.com/.well-known/openid-configuration
|
||||
OG_OIDC_DISCOVERY_URL=http://auth.example.com/.well-known/openid-configuration
|
||||
```
|
||||
|
Reference in New Issue
Block a user