Remove dependency on supplemental UI
We want an Antora user to be able to install (npm i
) and register (--extension
) this extension without needing to do any other steps. Currently, the user also has to configure a supplemental UI. This extra step is problematic for two reasons. First, it makes the extension more difficult to set up. Second, it requires the user to maintain files that pertain to the extension which may live outside the extension*.
The extension should hide the details of augmenting the UI by using automatically inserting the extra files into the loaded UI bundle from the extension. For some files, this may require defining a contract with the UI for files it looks for. For example, if the SITE_SEARCH_PROVIDER
env var is set, the UI should load the search-scripts
partial somewhere in the footer. A similar contract is needed for the search input. The documentation should explain this contract so that a custom UI can be designed to support search extensions (and this one, in particular).
(*) It's possible for the user to point to the supplemental UI provided by this package under node_modules, but that prevents the user from using the supplemental UI for other purposes.