remove fallback redirect for netlify -> gh-pages
This commit is contained in:
parent
94c568d746
commit
70c3260262
|
@ -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
|
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
@ -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__":
|
||||||
|
|
Loading…
Reference in New Issue