Skip to content

Commit c7c2a88

Browse files
committed
docs: redirect support
1 parent 80c0551 commit c7c2a88

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

.github/workflows/quality.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ jobs:
133133
with:
134134
persist-credentials: false
135135

136+
- name: "Fetch origin/main"
137+
# rediraffe needs to compare to origin/main
138+
run: |
139+
git fetch origin main --depth=1
140+
136141
- name: "Install Python"
137142
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
138143
with:

doc/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"sphinx.ext.intersphinx",
4040
"sphinxcontrib.restbuilder",
4141
"sphinx.ext.napoleon",
42+
"sphinxext.rediraffe",
4243
"sphinx_code_tabs",
4344
"sphinx_rtd_theme",
4445
]
@@ -125,6 +126,11 @@
125126
"python": ("https://docs.python.org/3", None),
126127
}
127128

129+
rediraffe_branch = "origin/master"
130+
rediraffe_redirects = {
131+
"cmd.rst": "commands/index.rst",
132+
}
133+
128134
nitpick_ignore = [
129135
("py:class", "DefaultValue"),
130136
("py:class", "FilePath"),

doc/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ sphinx-code-tabs
1717
sphinx-lint
1818
sphinxcontrib-restbuilder
1919
sphinxcontrib-spelling
20+
git+https://github.com/nedbat/sphinxext-rediraffe@nedbat/bug-58

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ commands =
8686
doc8 -q --ignore-path 'doc/_*' doc CHANGES.rst README.rst
8787
sphinx-lint doc CHANGES.rst README.rst
8888
sphinx-build -b html -aEnqW doc doc/_build/html
89+
sphinx-build -b rediraffecheckdiff doc/ doc/_build/html
8990
rst2html --verbose --strict README.rst doc/_build/README.html
9091
- sphinx-build -b html -b linkcheck -aEnq doc doc/_build/html
9192
- sphinx-build -b html -b linkcheck -aEnQW doc doc/_build/html

0 commit comments

Comments
 (0)