diff --git a/docs/README.md b/docs/README.md index 15b2eb7ef62..74b49fc4b28 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,6 +11,7 @@ Look at `build.sh` script to see how it works. * Update [index.html](index.html) to redirect to the latest version automatically. * Update theme/base.html to add a new version to the Javascript arrray of versions * Create a new YAML file, like `5.5.1.yaml` if you are releasing version 5.5.1 +* Update `TELEPORT_DOCS_LATEST_VERSION` variable in `gravitational/web/Makefile` ## Deploying diff --git a/docs/build.sh b/docs/build.sh index 21f93f11d28..b540f52c3de 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -11,8 +11,12 @@ rm -f latest.yaml # build css files sass -C --precision 9 --sourcemap=none theme/src/index.scss:theme/css/teleport-bundle.css +# will be set to the latest version after the loop below +doc_ver="" + for conf_file in $(ls *.yaml | sort); do - echo "Building docs version --> $conf_file" + doc_ver=${conf_file%.yaml} + echo "Building docs version --> $doc_ver" mkdocs build --config-file $conf_file || exit $? done @@ -24,3 +28,8 @@ ln -fs $conf_file latest.yaml # copy the index file which serves /docs requests and redirects # visitors to the latest verion of QuickStart cp index.html ../build/docs/index.html + +# create a symlink to the latest +cd ../build/docs +rm -f latest +ln -s $doc_ver latest diff --git a/docs/index.html b/docs/index.html index 778197e1d23..bc5d64c9d71 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,10 +6,10 @@ --> - + - Teleport QuickStart Guide + Teleport QuickStart Guide diff --git a/docs/theme/base.html b/docs/theme/base.html index b334c452df7..57436358253 100644 --- a/docs/theme/base.html +++ b/docs/theme/base.html @@ -41,7 +41,7 @@ // configure UI components window.grvConfig = window.grvConfig || { - docVersions: ["1.3", "2.0", "2.3", "2.4"], + docVersions: ["1.3", "2.0", "2.3", "2.4", "2.5"], docCurrentVer: "{{ config.extra.version }}" }