Rheo

HTML

Typst experimentally supports HTML. This means that not all Typst syntax will translate to a meaningful HTML structure. The most common features in everyday prose are all supported, however, such as text markup, links, headings, footnotes, and citations. For more information on which features are currently supported in Typst’s HTML export, refer to the HTML export tracking issue.

What Rheo adds

Where the Typst CLI produces a single HTML file, Rheo turns your project into a fully functional static site. Each Typst source file becomes its own HTML page, and relative links between files are automatically rewritten from .typ to .html so that navigation works in the browser.

Rheo also provides a development server with live reloading when you use the watch command, so you can see changes in the browser as you edit your source files:

rheo watch my-project --html --open

The HTML format supports configurable CSS and JavaScript entrypoints, as well as asset copying for additional files your site needs. These entrypoints are also the mechanism through which reading augmentations can be delivered – the tooltip example, for instance, uses a custom Typst function and a JavaScript entrypoint to provide inline tooltips in the HTML output.1

You can customize which files are included in the HTML output using a spine. By default, Rheo compiles all Typst files in the project; you can narrow this if you want to exclude certain files from the site:

[html.spine]
vertebrae = ["index.typ", "about.typ", "posts/*.typ"]
  1. 1Note that there is an experimental bundle format in upstream Typst which allows you to achieve similar results. We are tracking this closely, but for the time being have not incorporated this feature/format into Rheo on account of some critical deficiencies such as the inability to have multiple bibliographies in the same source file.