diff options
author | Sarah German <sgerman@gitlab.com> | 2023-07-13 01:52:23 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2023-07-13 01:52:23 +0300 |
commit | 264b3e820c56a63c48ce36c99a30ec63192e93ab (patch) | |
tree | 6f98b4e59caaa07d926dada12299a545d7d8b3d6 | |
parent | fff81b2f5c9751a99c80f26f80f81abaf243b58b (diff) |
Compress Lunr index files
-rw-r--r-- | .gitlab/ci/build-and-deploy.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | Makefile | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitlab/ci/build-and-deploy.gitlab-ci.yml b/.gitlab/ci/build-and-deploy.gitlab-ci.yml index 25e311cd..a0ba0e5b 100644 --- a/.gitlab/ci/build-and-deploy.gitlab-ci.yml +++ b/.gitlab/ci/build-and-deploy.gitlab-ci.yml @@ -41,7 +41,7 @@ # Create _redirects for Pages redirects - bundle exec rake redirects # Build the Lunr.js search index if needed - - if [[ "$SEARCH_BACKEND" == "lunr" ]]; then node scripts/lunr/preindex.js; fi + - if [[ "$SEARCH_BACKEND" == "lunr" ]]; then make build-lunr-index; fi # Minify the assets of the resulting site - mkdir dest/ - scripts/minify-assets.sh dest/ public/ @@ -135,6 +135,7 @@ clean: build-lunr-index: @printf "\n$(INFO)INFO: Building offline search index..$(END)\n" @node scripts/lunr/preindex.js + @find public/assets/javascripts -type f -name 'lunr*.json' -exec sh -c 'gzip -c "{}" > "{}.gz"' \; check-lunr-index: @printf "\n$(INFO)INFO: Checking if lunr.js is enabled...$(END)\n" |