fix: redirect to the correct page for old doc versions

This commit is contained in:
Jose Diaz-Gonzalez
2022-09-05 20:58:29 -04:00
parent 344d2e83ad
commit e77e8d71bd

View File

@@ -48,7 +48,7 @@ main() {
if [[ "$major" -lt 1 ]]; then
if [[ "$current_version" != "$version" ]] && [[ "$minor" -lt 28 ]]; then
echo "rewrite ^/docs~$version/(.*)$ /docs~$current_version/\$1 last;" > "tmp/docs-build/nginx.conf.d/$version.conf"
echo "rewrite ^/docs~v$version/(.*)$ /docs~v$current_version/\$1 redirect;" > "tmp/docs-build/nginx.conf.d/$version.conf"
rm -rf "tmp/docs-build/docs~v${version}"
patch=$((patch - 1))
continue