Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to collapse sections by default separately #374

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Sep 8, 2023

It's now possible to choose specific sections in the sidebar navigation that should be collapsed by default, as opposed to all sections.

In antora.yml for the component, set the attribute page-sidebar-collapse-default to a string of comma-separated navigation sections:

asciidoc: 
  attributes:
    page-sidebar-collapse-default: 'Tutorials,Other'

If nav.adoc looks like below, only the Tutorials section will start collapsed.

* xref:index.adoc[Overview]

.Reference
* xref:javascript.adoc[JavaScript]
* xref:perl.adoc[Perl]

.Tutorials
* xref:a-tutorial.adoc[A Tutorial]
* xref:another-tutorial.adoc[Another Tutorial]

CC @cairoeth

@frangio frangio merged commit f01ced6 into master Sep 8, 2023
@frangio frangio deleted the collapse-per-section branch September 8, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant