Create a CI job to build a lunr.js version of the site with each release
For &8937 (closed).
-
Update the .gitlab-ci.yml
file to add one more job and build the archived version pushed to a new registry folder (registry.gitlab.com/gitlab-org/gitlab-docs/archives
). -
Find out how to make use of the index script make build-lunr-index
.
How different search builds work
If ALGOLIA_SEARCH=true
, Nanoc builds with Algolia in the page templates.
We define that variable in our CI configuration:
- Production: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/.gitlab/ci/build-and-deploy.gitlab-ci.yml#L45 (Algolia)
- Review apps: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/.gitlab/ci/build-and-deploy.gitlab-ci.yml#L56 (review apps use Lunr currently; eventually we'd like to be able to deploy Algolia in a review app as needed, see #1277 (closed))
And with a fallback in Nanoc code here:
- https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/Rules#L43 (this should only affect a local site; opts for Algolia)
Edited by Achilleas Pipinellis