Table of contents (sidebar)

The sidebar table of contents (TOC) is a CSS and JavaScript component created by Stephen Morley and released under the terms of the CC0 1.0 Universal legal code.

The TOC structure is defined in a yml file in /_data/ (e.g. toc.yml) and assigned to the page toc variable.

The yml “structure” for a basic tree is shown below. Top level links are specified using a url variable for the target. You can optionaly specify the name to display for the link.

- folder: A folder
  contents:
   - url: /usingtheme/adoc.html
   - url: /usingtheme/adoc2.html

   - folder: Nested
     contents:
      - url: /usingtheme/somedoc.html
      - url: /usingtheme/somedoc2.html


- folder: A peer folder
  contents:
   - url: /test_collection/collection_test1_1.html
     name: Collection

   - url: /test_section/section_test1_1.html
     name: Section (folder)

Folders (and nested folders) are specified using the folder variable, with the individual urls defined as a yaml list under the contents variable as shown above.

The appearance and colours can be changed by altering navtree variables in /css/main.scss.