nikola plugin -i errorpages
This plugin allows to create HTTP error pages (
403.html, etc.) which can be used as error pages for your web server (for 404, 403, etc. errors). These pages never use relative links, no matter whether you use relative links for the rest of your blog or not.
To use this, you need a template
XXX.tmpl for every HTTP status code
XXX. The plugin provides simple templates
404.tmpl both for Mako and Jinja, but you can easily adjust them to your needs. These default templates assume that the strings
'Page not found' and
'The page you are trying to access does not exist. Please use your browser\'s "back" button to return to the previous page.' are translated. If your blog uses another language than English, you need to translate these strings yourself and provide the translations in your theme's
messages_XX.py files. Or (for simple one-language blogs) simply adjust the strings in
To tell the plugin which error pages to create, add
CREATE_HTTP_ERROR_PAGES to your
conf.py. This must be a list of error codes, like
# Create 404 error page CREATE_HTTP_ERROR_PAGES = 
for a 404 error page, and
# Create 401, 403 and 404 error pages CREATE_HTTP_ERROR_PAGES = [401, 403, 404]
for both 403 and 404 error pages. Note that you need to provide a
403.tmpl template for the latter example.
Note that this plugin requires version 7.8.1 of Nikola.
You can report issues with this plugin and request help via GitHub Issues.