is made of three parts:
- the content, written in typst
- the builder, a TS script that compiles the content into SVGs + PDFs
- the serverless worker, which responds to requests for
<page-idx>.htmlby inserting the correct SVG into the template
change the cdnBase in the worker so that it points to wherever you're hosting the dist!
bun build-content -t PATH_TO_TYPST
bun build-workertypst with typst eval (PR #7362) support is required.
i have a darwin-amd64 build so hit me up if you have an intel mac and don't want to compile it yourself.
- build
- host the content of
distsomewhere - change the variable in the worker so that it points there
- build worker again
- upload
worker/worker.jsto cloudflare workers - done!
the code (build.mts, template.html, worker.ts) is licensed under MIT.
the content (everything in content/) is licensed under CC BY-NC-ND.
Note
the BY-NC-ND is restrictive, but it does not restrict fair use. according to Wikipedia, if we follow the US fair-use law, commentary, criticism, news reporting, research, and scholarship is covered by fair-use.