-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
208 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Custom assets | ||
|
||
To add custom assets to your Opengist instance, you can use the `$opengist-home/custom` directory (where `$opengist-home` is the directory where Opengist stores its data). | ||
|
||
### Logo / Favicon | ||
|
||
To add a custom logo or favicon, you can add your own image file to the `$opengist-home/custom` directory, then define the relative path in the config. | ||
|
||
For example, if you have a logo file `logo.png` in the `$opengist-home/custom` directory, you can set the logo path in the config as follows: | ||
|
||
#### YAML | ||
```yaml | ||
custom.logo: logo.png | ||
``` | ||
#### Environment variable | ||
```sh | ||
export OG_CUSTOM_LOGO=logo.png | ||
``` | ||
|
||
Same as the favicon: | ||
|
||
#### YAML | ||
```yaml | ||
custom.favicon: favicon.png | ||
``` | ||
#### Environment variable | ||
```sh | ||
export OG_CUSTOM_FAVICON=favicon.png | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Custom links | ||
|
||
On the footer of your Opengist instance, you can add links to custom static templates or any other website you want to link to. | ||
This can be useful for legal information, privacy policy, or any other information you want to provide to your users. | ||
|
||
To add one or more links, you can add your own file to the `$opengist-home/custom` directory or set a URL, then define the relative path and its name in the config. | ||
|
||
For example, if you have a legal information file `legal.html` in the `$opengist-home/custom` directory, and also wish to add a link to a Gitea instance, you can set the link in the config as follows: | ||
|
||
#### YAML | ||
```yaml | ||
custom.static-links: | ||
- name: Legal notices | ||
path: legal.html | ||
- name: Gitea | ||
path: https://gitea.com | ||
``` | ||
#### Environment variable | ||
```sh | ||
OG_CUSTOM_STATIC_LINK_0_NAME="Legal Notices" \ | ||
OG_CUSTOM_STATIC_LINK_0_PATH=legal.html \ | ||
OG_CUSTOM_STATIC_LINK_1_NAME=Gitea \ | ||
OG_CUSTOM_STATIC_LINK_1_PATH=https://gitea.com \ | ||
./opengist | ||
``` | ||
|
||
## Templating custom HTML pages | ||
|
||
In the start and end of the custom HTML files, you can use the syntax to include the header and footer of the Opengist instance: | ||
|
||
```html | ||
{{ template "header" . }} | ||
|
||
<!-- my content --> | ||
|
||
{{ template "footer" . }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters