1.2. Combining Content#
We want to display each slide as a separate site but combine several slides into a single static webpage.
To do so we can use the following pattern in eachindex.md
file of a sub-folder in source/content
:
{% if build == "slides" %}
<!-- BUILDING THE SLIDES -->
```{toctree}
:maxdepth: 2
:caption: MySubSection
./slide1
./slide2
```
{% else %}
<!-- BUILDING THE PAGES -->
```{include} ./slide1.md
```
```{include} ./slide2.md
```
{% endif %}