Sphinx extension to build a 404 page with absolute URLs
Project description
Create a custom 404 page with absolute URLs hardcoded.
Installation
pip install sphinx-notfound-page
Configuration
Add this extension in your conf.py file as:
extensions = [
# ... other extensions here
'notfound.extension',
]
Customization
There are some configs that you can modify in your conf.py file,
- notfound_template (str)
Default: 'page.html'
- notfound_context (dict)
Default: {'body': '<h1>Page not found</h1>\n\nThanks for trying.'}
- notfound_pagename (str)
Default: '404'
- notfound_default_language (str)
Default: 'en'
- notfound_default_version (str)
Default: 'latest'
Thanks
Strongly based on @ericholscher’s solution from https://github.com/rtfd/readthedocs.org/issues/353
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for sphinx-notfound-page-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3002b832468764840cc5928027fd43e2473129cc025bfeede27889814e46a66d |
|
MD5 | 6aed4eb1cff4c3e835653eeb35d95f28 |
|
BLAKE2b-256 | c94936e0667d4f32e55ae9ef8841c80a4ea657af840a6d24f90ca689a44ecb55 |