summaryrefslogtreecommitdiff
path: root/docs/typ/html.typ
blob: 5f9082cd1c746e6ff123592301df1ddf98fd8525 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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, doc-links

#set document(title: "pardes")
#doc-links.update(true)

#html.elem("nav", {
  for ch in chapters [- #link(label("ch-" + ch.id), ch.title)]
  [- #link(<tutor>)[The tutor]]
})

#for ch in chapters [
  #heading(level: 1, ch.title) #label("ch-" + 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)