Skip to content

Commit 53f2252

Browse files
JacobAdamsenJacob Hilmar Adamsen
andauthored
Add Sphinx redirects (#67)
* Add Sphinx redirects * Add HTML * Use relative folder paths * Only when not offline tags --------- Co-authored-by: Jacob Hilmar Adamsen <jha@anybodytech.com>
1 parent af77888 commit 53f2252

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

conf.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ def tagged_commit():
6363
"sphinx_togglebutton",
6464
"sphinxcontrib.youtube",
6565
"sphinx_simplepdf",
66-
"myst_nb"
66+
"myst_nb",
67+
"sphinx_reredirects"
6768
]
6869

6970
myst_enable_extensions = [
@@ -107,6 +108,14 @@ def tagged_commit():
107108

108109
gettext_compact = False
109110

111+
if not tags.has("offline"):
112+
redirects = {
113+
"Making_things_move/index" : "../Motion_Capture_Movement/index.html",
114+
"Making_things_move/lesson5" : "../Motion_Capture_Movement/lesson1.html",
115+
"Scaling/lesson3" : "../Scaling/index.html",
116+
"Scaling/lesson3_appendix" : "../Scaling/index.html",
117+
"Scaling/lesson4" : "../Scaling/index.html"
118+
}
110119

111120
# List of patterns, relative to source directory, that match files and
112121
# directories to ignore when looking for source files.

pixi.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ anypytools = ">=1.13.1,<2"
4343
scipy = ">=1.15.2,<2"
4444
ipywidgets = ">=8.1.5,<9"
4545
pydata-sphinx-theme = ">=0.15.4,<0.16"
46+
sphinx-reredirects = ">=1.0.0,<2"
4647

4748

4849
[feature.test.target.win-64.dependencies]

0 commit comments

Comments
 (0)