Browse Source

Redirect links for config-openstack

Adds a redirect capabilities for the charm-deployment-guide for the
config-openstack.html to configure-openstack.html renaming. This also
adds whereto testing in order to validate and confirm that the redirect
links are working as intended.

Note, this will redirect the user from the config-openstack.html for any
of the release names. This may result in a 404 not found if an older
release is being accessed since the renaming/refactoring will not be
backported.

Co-Authored-By: Peter Matulis <peter.matulis@canonical.com>
Co-Authored-By: Billy Olsen <billy.olsen@canonical.com>

Change-Id: I61d2eabadd76c86fa63b49c6b7552bcb1ee20d67
changes/15/769415/3
Peter Matulis 5 months ago
committed by Billy Olsen
parent
commit
8c9c623b76
4 changed files with 20 additions and 1 deletions
  1. +2
    -1
      deploy-guide/source/_extra/.htaccess
  2. +16
    -0
      deploy-guide/test/redirect-tests.txt
  3. +1
    -0
      requirements.txt
  4. +1
    -0
      tox.ini

+ 2
- 1
deploy-guide/source/_extra/.htaccess View File

@ -1 +1,2 @@
Redirect 301 /config-openstack.html /configure-openstack.html
# Redirects related to gerrit topic 'cdg-reorg'
RedirectMatch 301 ^/project-deploy-guide/charm-deployment-guide/([^/]+)/config-openstack.html /project-deploy-guide/charm-deployment-guide/$1/configure-openstack.html

+ 16
- 0
deploy-guide/test/redirect-tests.txt View File

@ -0,0 +1,16 @@
# This file contains tests for redirects to handle existing URLs for
# documentation that has been moved. See
# https://docs.openstack.org/whereto/latest/ for details.
# No redirects
/ 200
/project-deploy-guide 200
/project-deploy-guide/charm-deployment-guide 200
/some/other/project/config-openstack.html 200
/project-deploy-guide/foo/config-openstack.html 200
# Refactoring docs moved config-openstack to configure-openstack
# Make sure new redirects work
/project-deploy-guide/charm-deployment-guide/victoria/config-openstack.html 301 /project-deploy-guide/charm-deployment-guide/victoria/configure-openstack.html
/project-deploy-guide/charm-deployment-guide/latest/config-openstack.html 301 /project-deploy-guide/charm-deployment-guide/latest/configure-openstack.html

+ 1
- 0
requirements.txt View File

@ -6,3 +6,4 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
whereto>=0.3.0 # Apache-2.0

+ 1
- 0
tox.ini View File

@ -13,3 +13,4 @@ commands = {posargs}
[testenv:deploy-guide]
commands = sphinx-build -a -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html
whereto deploy-guide/source/_extra/.htaccess deploy-guide/test/redirect-tests.txt

Loading…
Cancel
Save