Redirect docs.o.o/repo always to /latest

We need to redirect for all links, not only for services with service
types.

Currently https://docs.openstack.org/horizon/ and
https://docs.openstack.org/openstack-ansible/ and
https://docs.openstack.org/openstackdocstheme/ do not redirect.

This change is not complete, it only covers horizon. The other two types
of projects (not listed in latest.yaml) are not covered.

Change-Id: I8df6f734b97bbc5d3adf0c040a59031e44f46542
This commit is contained in:
Andreas Jaeger 2017-07-04 18:18:38 +02:00 committed by Doug Hellmann
parent 95712acc0c
commit 56b54ca73d

View File

@ -555,8 +555,6 @@ redirectmatch 302 "^/{{project.service_type|lower}}/.*$" /{{project.name}}/lates
# Redirects from code-name without a series to latest
{% for project in projects -%}
{%- if project.type == 'service' and project.service_type %}
redirectmatch 301 "^/{{project.name}}/$" /{{project.name}}/latest/
{%- endif %}
{%- endfor %}
# End code-name redirects