diff --git a/.netlify/build.sh b/.netlify/build.sh index 7f89b8ca..3d4eb6ee 100755 --- a/.netlify/build.sh +++ b/.netlify/build.sh @@ -17,7 +17,11 @@ cp .netlify/_redirects netlify_build/ echo "/latest/* https://pyo3.github.io/pyo3/v${PYO3_VERSION}/:splat 200" >> netlify_build/_redirects ## Add landing page redirect -echo "" > netlify_build/index.html +if [ "${CONTEXT}" == "deploy-preview" ]; then + echo "" > netlify_build/index.html +else + echo "" > netlify_build/index.html +fi ## Build guide @@ -49,7 +53,3 @@ mkdir -p netlify_build/internal mv target/doc netlify_build/internal/ ls -l netlify_build/ - -# TODO: -# - netlify badges -# - apply for open source plan