DOC-4344: Add Algolia site keys to playbooks #121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira: DOC-4344
This PR updates the DocSearch script configuration to use variables instead of explicit hard-coded values. In this paradigm, the UI now depends on the playbook to supply the corresponding values (in this case using
site.keys
).In addition, I've added conditional logic such that if any of the variables is missing or undefined in the playbook, then the script doesn't get generated (and the search box doesn't appear in the UI). I felt that this was more ideal than loading a non-functional search box if the values weren't supplied. If this isn't the desired behavior, then we might consider adding default values to the build logic so that we at least ensure that a valid configuration is supplied.
IMPORTANT: We must merge https://github.com/riptano/datastax-docs-site/pull/157 first before implementing the UI changes in this PR.