From 2c343492010f58ef4e2ce10f8db6108e7b7996f9 Mon Sep 17 00:00:00 2001 From: Remington Mallett Date: Thu, 30 Jan 2025 12:05:32 -0500 Subject: [PATCH] fix 404 page display --- docs/conf.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 8c581fb..b23706f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -669,3 +669,33 @@ # If it’s False, the Attributes section will be formatted as the Methods section using an autosummary table. # Options: True (default) | False numpydoc_attributes_as_param_list = True + +# -- External extensions ----------------------------------------------------- +# -- -> Options for notfound.extension ------------------------------------------------- +# https://sphinx-notfound-page.readthedocs.io/en/latest/configuration.html + +# Context passed to the template defined by `notfound_template` or auto-generated. +notfound_context = { + "title": "Page not found", + "body": """ +

This page may have moved.

+

+ The YASA documentation site has recently been upgraded! + Some URLs have changed. +

+

+ Browse the Navigation menu or use the + Search button to find the page you were looking for. +

+

+ Please update the URLs of any bookmarks or autofills in your + browser that point to the YASA documentation site. +

+ """, +} + +# Prefix added to all the URLs generated in the 404 page. +# Defaults to READTHEDOCS env variable, typically "/en/latest/" +# Note special case when using default GitHub pages URL: "//" +# https://sphinx-notfound-page.readthedocs.io/en/latest/faq.html#does-this-extension-work-with-github-pages +notfound_urls_prefix = "/yasa/"