Allow serving custom error page

This commit is contained in:
Gnarwhal 2024-10-12 16:33:22 +00:00
parent bef866faae
commit df06003584
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
2 changed files with 27 additions and 1 deletions

View file

@ -84,6 +84,14 @@ This will trigger a build of the PR which will build a docker image to be used f
- `PAGES_DOMAIN` (default: `codeberg.page`): main domain for pages.
- `RAW_DOMAIN` (default: `raw.codeberg.page`): domain for raw resources (must be subdomain of `PAGES_DOMAIN`).
### Custom Error Page
A custom error page template can be served by creating `custom/error.html`.
Data available to the template includes:
- `{{ .StatusCode }}`: The HTTP status code (e.g. 404)
- `{{ .StatusText }}`: The textual name associated with the status code (e.g. Not Found)
- `{{ .Message }}`: The reason for the error
## Contributing to the development
The Codeberg team is very open to your contribution.