Skip to content

Commit 811f689

Browse files
[libc][docs] add redirect for math/index.html
commit a9aff44 ("[libc][docs] reorganize documentation (llvm#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 e8a6563 commit 811f689

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

libc/docs/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
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 = [
29+
"sphinx.ext.intersphinx",
30+
"sphinx.ext.todo",
31+
"sphinx_reredirects"
32+
]
2933

3034
# Add any paths that contain templates here, relative to this directory.
3135
templates_path = ["_templates"]
@@ -261,3 +265,7 @@
261265

262266
# Enable this if you want TODOs to show up in the generated documentation.
263267
todo_include_todos = True
268+
269+
redirects = {
270+
"math/index": "../headers/math/index.html"
271+
}

0 commit comments

Comments
 (0)