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
main
branch/pre-release/production site,docs.gitlab.com
uses Elastic - released versions use Pagefind
- review apps use Elastic unless
pagefind
is in the branch name