Skip to content

Commit

Permalink
Redirect docs.pipelinesascode.com to latest
Browse files Browse the repository at this point in the history
we would show all versions but i think people would expect latest and
they still have the option to select other version with the version
dropdown selector.
  • Loading branch information
chmouel committed Feb 5, 2024
1 parent 00b6cfa commit 3e2878f
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions hack/gendocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,17 @@ for i in $output; do
git clean -f .
done

latest=${output/ *//}
# generate simple HTML
cat <<EOF >${versiondir}/index.html
<html>
<head>
<title>OpenShift Pipelines as Code versions Documentation</title>
</head>
<body>
<div style="text-align: center;width: 100%">
<h1>Pipeline as Code versions Documentation</h1>
EOF

for i in $output; do
cat <<EOF >>${versiondir}/index.html
<a href="./${i}">${i}</a><br>
EOF
done

cat <<EOF >>${versiondir}/index.html
</div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenShift Pipelines as Code versions Documentation</title>
<meta http-equiv="refresh" content="0;URL='./${latest}'" />
</head>
<body>
<p>This page has moved to a <a href="./${latest}">
./${latest}</a>.</p>
</body>
</html>
EOF

0 comments on commit 3e2878f

Please sign in to comment.