-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Including JS in a static site is currently fairly messy. It requires an encode-js script to produce a base64 string so that it can be included from Typst without escaping characters that render it dysfunctional when it actually tries to run in the browser. (I believe that this is due to the immaturity of HTML export in Typst: there presumably also needs to be some fix upstream.)
Regardless of the state of native JS in Typst-generated HTML, we probably want to provide an auto-included 'index.js' at the root of the Rheo project directory that works similarly to custom CSS. If included JS via Typst remains difficult, Rheo can abstract this difficulty from the user; and even if it gets better, this just provides the user an easy way to get started with adding JS/CSS to a static site.