By some reason, the sidebar resulting from the following _quarto.yml file displays the main section only, the actual value in number-depth
(eg, 3) seems ignored:
project:
type: website
website:
title: "Patatin Patatan"
navbar:
logo: "HSILab.png"
left:
- href: index.qmd
text: Home
- about.qmd
- citation.qmd
sidebar:
logo: "HSILab.png"
style: "docked"
search: true
number-sections: true
number-depth: 3
contents:
- section: "Introduction"
contents:
- 00_Abstract.qmd
- 01_Approach.qmd
- section: "Methods"
contents:
- 02_Methods.qmd
- section: "Results VISNIR"
contents:
- 03_Quality.qmd
- 04_ImageSequences.qmd
- 05_IQMosaics.qmd
- _051_SimpleReferencing.qmd
- _052_ImageStitching.qmd
- section: "Results SWIR"
contents:
- 06_SWIR.qmd
- section: "Conclusions"
contents:
- 07_Conclusions.qmd
format:
html:
theme: default
css: styles.css
toc: false
toc-location: right
code-fold: true
code-summary: "code"
page-layout: full
smooth-scroll: true
anchor-sections: true
editor: visual
Resulting sidebar:
number-depth
should not have an effect here. In particular, the documentation on Side Navigation does not list it as an available option. You could instead use approaches as described below.
The sidebar can be auto generated by using a suitable directory structure. For your example with the three levels you could use something like this:
.
├── _quarto.yml
├── index.qmd
└── 01_Section
├── index.qmd
├── 011_Subsection.qmd
└── 012_Subsection
├── index.qmd
├── 0121_Subsubsection.qmd
└── 0122_Subsubsection.qmd
As stated in the documentation:
Navigation item titles will be read from the
title
field of documents.
Hence you could use the following contents for obtaining the result shown at the end of the answer.
Use contents: auto
:
...
sidebar:
style: "docked"
search: true
contents: auto
...
---
title: "Section 1"
---
---
title: "Subsection 1.1"
---
---
title: "Subsection 1.2"
---
---
title: "Subsubsection 1.2.1"
---
---
title: "Subsubsection 1.2.2"
---
You can define a third level section
and contents
, e.g. such that your _quarto.yml
contains something like this:
sidebar:
style: "docked"
search: true
contents:
- section: "Section 1"
contents:
- 01_ImageSequences.qmd
- section: "Subsection 1.2"
contents:
- text: "Subsubsection 1.2.1"
href: _011_SimpleReferencing.qmd
- text: "Subsubsection 1.2.2"
href: _012_ImageStitching.qmd