Redirect old-style 0.13.0 documentation to the new - #178
Merged
Conversation
Why:
I want to re-use the redirect layout from some HTML frontmatter, and
you cannot use liquid templating nicely in the Jekyll frontmatter to
create an absolute url like "target: {{"/path/to/target" | absolute_url}}".
I want to use root relative paths so that it works when there is a base
url.
In future the layout would need adjustment if we wanted it to handle
absolute redirect targets, maybe passing a different property to the
page, or sniffing the first N characters for http:/https:
Signed-off-by: Robert Young <robertyoungnz@gmail.com>
This change ensures that /docs/v0.13.0/* urls HTML redirect to their equivalent location under /documentation/0.13.0/ After the release we have since moved to a new mechanism where HTML docs are generated in the core repo and copied into this one. So we have two copies of the docs. Signed-off-by: Robert Young <robertyoungnz@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change ensures that
/docs/v0.13.0/*urls HTML redirect to their equivalent location under/documentation/0.13.0/After the release we have since moved to a new mechanism where HTML docs are generated in the core repo and copied into this one. So we have two copies of the docs committed. This removes the asciidoc version.
To achieve this I changed the redirect layout so that the
page.targetproperty is expected to be a path relative to the base url (and updated the error data file for 0.13.0). Unfortunately you can't use Jekyll liquid templating in the frontmatter, sotarget: {{ /path/to/page | absolute_url }}is impossible.