diff --git a/doc/source/_extra/.htaccess b/doc/source/_extra/.htaccess new file mode 100644 index 00000000..352c5f09 --- /dev/null +++ b/doc/source/_extra/.htaccess @@ -0,0 +1,5 @@ +# This file contains redirects to handle existing URLs for specs +# that have been moved +Redirect 301 /specs/train/image-encryption.rst /specs/ussuri/image-encryption.rst +Redirect 301 /specs/train/support-glance-multiple-backend.rst /specs/ussuri/support-glance-multiple-backend.rst +Redirect 301 /specs/train/query-cinder-resources-filter-by-time-comparison-operators.rst /specs/ussuri/query-cinder-resources-filter-by-time-comparison-operators.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 59574c27..0438b486 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -150,6 +150,10 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M' # template names. #html_additional_pages = {} +# Add any paths that contain "extra" files, such as .htaccess or +# robots.txt. +html_extra_path = ['_extra'] + # If false, no module index is generated. html_domain_indices = False diff --git a/doc/source/index.rst b/doc/source/index.rst index 52253324..efe56445 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -7,10 +7,6 @@ Block Storage Service Specifications (cinder) Ussuri approved specs ===================== -.. any patch adding a spec should remove the following line: - -* No specs have yet been approved. - .. toctree:: :glob: :maxdepth: 1 diff --git a/doc/test/redirect-tests.txt b/doc/test/redirect-tests.txt new file mode 100644 index 00000000..ed3d4d9f --- /dev/null +++ b/doc/test/redirect-tests.txt @@ -0,0 +1,6 @@ +# This file contains tests for redirects to handle existing URLs for +# specs that have been moved. See +# https://docs.openstack.org/whereto/latest/ for details. +/specs/train/image-encryption.rst 301 /specs/ussuri/image-encryption.rst +/specs/train/support-glance-multiple-backend.rst 301 /specs/ussuri/support-glance-multiple-backend.rst +/specs/train/query-cinder-resources-filter-by-time-comparison-operators.rst 301 /specs/ussuri/query-cinder-resources-filter-by-time-comparison-operators.rst diff --git a/specs/train/image-encryption.rst b/specs/ussuri/image-encryption.rst similarity index 100% rename from specs/train/image-encryption.rst rename to specs/ussuri/image-encryption.rst diff --git a/specs/train/query-cinder-resources-filter-by-time-comparison-operators.rst b/specs/ussuri/query-cinder-resources-filter-by-time-comparison-operators.rst similarity index 100% rename from specs/train/query-cinder-resources-filter-by-time-comparison-operators.rst rename to specs/ussuri/query-cinder-resources-filter-by-time-comparison-operators.rst diff --git a/specs/train/support-glance-multiple-backend.rst b/specs/ussuri/support-glance-multiple-backend.rst similarity index 100% rename from specs/train/support-glance-multiple-backend.rst rename to specs/ussuri/support-glance-multiple-backend.rst diff --git a/test-requirements.txt b/test-requirements.txt index f9b01a2b..62220d80 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,3 +7,4 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD flake8 yasfb>=0.5.1 doc8>=0.6.0 # Apache-2.0 +whereto>=0.3.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index af9a949a..8d8bd1c0 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ commands = rm -fr doc/build python setup.py build_sphinx doc8 --ignore D001 doc/source + whereto doc/source/_extra/.htaccess doc/test/redirect-tests.txt [testenv:pep8] commands =