Skip to content

Commit 7823113

Browse files
committed
document the page-toctitle and page-toclevels page attributes
1 parent f19d673 commit 7823113

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

docs/modules/ROOT/pages/template-customization.adoc

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,63 @@ asciidoc:
9494
----
9595

9696
You can now turn page pagination off by unsetting the `page-pagination` attribute in the document header.
97+
98+
== page-toctitle attribute
99+
100+
By default, the title (i.e., heading) text for the automatic TOC in the right-hand sidebar of the page is `Contents`.
101+
You can set the `page-toctitle` page attribute in the page header to customize this text for a given page.
102+
103+
NOTE: Antora does not use the built-in `toctitle` attribute from AsciiDoc.
104+
105+
.Customize the TOC title for a page
106+
[,asciidoc]
107+
----
108+
= Page Title
109+
:page-toctitle: Outline
110+
111+
== Section Title
112+
113+
Paragraph text.
114+
----
115+
116+
You can define this value in the playbook to set it globally.
117+
118+
.Customize the TOC title for all pages
119+
[,yaml]
120+
----
121+
asciidoc:
122+
attributes:
123+
page-toctitle: Outline
124+
----
125+
126+
Alternately, you can override the [.path]_toc.hbs_ template if you want to hard-code the value, consult a different attribute, or change the defaut value.
127+
128+
== page-toclevels attribute
129+
130+
By default, the the automatic TOC in the right-hand sidebar of the page shows two levels of headings.
131+
You can set the `page-toclevels` page attribute in the page header to customize this depth for a given page.
132+
133+
NOTE: Antora does not use the built-in `toclevels` attribute from AsciiDoc.
134+
135+
.Customize the TOC levels for a page
136+
[,asciidoc]
137+
----
138+
= Page Title
139+
:page-toclevels: 1
140+
141+
== Section Title
142+
143+
Paragraph text.
144+
----
145+
146+
You can define this value in the playbook to set it globally.
147+
148+
.Customize the TOC title for all pages
149+
[,yaml]
150+
----
151+
asciidoc:
152+
attributes:
153+
page-toclevels: 1
154+
----
155+
156+
Alternately, you can override the [.path]_toc.hbs_ template if you want to hard-code the value, consult a different attribute, or change the default value.

0 commit comments

Comments
 (0)