remove fallback redirect for netlify -> gh-pages

This commit is contained in:
David Hewitt 2023-01-08 19:45:19 +00:00
parent 94c568d746
commit 70c3260262
3 changed files with 1 additions and 4 deletions

View File

@ -69,4 +69,3 @@
/v0.9.0-alpha.1/doc/* https://docs.rs/pyo3/0.9.0-alpha.1/:splat /v0.9.0-alpha.1/doc/* https://docs.rs/pyo3/0.9.0-alpha.1/:splat
/v0.9.1/doc/* https://docs.rs/pyo3/0.9.1/:splat /v0.9.1/doc/* https://docs.rs/pyo3/0.9.1/:splat
/v0.9.2/doc/* https://docs.rs/pyo3/0.9.2/:splat /v0.9.2/doc/* https://docs.rs/pyo3/0.9.2/:splat
/* https://pyo3.github.io/pyo3/:splat 200

View File

@ -7,7 +7,7 @@ rustup default nightly
PYO3_VERSION=$(cargo search pyo3 --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"') PYO3_VERSION=$(cargo search pyo3 --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"')
## Start from the existing gh-pages content. ## Start from the existing gh-pages content.
## By servicng it over netlify, we can have better UX for users because ## By serving it over netlify, we can have better UX for users because
## netlify can then redirect e.g. /v0.17.0 to /v0.17.0/ ## netlify can then redirect e.g. /v0.17.0 to /v0.17.0/
## which leads to better loading of CSS assets. ## which leads to better loading of CSS assets.

View File

@ -14,8 +14,6 @@ def main() -> None:
version_without_v = version.lstrip("v") version_without_v = version.lstrip("v")
# redirect doc requests to docs.rs # redirect doc requests to docs.rs
print(f"/{version}/doc/* https://docs.rs/pyo3/{version_without_v}/:splat") print(f"/{version}/doc/* https://docs.rs/pyo3/{version_without_v}/:splat")
# fallback to github-pages for content not yet copied to netlify
print(f"/* https://pyo3.github.io/pyo3/:splat 200")
if __name__ == "__main__": if __name__ == "__main__":