riptano / docs-ui

The UI and theme for DataStax Docs.
https://riptano.github.io/docs-ui/
Mozilla Public License 2.0
2 stars 0 forks source link

DOC-4344: Add Algolia site keys to playbooks #121

Closed eric-schneider closed 5 months ago

eric-schneider commented 5 months ago

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.

mlr commented 5 months ago

UI bundle preview build successful! :white_check_mark: Deploying preview to GitHub Pages. Deployment successful! View preview

mlr commented 5 months ago

Antora site build successful! :white_check_mark: Deploying draft to GitHub Pages. Deployment successful! View draft