An interactive Typst exercise platform — bringing a Rustlings-style learning experience to the Typst world.
Try it live: liquidhelium.github.io/typlica
- Pure frontend: deployable on any static hosting service (e.g. GitHub Pages)
- In-browser compilation: compiles Typst code directly in the browser via typst.ts
- Live preview: instant output as you type
- Diff checking: built-in pixel-level diff that highlights differences from the reference answer
- Syntax highlighting & completion: Typst syntax highlighting and keyword completion powered by CodeMirror 6
- Progress saving: code and completion state are automatically saved to localStorage
- Mobile-friendly: editor always visible; preview panels switch between Current / Expected / Diff tabs
- Bilingual UI: switch between English and Chinese at any time
npm install
npm run devnpm run buildOutput is placed in the dist/ directory.
Exercises are auto-discovered at build time — no TypeScript changes needed.
- Create a new directory under
exercises/{locale}/, e.g.exercises/en/07-tables/ - Add a
meta.jsonfile withtitle,description,instructions, andhintfields - Add an
answer.typfile (the reference solution) - Add a
template.typfile (the starting template shown to users)
- Vite — build tool
- typst.ts — in-browser Typst compiler
- CodeMirror 6 — code editor (mobile-friendly)
MIT