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:
authorEvan Read <eread@gitlab.com>2023-05-24 02:03:20 +0300
committerSarah German <sgerman@gitlab.com>2023-05-24 02:03:20 +0300
commit0c96aa16977ab70fe68aabdccf84d43940f98a66 (patch)
tree21abb4ef014af36e2f0aab7ce15ddbe3004ea066 /Makefile
parenta4f510619d33856e33fab93fc700eb24a84e5ac9 (diff)
Reorganize and refine the docs search documentation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f2344a1a..17732709 100644
--- a/Makefile
+++ b/Makefile
@@ -52,9 +52,21 @@ update-all-docs-projects: update-gitlab update-gitlab-runner update-omnibus-gitl
up: setup view
+.PHONY: compile
compile:
- @printf "\n$(INFO)INFO: Compiling GitLab documentation site...$(END)\n"
+ifeq ($(SEARCH_BACKEND),lunr)
+ @printf "\n$(INFO)INFO: Compiling GitLab documentation site with Lunr.js search...$(END)\n"
@bundle exec nanoc compile || (printf "$(ERROR)ERROR: Compilation failed! Try running 'make setup'.$(END)\n" && exit 1)
+ $(MAKE) build-lunr-index
+else ifeq ($(SEARCH_BACKEND),google)
+ @printf "\n$(INFO)INFO: Compiling GitLab documentation site with Google Programmable Search...$(END)\n"
+ @bundle exec nanoc compile || (printf "$(ERROR)ERROR: Compilation failed! Try running 'make setup'.$(END)\n" && exit 1)
+else ifeq ($(SEARCH_BACKEND),)
+ @printf "\n$(INFO)INFO: No search backend specified. Compiling GitLab documentation site with Google Programmable Search...$(END)\n"
+ @bundle exec nanoc compile || (printf "$(ERROR)ERROR: Compilation failed! Try running 'make setup'.$(END)\n" && exit 1)
+else
+ @printf "\n$(ERROR)ERROR: Invalid search backend specified!$(END)\n" && exit 1
+endif
view: compile
@printf "\n$(INFO)INFO: Starting GitLab documentation site...$(END)\n"