How to get the generated HTML in Typst?

TL;DR: for postprocessing; I could’ve used an external CLI tool but it won’t be portable, and would be tedious to set up compared to a simple #import "..." statement

I want to add both Tailwind CSS and Pagefind support for my website. For Tailwind CSS I was able to do so by applying a show rule on html.elem that extracts elem.attr.class. But for Pagefind I had to use an extra CLI tool. I tried using custom show rules, directly processing document(...).body, but either methods failed.

1 Like