diff --git a/deploy_website.sh b/deploy_website.sh index 0e780ea02a8d..548485944915 100755 --- a/deploy_website.sh +++ b/deploy_website.sh @@ -26,6 +26,29 @@ cd $DIR mv ./build/dokka/htmlMultiModule docs/5.x +# Redirect 4.x doc URLs to 5.x. +# The 4.x API docs were never published to gh-pages, so all /4.x/ URLs 404. +# Since 5.x is the direct successor, redirect there. +mkdir -p docs/4.x +cat > docs/4.x/index.html << 'REDIRECT' + + +
+ +OkHttp 4.x API docs are no longer published separately. Redirecting to 5.x API docs.
+ + +REDIRECT + # Copy in special files that GitHub wants in the project root. cat README.md | grep -v 'project website' > docs/index.md cp CHANGELOG.md docs/changelogs/changelog.md diff --git a/test_docs.sh b/test_docs.sh index fdf90a543556..93879bafec2f 100755 --- a/test_docs.sh +++ b/test_docs.sh @@ -16,6 +16,29 @@ set -ex mv ./build/dokka/html docs/5.x +# Redirect 4.x doc URLs to 5.x. +# The 4.x API docs were never published to gh-pages, so all /4.x/ URLs 404. +# Since 5.x is the direct successor, redirect there. +mkdir -p docs/4.x +cat > docs/4.x/index.html << 'REDIRECT' + + + + +OkHttp 4.x API docs are no longer published separately. Redirecting to 5.x API docs.
+ + +REDIRECT + # Copy in special files that GitHub wants in the project root. cat README.md | grep -v 'project website' > docs/index.md cp CHANGELOG.md docs/changelogs/changelog.md