Skip to content

Commit 2f11196

Browse files
authored
Add sphinx-notfound-page and sphinx-rediraffe for 404 and redirect handling (xarray-contrib#87)
* add sphinx-not-found 404 page * add extensions to env, add redirect
1 parent 6032580 commit 2f11196

File tree

5 files changed

+692
-305
lines changed

5 files changed

+692
-305
lines changed

_config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ repository:
5757
# Bibliography
5858
bibtex_bibfiles:
5959
- reference/references.bib
60+
61+
# Advanced configuration
6062
sphinx:
63+
extra_extensions:
64+
# 404 not found page
65+
- notfound.extension
66+
# maintain old paths and redirect them (so google results dont go to 404)
67+
# https://github.com/wpilibsuite/sphinxext-rediraffe
68+
- sphinxext.rediraffe
6169
config:
70+
notfound_context:
71+
body: "<h1>Whoops! 404 Page Not Found</h1>\n\n<p>Sorry, this page doesn't exist. Many sections of this book have been updated recently.</p><p> Try the search box 🔎 to find what you're looking for!</p>"
72+
notfound_urls_prefix: /
73+
74+
rediraffe_redirects:
75+
scipy-tutorial/00_overview.ipynb: overview/get-started.md
76+
6277
bibtex_reference_style: author_year # or label, super, \supercite

_toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ parts:
66
chapters:
77
- file: overview/get-started.md
88
- file: overview/xarray-in-45-min
9+
910
- caption: Fundamentals
1011
chapters:
1112
- file: fundamentals/01_datastructures_and_io
@@ -22,6 +23,7 @@ parts:
2223
chapters:
2324
- file: intermediate/01-high-level-computation-patterns
2425
- file: intermediate/xarray_and_dask
26+
2527
- caption: Advanced
2628
chapters:
2729
- file: advanced/parallelize-custom-functions
@@ -43,8 +45,6 @@ parts:
4345
- file: workshops/online-tutorial-series/03_computation
4446
- file: workshops/scipy2022/README
4547
sections:
46-
- url: https://tutorial.xarray.dev/fundamentals/00_overview
47-
title: Introduction
4848
- url: https://tutorial.xarray.dev/fundamentals/01_datastructures_and_io
4949
title: Data Structures
5050
- file: workshops/scipy2022/cleaning_real_data

0 commit comments

Comments
 (0)