1
0
Fork 0
forked from github/pelican

Add custom 404 page to Tips section of docs

This commit is contained in:
Justin Mayer 2015-01-11 18:54:15 -08:00
commit cff5f3e774

View file

@ -3,6 +3,32 @@ Tips
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
====================