-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
404 page that inherits base.html #492
Comments
This is alluded to in the docs about pages. Create a page just like any other page (e.g., "About") but with status of "hidden". (By the way, feel free to ask questions like this via the IRC web chat.) Perhaps we should include an error page in the default templates that ship with Pelican. Anyone have an opinion on that idea? |
Great, but how can I set this page to be loaded on every 404 status? |
Yes! Sorry I thought I made that clear in the docs. @lucassmagal Since Pelican is all static content you will need to set this in your nginx/apache/lighthttpd config.
If you want to see an example on how I set up error pages in pelican check my blog's source https://github.com/tbunnyman/BunnyMan.info |
Ok, that's clear now. I'm using Rack::TryStatic in Heroku, but now I know how to solve it. Thank you! |
See getpelican/pelican#492 https://help.github.com/articles/custom-404-pages/ for details on 404 pages.
@justinmayer FWIW I think adding a 404 page in the default templates that ship with pelican would be great as it gives an idea of how these things can be achieved. |
A 404 page usually doesn't have different layout than any other page (only the content is different), so I'm not sure that it would need its own template. If anything, it should probably be done as a page that is created during the quick-start process. But that still leaves open the question of how to configure this at the web server level, which makes me wonder whether we should be doing this at all. |
This is true. But that information is missing IMO
A question saying "Create custom 404 page? [y/N]" might work?
Configuring this at the web server level is beyond the scope of pelican as such. So we shouldn't bother about that part, no?
One more thing we can do instead of this is to add a quick Tip in the Tips area of the docs? That might help. |
Agreed. Anyone want to submit a PR adding the relevant instructions to the Tips page? |
- Addresses getpelican#492
@justinmayer took a crack at it. Do check it out and give feedback. Thanks |
Hello,
I need create a custom 404 page that inherits base.html. How can I do it?
The text was updated successfully, but these errors were encountered: