diff --git a/content/codeberg-pages/index.md b/content/codeberg-pages/index.md index aa57329..94cc5d7 100644 --- a/content/codeberg-pages/index.md +++ b/content/codeberg-pages/index.md @@ -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);