diff --git a/404.rst b/404.rst new file mode 100644 index 0000000..6d28f42 --- /dev/null +++ b/404.rst @@ -0,0 +1,11 @@ +:orphan: + +The Requested Page Was Not Found +================================ + +The page you were searching for does not exist. Please view the sidebar for a list of available pages. + +.. image:: images/404-oh-no.png + :alt: + +"oh no" comic credit to `Dorris Comics `__ diff --git a/conf.py b/conf.py index eb7e8bc..891fef5 100644 --- a/conf.py +++ b/conf.py @@ -10,7 +10,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os # import sys # sys.path.insert(0, os.path.abspath('.')) @@ -28,9 +28,20 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx_tabs.tabs', 'sphinx_sitemap' + 'sphinx_tabs.tabs', 'sphinx_sitemap', 'notfound.extension' ] +master_doc = "index" + +# Only one langauge supported, no URL prefix +# This is only needed when deploying a non-RTD server +on_rtd = os.environ.get('READTHEDOCS') == 'True' + +if on_rtd: + notfound_no_urls_prefix = False +else: + notfound_no_urls_prefix = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/images/404-oh-no.png b/images/404-oh-no.png new file mode 100644 index 0000000..f3f13c4 Binary files /dev/null and b/images/404-oh-no.png differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9ae4c23 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +sphinx_sitemap +sphinx-tabs +sphinx-notfound-page \ No newline at end of file