Skip to content

Commit 4c5ddc9

Browse files
[libc][docs] add redirect for math/index.html (#120274)
commit a9aff44 ("[libc][docs] reorganize documentation (#118836)") moved https://libc.llvm.org/math/index.html to https://libc.llvm.org/headers/math/index.html which makes links from various slide decks stale. There's an extension for sphinx that can generate redirects. Add a dependency on that, then use it to create a redirect so that those older links still work. I was able to install this sphinx extension via: $ sudo apt install python3-sphinx-reredirects We may need to install this on whatever server generates the llvm documentation.
1 parent 1c16807 commit 4c5ddc9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libc/docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
# Add any Sphinx extension module names here, as strings. They can be extensions
2727
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28-
extensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo"]
28+
extensions = ["sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx_reredirects"]
2929

3030
# Add any paths that contain templates here, relative to this directory.
3131
templates_path = ["_templates"]
@@ -261,3 +261,5 @@
261261

262262
# Enable this if you want TODOs to show up in the generated documentation.
263263
todo_include_todos = True
264+
265+
redirects = {"math/index": "../headers/math/index.html"}

llvm/docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ recommonmark==0.7.1
55
sphinx-automodapi==0.17.0
66
sphinx-bootstrap-theme==0.8.1
77
sphinxcontrib-applehelp==1.0.8
8+
sphinx-reredirects==0.1.2
89
furo==2024.1.29
910
myst-parser==2.0.0

0 commit comments

Comments
 (0)