diff options
author | Evan Read <eread@gitlab.com> | 2023-05-24 02:03:20 +0300 |
---|---|---|
committer | Sarah German <sgerman@gitlab.com> | 2023-05-24 02:03:20 +0300 |
commit | 0c96aa16977ab70fe68aabdccf84d43940f98a66 (patch) | |
tree | 21abb4ef014af36e2f0aab7ce15ddbe3004ea066 /Makefile | |
parent | a4f510619d33856e33fab93fc700eb24a84e5ac9 (diff) |
Reorganize and refine the docs search documentation
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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" |