mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
Codeberg Pages: add custom 404 instructions (#654)
Closes #653 Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/654 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Bastian Greshake Tzovaras <bgreshake@googlemail.com> Co-committed-by: Bastian Greshake Tzovaras <bgreshake@googlemail.com>
This commit is contained in:
parent
0d9164b25c
commit
e004b03c97
1 changed files with 9 additions and 0 deletions
|
|
@ -70,6 +70,15 @@ In all cases, you can append a branch using an `@` (e.g. `https://username.codeb
|
|||
If the branch name contains a slash (`/`), they need to be replaced with a tilde (`~`) (e.g. the branch `docs/develop`
|
||||
can be accessed via `https://username.codeberg.page/@docs~develop/README.md`).
|
||||
|
||||
## Advanced Usage: Custom error page for 404s
|
||||
|
||||
You can replace the default 404 error page that Codeberg Pages will show for missing pages with your own version if you prefer.
|
||||
To do so start by writing your own HTML file that you want to serve instead.
|
||||
|
||||
After creating the HTML with your custom error message, save it as `404.html` in the root of your repository that you use to serve your Codeberg Page.
|
||||
|
||||
From then on, your `404.html` file will be served when the error is encountered.
|
||||
|
||||
## Do you have questions, feedback or have you found a bug?
|
||||
|
||||
The source code for Codeberg Pages is maintained over at the [Pages Server repository](https://codeberg.org/Codeberg/pages-server);
|
||||
|
|
|
|||
Loading…
Reference in a new issue