10.2. toc
toc
automatically creates a table of contents from the<h1>
,<h2>
, etc. headers found in the HTML.
#use wml::std::toc #use wml::std::page <page /> <h1>My Page</h1> <p> This is my page </p> <h2>Section 1</h2> <p> This is section 1 </p> <h2>Section 2</h2> <p> This is section 2 </p> <h3>Sub-section 2.1</h3> <p> This is a subsection </p> <toc />