diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 22:41:43 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 450ce314c18603b045f0ce808f21c8577237ba83 (patch) | |
| tree | 73ad649da0a1e10af22effa40ff70d5c4d40e0b4 /docs/typ/html.typ | |
| parent | 989dcf395be7280240fc501ba1f07f75bacf91a3 (diff) | |
| download | pardes-450ce314c18603b045f0ce808f21c8577237ba83.tar.gz pardes-450ce314c18603b045f0ce808f21c8577237ba83.zip | |
docs/typ gets book and HTML wrappers over one chapter list
style.typ lists the chapters in reading order (guide, cheatsheet,
scripting, reference, building), each with its content file or none
while unwritten. book.typ sets them as an A4 book with a title page and
contents, the tutor read from src/tutor.txt last; html.typ sets them as
one HTML page with a nav of anchors. An unwritten chapter shows a
placeholder, so both compile before the topics exist.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ/html.typ')
| -rw-r--r-- | docs/typ/html.typ | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/typ/html.typ b/docs/typ/html.typ new file mode 100644 index 00000000..2b7277e6 --- /dev/null +++ b/docs/typ/html.typ @@ -0,0 +1,23 @@ +// The HTML documentation: one page holding every topic in reading order, +// each under an anchor named by its id, then the tutor. +// typst compile --root . --features html --format html docs/typ/html.typ pardes.html +// One page because Typst 0.15's HTML export writes one document per run. +#import "style.typ": chapters, tutor-path + +#set document(title: "pardes") + +#html.elem("nav", { + for ch in chapters [- #link(label(ch.id), ch.title)] + [- #link(<tutor>)[The tutor]] +}) + +#for ch in chapters [ + #heading(level: 1, ch.title) #label(ch.id) + #if ch.file == none [_This chapter is not written yet._] else { + set heading(offset: 1) + include ch.file + } +] + += The tutor <tutor> +#raw(read(tutor-path), block: true) |
