diff --git a/doc/requirements.txt b/doc/requirements.txt index 349c9e8bd1..1b2f241311 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -4,3 +4,4 @@ sphinx>=1.6.2 # BSD oslosphinx>=4.7.0 # Apache-2.0 sphinxcontrib.datatemplates>=0.1.0 # BSD License icalendar>=3.10 # BSD +whereto>=0.3.0 # Apache-2.0 diff --git a/doc/source/_extra/.htaccess b/doc/source/_extra/.htaccess new file mode 100644 index 0000000000..401ff1a413 --- /dev/null +++ b/doc/source/_extra/.htaccess @@ -0,0 +1 @@ +redirect 301 /teams/shade.html /teams/openstacksdk.html diff --git a/doc/source/conf.py b/doc/source/conf.py index 0dd0bba1d7..fa8c3aacf4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -62,6 +62,8 @@ htmlhelp_basename = '%sdoc' % project git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1" html_last_updated_fmt = os.popen(git_cmd).read() +html_extra_path = ['_extra'] + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). diff --git a/doc/test/redirect-tests.txt b/doc/test/redirect-tests.txt new file mode 100644 index 0000000000..f6ff64fc4b --- /dev/null +++ b/doc/test/redirect-tests.txt @@ -0,0 +1 @@ +/teams/shade.html 301 /teams/openstacksdk.html diff --git a/tox.ini b/tox.ini index 0adce92868..73f3524661 100644 --- a/tox.ini +++ b/tox.ini @@ -63,7 +63,9 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt -commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html +commands = + sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html + whereto {toxinidir}/doc/source/_extra/.htaccess {toxinidir}/doc/test/redirect-tests.txt [flake8] # E123, E125 skipped as they are invalid PEP-8.