New doc site

This commit is contained in:
Lucien Greathouse
2019-06-21 17:44:08 -07:00
parent b511d4ba53
commit bb8a3e82e6
2 changed files with 17 additions and 6 deletions

10
bin/docs-index.html Normal file
View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>redirect</title>
<meta http-equiv="refresh" content="0;url=/docs/latest" />
</head>
<body>
</body>
</html>

View File

@@ -1,31 +1,32 @@
#!/bin/sh
# Kludged documentation generator to support multiple versions.
# Make sure the `site` folder is a checkout of this repository's `gh-pages`
# branch.
set -e
REMOTE=$(git remote get-url origin)
CHECKOUT="$(mktemp -d)"
OUTPUT="$(pwd)/site"
OUTPUT="$(pwd)/site/docs"
if [ -d site ]
then
cd site
git pull
else
git clone "$REMOTE" site
git clone https://github.com/rojo-rbx/rojo-rbx.github.io site
cd site
git checkout gh-pages
fi
rm -rf docs
mkdir docs
cp ../bin/docs-index.html docs/index.html
git clone "$REMOTE" "$CHECKOUT"
cd "$CHECKOUT"
echo "Building master"
git checkout master
mkdocs build --site-dir "$OUTPUT"
mkdocs build --site-dir "$OUTPUT/latest"
echo "Building 0.5.x"
mkdocs build --site-dir "$OUTPUT/0.5.x"