There is an additional approach that does not require you to create a standalone UI: supplemental_files
In your playbook file, you can specify:
...
ui:
supplemental_files: <path to supplemental UI folder>
...
The supplemental UI folder provides replacement files for the UI, provided that they appear in the same structure as the UI that is in use.
So, to replace header-content.hbs
for the default UI, you would create this folder structure:
supplemental-ui/
partials/
header-content.hbs
You can see how this facility is used by exploring the repo for the Antora docs: https://gitlab.com/antora/docs.antora.org
You can replace any file used by the UI in this fashion, and add new files. You cannot remove files, but you can make their content empty. Altogether, this means that you can change any CSS, Javascript, partials, layouts, and provide any additional global UI assets as required.