Rename ALGOLIA_SEARCH variable to be more generic
What does this MR do and why?
Closes #1285 (closed)
Renames the ALGOLIA_SEARCH
environment variable and corresponding nanoc config value to SEARCH_BACKEND
.
This will allow for fewer code changes when changing the search backend in the future and adds flexibility for creating experimental builds with other search backends. The change should also make it clearer in the current build that Lunr is available and the search backend is configurable.
Screenshots, screen recordings, or links to review app
N/A
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Verify references to
ALGOLIA_SEARCH
are gone - Verify references to
config[:algolia_search]
are gone - Verify you can use the new environment variable to create local builds with either Lunr or Algolia, like this:
# Algolia build
SEARCH_BACKEND="algolia" bundle exec nanoc compile
# Lunr build
SEARCH_BACKEND="lunr" bundle exec nanoc compile
make build-lunr-index
Test search in each place it appears:
- Homepage
- Interior page navbar
-
/search
page
Expected behavior: no behavioral or visual changes from this MR.
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.