Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2023-07-13 01:52:23 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2023-07-13 01:52:23 +0300
commit264b3e820c56a63c48ce36c99a30ec63192e93ab (patch)
tree6f98b4e59caaa07d926dada12299a545d7d8b3d6
parentfff81b2f5c9751a99c80f26f80f81abaf243b58b (diff)
Compress Lunr index files
-rw-r--r--.gitlab/ci/build-and-deploy.gitlab-ci.yml2
-rw-r--r--Makefile1
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/
diff --git a/Makefile b/Makefile
index de21d07c..2f275ad0 100644
--- a/Makefile
+++ b/Makefile
@@ -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"