python-openstackclient/doc/source/_extra/.htaccess
Eric Fried da3c3bde24 image: autogenerate docs
$namespace = openstack.image.v{1|2}

The subcommand documents for $namespace were hardcoded and thus prone to
drift over time. This commit removes the hardcoded content and uses the
autoprogram-cliff directive to generate them automatically from the
subcommand configuration classes.

Some reorganization happened here. The `image` subcommand name is shared
by image v1 and v2. Previously the hardcoded document had them combined
and interleaved. Attempting to preserve this with autoprogram-cliff
would have required significant additional infrastructure. However,
since most readers care completely about one and not at all about the
other, we instead split the v1 and v2 versions of these commands into
separate pages. In case links to the old pages exist in the wild, they
are preserved, but moved (with redirects) to a hidden directory, and
populated simply with links to the new version-specific generated
documents.

Change-Id: I24dc6dc10671c7f1267c27002542f61f8a3c18ae
2020-06-08 16:34:28 -05:00

17 lines
1.4 KiB
ApacheConf

# Redirect docs from the old to new location following the Great Docs Migration of 2017
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-objects/([^/.]+).html$ /python-openstackclient/$1/cli/command-objects/$2.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/(authentication|backward-incompatible|command-list|commands|decoder|interactive).html$ /python-openstackclient/$1/cli/$2.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands/index.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/specs/([^/.]+).html$ /python-openstackclient/$1/contributor/specs/$2.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/(command-(beta|errors|logs|options|wrappers)|developing|humaninterfaceguide|plugins).html$ /python-openstackclient/$1/contributor/$2.html
redirectmatch 301 ^/python-openstackclient/([^/]+)/cli/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands/index.html
# For common subcommand names:
# - identity pages were split into -v2 and -v3
# - image pages were split into -v1 and -v2
# The unversioned page is hidden but contains links to the versioned pages so links in the wild redirect somewhere sane.
redirectmatch 301 ^/python-openstackclient/([^/]+)/cli/command-objects/(ec2-credentials|endpoint|image|project|role|service|token|user).html$ /python-openstackclient/$1/cli/_hidden/$2.html