Skip to content

Commit

Permalink
Merge pull request #2573 from davidhewitt/netlify-badge
Browse files Browse the repository at this point in the history
netlify: add badge, use github-pages domain rather than pyo3.rs
  • Loading branch information
davidhewitt committed Aug 21, 2022
2 parents 819a28b + cc0833a commit 34ed67a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .netlify/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mkdir netlify_build
cp .netlify/_redirects netlify_build/

# Add latest redirect (proxy)
echo "/latest/* https://pyo3.rs/v${PYO3_VERSION}/:splat 200" >> netlify_build/_redirects
echo "/latest/* https://pyo3.github.io/pyo3/v${PYO3_VERSION}/:splat 200" >> netlify_build/_redirects

## Add landing page redirect
echo "<meta http-equiv=refresh content=0;url=v${PYO3_VERSION}/>" > netlify_build/index.html
Expand Down
2 changes: 1 addition & 1 deletion .netlify/create_redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def main() -> None:
for version in versions:
version_without_v = version.lstrip("v")
print(f"/{version}/doc/* https://docs.rs/pyo3/{version_without_v}/:splat")
print(f"/{version}/* https://pyo3.rs/{version}/:splat 200")
print(f"/{version}/* https://pyo3.github.io/pyo3/{version}/:splat 200")


if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,5 @@ If you don't have time to contribute yourself but still wish to support the proj

PyO3 is licensed under the [Apache-2.0 license](https://opensource.org/licenses/APACHE-2.0).
Python is licensed under the [Python License](https://docs.python.org/3/license.html).

<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-accent.svg" alt="Deploys by Netlify" /> </a>

0 comments on commit 34ed67a

Please sign in to comment.