summaryrefslogtreecommitdiff
path: root/riki.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-11-09 15:56:55 +0200
committerLars Wirzenius <liw@liw.fi>2022-11-09 15:56:55 +0200
commit8f17b2a721d2369691ff2e3d4950a436aa9533ab (patch)
tree1041e81264145d66a5b168b82c546234b36d80cc /riki.md
parent249323a6009a35dd2e77be794ed45b5f1cf4263f (diff)
downloadriki-8f17b2a721d2369691ff2e3d4950a436aa9533ab.tar.gz
feat: implement rudimentary table of contents, without links
The links will be added later. Sponsored-by: author
Diffstat (limited to 'riki.md')
-rw-r--r--riki.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/riki.md b/riki.md
index 4c78f11..980e5b4 100644
--- a/riki.md
+++ b/riki.md
@@ -677,6 +677,26 @@ goodbye | cruel world
"""]]
~~~
+### `toc`
+
+_Requirement: the `toc` directive creates a table of contents._
+
+~~~scenario
+given an installed riki
+given file site/index.mdwn from toc
+when I run riki build site output
+when I run cat output/index.html
+then file output/index.html contains "<li>Introduction</li>"
+then file output/index.html contains "<li>Acknowledgements</li>"
+~~~
+
+~~~{#toc .file .markdown}
+[[!toc]]
+
+# Introduction
+## Acknowledgements
+~~~
+
## Source file tree
### Listing source files