spring-io / antora-ui-spring

Mozilla Public License 2.0
13 stars 26 forks source link

Add redirect support #221

Closed philwebb closed 3 months ago

philwebb commented 3 months ago

Add a new 'redirect' layout that can be used to as a target of an Apache HTTPD rewrite rule in order to perform redirects based on a page or anchor.

Redirect pages can be written in asciidoc in the following form:

:page-layout: redirect

* xref:<new-location>[<previous-page><#previous-anchor>] ...
philwebb commented 3 months ago

@oodamien Myself and @rwinch discussed this feature today but I want to make sure you're OK with it as well. It's a somewhat hidden feature that I would like to use for Spring Boot legacy redirects.

Although adding it to the UI isn't perhaps ideal, it's a lot less effort than trying to create a new Antora extension. It's very isolated so I don't think it will break any existing users and it will probably only be used by Spring Boot.

This is our current redirect file