-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to customize the 404 page #197
Comments
Hey @mattock! Great idea and for sure very useful. I like the idea of defining a custom URL more. Because you can just point it to a Wiki Page and there you can edit it nicely.
Another thing is to add the default in the Lines 19 to 60 in f618471
Go for it, a PR is very welcome. |
Ok, I shall take a deep breath in the upcoming weeks and try to make it work. |
Currently the 404 page is hardcoded (templates/page404.html). In our case we'd like to customize that page as we're migrating away from an old Trac wiki and wish to let people know why they may be hitting a 404 page in Otterwiki. While we can modify that file directly, it is a rather bad option as it makes Git unhappy. Two options I can think of to make this better:
Allow defining a custom 404 URL
This would default to an empty string. If it is an empty string, Otterwiki would default to its current behavior. Alternatively there could be a separate boolean to turn this on coupled with a string (HTML) field. As far as I can see, implementing this requires these steps:
Does this look correct? Is something else required, e.g. for database migrations?
Allow embedding custom HTML code snippets to page404.html
The implementation might be slightly simpler than above(?). Basically the snippet would be empty by default. If defined, it would override or get prepended/appended the default page404.html.
Any thoughts regarding this? I could take a stab at implementing this myself as it looks deceptively simple to do 😂 .
The text was updated successfully, but these errors were encountered: