-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website: keep previous patch release versions' URLs intact #4225
Comments
It looks like we could achieve the redirect using a hugo feature: Aliases: For every file
In that example, we'd add
to Generating the HTML via hugo, it would create stubs for every alias directory, as described here. |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. |
I think I've found a simpler way: #4598 has the wip. |
…elease This will result in the _redirects page having a bunch of entries like this: # previous minor versions /docs/v0.38.0/* /docs/v0.38.1/:splat /docs/v0.37.1/* /docs/v0.37.2/:splat /docs/v0.37.0/* /docs/v0.37.2/:splat /docs/v0.36.0/* /docs/v0.36.1/:splat /docs/v0.34.1/* /docs/v0.34.2/:splat /docs/v0.34.0/* /docs/v0.34.2/:splat /docs/v0.33.0/* /docs/v0.33.1/:splat /docs/v0.32.0/* /docs/v0.32.1/:splat Fixes open-policy-agent#4225. Signed-off-by: Stephan Renatus <[email protected]>
…elease (#4598) This will result in the _redirects page having a bunch of entries like this: # previous minor versions /docs/v0.38.0/* /docs/v0.38.1/:splat /docs/v0.37.1/* /docs/v0.37.2/:splat /docs/v0.37.0/* /docs/v0.37.2/:splat /docs/v0.36.0/* /docs/v0.36.1/:splat /docs/v0.34.1/* /docs/v0.34.2/:splat /docs/v0.34.0/* /docs/v0.34.2/:splat /docs/v0.33.0/* /docs/v0.33.1/:splat /docs/v0.32.0/* /docs/v0.32.1/:splat Fixes #4225. Signed-off-by: Stephan Renatus <[email protected]>
…elease (open-policy-agent#4598) This will result in the _redirects page having a bunch of entries like this: # previous minor versions /docs/v0.38.0/* /docs/v0.38.1/:splat /docs/v0.37.1/* /docs/v0.37.2/:splat /docs/v0.37.0/* /docs/v0.37.2/:splat /docs/v0.36.0/* /docs/v0.36.1/:splat /docs/v0.34.1/* /docs/v0.34.2/:splat /docs/v0.34.0/* /docs/v0.34.2/:splat /docs/v0.33.0/* /docs/v0.33.1/:splat /docs/v0.32.0/* /docs/v0.32.1/:splat Fixes open-policy-agent#4225. Signed-off-by: Stephan Renatus <[email protected]>
Currently, whenever there's a patch release, like
0.36.1
, that becomes the only displayed docs version in the version picker:That's fine. However, we also stop generating website content for the previous versions, so 0.36.0 disappears: https://www.openpolicyagent.org/docs/v0.36.0/ is a 404 now.
It would be preferable if those URLs stayed intact.
This could be achieved by some clever redirect logic, or by checking out all the releases in
load-docs.sh
, and only adding the latest ones of each minor series to the releases.yaml file.💭 I think the redirect approach would be preferable, since there's less static content to process. But I also don't know off-hand how to get that done.
The text was updated successfully, but these errors were encountered: