Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom 404 page #1577

Merged
merged 4 commits into from
May 20, 2020
Merged

Add custom 404 page #1577

merged 4 commits into from
May 20, 2020

Conversation

huonw
Copy link
Member

@huonw huonw commented May 19, 2020

This uses https://sphinx-notfound-page.readthedocs.io to add a custom 404 error
page, so that someone landing on our documentation can attempt to find something
useful, rather than having the completely link-less default RtD "maze" 404 page
(e.g. https://abasdfdas.readthedocs.io).

This gives two suggestions to a user who lands on an invalid page:

  • using the sidebar
  • doing a search, with a prefilled link by pulling out the alphanumeric parts of
    the URL path (ignoring the version section),
    e.g. /en/latest/demos/graph-classification/gcn.html gets turned into a link
    to a search for demos graph classification gcn (a potential improvement here
    would be to do that search directly in the 404 page)

Example:
https://stellargraph--1577.org.readthedocs.build/en/1577/demos/graph-classification/gcn.html

See: #1576

@codeclimate
Copy link

codeclimate bot commented May 19, 2020

Code Climate has analyzed commit bd336e3 and detected 0 issues on this pull request.

View more on Code Climate.

@huonw huonw force-pushed the feature/1576-rtd-404 branch from 0428b9e to 8318b5a Compare May 20, 2020 00:43
@huonw huonw requested review from kjun9 and timpitman May 20, 2020 02:04
@huonw huonw marked this pull request as ready for review May 20, 2020 02:04
Copy link
Contributor

@kjun9 kjun9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice 👍 seems to work well

@huonw huonw merged commit 370745c into develop May 20, 2020
@huonw huonw deleted the feature/1576-rtd-404 branch May 20, 2020 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants