Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-notfound-page-0.2.linux-x86_64.tar.gz (12.2 kB view details)

Uploaded Source

File details

Details for the file sphinx-notfound-page-0.2.linux-x86_64.tar.gz.

File metadata

  • Download URL: sphinx-notfound-page-0.2.linux-x86_64.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for sphinx-notfound-page-0.2.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 6987421531094cdea12f98cf4f5b89b8c1be25ce2bfad7f37f1d6b0b8b290e5d
MD5 6e739c134d9dc92f5dd6fc91c2df4fa8
BLAKE2b-256 33c91255133bfd57a40684360b59394a00b2894218ae52c776d490c3c180fe29

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page