mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-22 12:32:40 +00:00
feat: Add custom instance names (#399)
* Add custom name variable * Add custom name variable usage to docs * Remove leftover testing config options (oops)
This commit is contained in:
parent
00951bf63b
commit
20aef5e694
6 changed files with 1401 additions and 1387 deletions
|
@ -38,7 +38,6 @@ git.default-branch:
|
|||
# For SQLite databases only.
|
||||
sqlite.journal-mode: WAL
|
||||
|
||||
|
||||
# HTTP server configuration
|
||||
# Host to bind to. Default: 0.0.0.0
|
||||
http.host: 0.0.0.0
|
||||
|
@ -72,7 +71,6 @@ ssh.external-domain:
|
|||
# Path or alias to ssh-keygen executable. Default: ssh-keygen
|
||||
ssh.keygen-executable: ssh-keygen
|
||||
|
||||
|
||||
# OAuth2 configuration
|
||||
# The callback/redirect URL must be http://opengist.url/oauth/<github|gitlab|gitea|openid-connect>/callback
|
||||
|
||||
|
@ -102,6 +100,9 @@ oidc.secret:
|
|||
# Discovery endpoint of the OpenID provider. Generally something like http://auth.example.com/.well-known/openid-configuration
|
||||
oidc.discovery-url:
|
||||
|
||||
# Instance name
|
||||
# Set your own custom name to be displayed instead of 'Opengist'
|
||||
custom.name:
|
||||
|
||||
# Custom assets
|
||||
# Add your own custom assets, that are files relatives to $opengist-home/custom/
|
||||
|
|
|
@ -37,6 +37,7 @@ aside: false
|
|||
| oidc.client-key | OG_OIDC_CLIENT_KEY | none | The client key for the OpenID application. |
|
||||
| oidc.secret | OG_OIDC_SECRET | none | The secret for the OpenID application. |
|
||||
| oidc.discovery-url | OG_OIDC_DISCOVERY_URL | none | Discovery endpoint of the OpenID provider. |
|
||||
| custom.name | OG_CUSTOM_NAME | none | The name of your instance, to be displayed in the tab title |
|
||||
| custom.logo | OG_CUSTOM_LOGO | none | Path to an image, relative to $opengist-home/custom. |
|
||||
| custom.favicon | OG_CUSTOM_FAVICON | none | Path to an image, relative to $opengist-home/custom. |
|
||||
| custom.static-links | OG_CUSTOM_STATIC_LINK_#_(PATH,NAME) | none | Path and name to custom links, more info [here](custom-links.md). |
|
||||
|
|
|
@ -28,4 +28,18 @@ custom.favicon: favicon.png
|
|||
#### Environment variable
|
||||
```sh
|
||||
export OG_CUSTOM_FAVICON=favicon.png
|
||||
```
|
||||
```
|
||||
|
||||
### Instance Name
|
||||
|
||||
It is also possible to set a name for your instance, that would be displayed in the title bar instead of 'Opengist'.
|
||||
|
||||
#### YAML
|
||||
```yaml
|
||||
custom.name: My Gists
|
||||
```
|
||||
|
||||
#### Environment variable
|
||||
```sh
|
||||
export OG_CUSTOM_NAME="My Gists"
|
||||
```
|
||||
|
|
|
@ -71,6 +71,7 @@ type config struct {
|
|||
OIDCSecret string `yaml:"oidc.secret" env:"OG_OIDC_SECRET"`
|
||||
OIDCDiscoveryUrl string `yaml:"oidc.discovery-url" env:"OG_OIDC_DISCOVERY_URL"`
|
||||
|
||||
CustomName string `yaml:"custom.name" env:"OG_CUSTOM_NAME"`
|
||||
CustomLogo string `yaml:"custom.logo" env:"OG_CUSTOM_LOGO"`
|
||||
CustomFavicon string `yaml:"custom.favicon" env:"OG_CUSTOM_FAVICON"`
|
||||
StaticLinks []StaticLink `yaml:"custom.static-links" env:"OG_CUSTOM_STATIC_LINK"`
|
||||
|
|
2761
package-lock.json
generated
2761
package-lock.json
generated
File diff suppressed because it is too large
Load diff
4
templates/base/base_header.html
vendored
4
templates/base/base_header.html
vendored
|
@ -46,9 +46,9 @@
|
|||
{{ end }}
|
||||
|
||||
{{ if .htmlTitle }}
|
||||
<title>{{ .htmlTitle }} - Opengist</title>
|
||||
<title>{{ .htmlTitle }} - {{ if $.c.CustomName }}{{ $.c.CustomName }}{{ else }}Opengist{{ end }}</title>
|
||||
{{ else }}
|
||||
<title>Opengist</title>
|
||||
<title>{{ if $.c.CustomName }}{{ $.c.CustomName }}{{ else }}Opengist{{ end }}</title>
|
||||
{{ end }}
|
||||
</head>
|
||||
<body class="h-full">
|
||||
|
|
Loading…
Reference in a new issue