Make Pagefind the search default for local sites
Most people who run local docs sites do not have Elasticsearch API keys for their local environments. This means they can't use search.
Let's adjust our build so that either:
A) Pagefind is the default, but you can override that by setting the SEARCH_BACKEND env var locally.
or
B) Elastic stays the default, but we fall back to Pagefind if the user does not have ELASTIC_API_KEY present.
We need to make sure that this does not change existing functionality:
- the
mainbranch/pre-release/production site,docs.gitlab.comuses Elastic - released versions use Pagefind
- review apps use Elastic unless
pagefindis in the branch name