27
27
# 1) Make a release-NN branch as normal.
28
28
# 2) Update VERSIONS below (on main) to include the new version, and remove the oldest
29
29
# Order matters :-), Most recent first.
30
- VERSIONS=(" 1.19" " 1.18" " 1.17" ) # Docs version, results in the url e.g. knative.dev/docs-1.9 /..
30
+ VERSIONS=(" 1.19" " 1.18" " 1.17" ) # Docs version, results in the url e.g. knative.dev/v1.9-docs /..
31
31
# 4) PR the result to main.
32
32
# 5) Party.
33
33
@@ -41,16 +41,16 @@ readonly SITE=$PWD/site
41
41
rm -rf site/
42
42
43
43
if [ " $BUILD_VERSIONS " == " no" ]; then
44
- # HEAD to /docs if we're not doing versioning.
45
- mkdocs build -f mkdocs.yml -d site/docs
44
+ # HEAD to root if we're not doing versioning.
45
+ mkdocs build -f mkdocs.yml -d site
46
46
else
47
47
# Versioning: pre-release (HEAD): docs => development/
48
48
cp -r . $TEMP /docs-main
49
49
curl -f -L --show-error https://raw.githubusercontent.com/knative/serving/main/docs/serving-api.md -s > " $TEMP /docs-main/docs/serving/reference/serving-api.md"
50
50
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/main/docs/eventing-api.md -s > " $TEMP /docs-main/docs/eventing/reference/eventing-api.md"
51
51
pushd " $TEMP /docs-main" ; mkdocs build -f mkdocs.yml -d $SITE /development; popd
52
52
53
- # Latest release branch to /docs
53
+ # Latest release branch to root
54
54
git clone --depth 1 -b ${DOCS_BRANCHES[0]} https://github.com/${GIT_SLUG} " $TEMP /docs-$latest "
55
55
56
56
if [ ${latest#* 1.} -gt 6 ]; then
61
61
curl -f -L --show-error https://raw.githubusercontent.com/knative/eventing/${DOCS_BRANCHES[0]} /docs/eventing-api.md -s > " $TEMP /docs-$latest /docs/reference/api/eventing-api.md"
62
62
fi
63
63
64
- pushd " $TEMP /docs-$latest " ; KNATIVE_VERSION=" ${VERSIONS[0]} .0" SAMPLES_BRANCH=" ${DOCS_BRANCHES[0]} " mkdocs build -d $SITE /docs ; popd
64
+ pushd " $TEMP /docs-$latest " ; KNATIVE_VERSION=" ${VERSIONS[0]} .0" SAMPLES_BRANCH=" ${DOCS_BRANCHES[0]} " mkdocs build -d $SITE ; popd
65
65
66
66
# Previous release branches release-$version to /v$version-docs
67
67
versionjson=" "
@@ -107,25 +107,7 @@ cp golang/*.html site/golang/
107
107
cat golang/_redirects >> site/_redirects
108
108
109
109
110
- # Home page is served from docs, so add a redirect.
111
- cat << EOF > site/index.html
112
- <!DOCTYPE html>
113
- <html>
114
- <head>
115
- <meta charset="utf-8">
116
- <title>Redirecting</title>
117
- <noscript>
118
- <meta http-equiv="refresh" content="1; url=docs/" />
119
- </noscript>
120
- <script>
121
- window.location.replace("docs/");
122
- </script>
123
- </head>
124
- <body>
125
- Redirecting to <a href="docs/">docs/</a>...
126
- </body>
127
- </html>
128
- EOF
110
+ # Home page is now served directly from root, no redirect needed
129
111
130
112
# Clean up
131
113
rm -rf $TEMP
0 commit comments