mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add custom 404 page to Tips section of docs
This commit is contained in:
parent
3b22dd4f2d
commit
cff5f3e774
1 changed files with 26 additions and 0 deletions
|
|
@ -3,6 +3,32 @@ Tips
|
||||||
|
|
||||||
Here are some tips about Pelican that you might find useful.
|
Here are some tips about Pelican that you might find useful.
|
||||||
|
|
||||||
|
Custom 404 Pages
|
||||||
|
================
|
||||||
|
|
||||||
|
When a browser requests a resource that the web server cannot find, the web
|
||||||
|
server usually displays a generic "File not found" (404) error page that can be
|
||||||
|
stark and unsightly. One way to provide an error page that matches the theme
|
||||||
|
of your site is to create a custom 404 page, such as this Markdown-formatted
|
||||||
|
example::
|
||||||
|
|
||||||
|
Title: Not Found
|
||||||
|
Status: hidden
|
||||||
|
Save_as: 404.html
|
||||||
|
|
||||||
|
The requested item could not be located. Perhaps you might want to check
|
||||||
|
the [Archives](/archives.html)?
|
||||||
|
|
||||||
|
The next step is to configure your web server to display this custom page
|
||||||
|
instead of its default 404 page. For Nginx, add the following to your
|
||||||
|
configuration file's ``location`` block::
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
|
||||||
|
For Apache::
|
||||||
|
|
||||||
|
ErrorDocument 404 /404.html
|
||||||
|
|
||||||
Publishing to GitHub
|
Publishing to GitHub
|
||||||
====================
|
====================
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue