Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Antora top navigation bar customization

My question is quite simple though I cannot find anything that points to it in the documentation.

I am generating documentation for a project with the default generator in Antora but I cannot figure out how to customize the top navigation bar, items on the right side, which have some defaults.

Since the site is generated, where should I change, or how, those items? I do not want to list such items there.

like image 403
Germán Diago Avatar asked Dec 09 '18 09:12

Germán Diago


2 Answers

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.

like image 66
eskwayrd Avatar answered Oct 18 '22 00:10

eskwayrd


Yep, you need to build your own UI. The docs for that are available here: https://docs.antora.org/antora-ui-default/

Like Matt said, you'll need to check your header-content.hbs handlebars.

like image 26
Christoph Safferling Avatar answered Oct 18 '22 00:10

Christoph Safferling