docs: Add config for redirecting pages.
We want to be able to move pages around and have sphinx automatically redirect to the now location when that happens. This will allow us to re-organize safely as we figure out the best way to layout the documentation.
This commit is contained in:
@@ -20,3 +20,11 @@ clean:
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
update_redirects:
|
||||
# This updates redirects.txt, creating redirects for any files that have moved (relative to master).
|
||||
sphinx-build -b rediraffewritediff "$(SOURCEDIR)" "$(BUILDDIR)"
|
||||
|
||||
check_redirects:
|
||||
# Check to make sure that any files that got moved have a redirect in redirects.txt
|
||||
sphinx-build -b rediraffecheckdiff "$(SOURCEDIR)" "$(BUILDDIR)"
|
||||
|
||||
@@ -62,11 +62,16 @@ extensions = [
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinxcontrib.openapi',
|
||||
'sphinxext.rediraffe',
|
||||
'sphinx_design',
|
||||
'code_annotations.contrib.sphinx.extensions.featuretoggles',
|
||||
'code_annotations.contrib.sphinx.extensions.settings',
|
||||
]
|
||||
|
||||
# Rediraffe related settings.
|
||||
rediraffe_redirects = "redirects.txt"
|
||||
rediraffe_branch = 'origin/master'
|
||||
|
||||
# code_annotations.(featuretoggles|settings) related settings.
|
||||
edxplatform_repo_url = "https://github.com/openedx/edx-platform"
|
||||
edxplatform_source_path = os.path.abspath(
|
||||
|
||||
0
docs/guides/redirects.txt
Normal file
0
docs/guides/redirects.txt
Normal file
Reference in New Issue
Block a user