2869: change latest URL from netlify proxy to redirect r=davidhewitt a=davidhewitt

Now that we serve all gh-pages content in netlify, it's nicer to have this as a proper redirect rather than a rewrite. Then the user can see what version of the docs they have landed on.

Closes #2867 

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
This commit is contained in:
bors[bot] 2023-01-08 20:54:43 +00:00 committed by GitHub
commit 34b9445faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ mv pyo3-gh-pages netlify_build
# than check this in to the repo
cp .netlify/_redirects netlify_build/
# Add latest redirect (proxy)
echo "/latest/* https://pyo3.github.io/pyo3/v${PYO3_VERSION}/:splat 200" >> netlify_build/_redirects
# Add latest redirect
echo "/latest/* /v${PYO3_VERSION}/:splat" >> netlify_build/_redirects
## Add landing page redirect
if [ "${CONTEXT}" == "deploy-preview" ]; then