Calepin: Website builder for Typst

Hi all!

Two weeks ago, I released Calepin, a tool that could turn a standard Typst file into a computational notebook, in the spirit of Quarto or Jupyter.

Today, I am pleased to introduce the second major feature of Calepin: static website generation. Think Hugo, Jekyll or Astro, but in Typst.

This means that Calepin can now take a directory of ordinary .typ files and turn it into a complete website: HTML pages, optional PDF versions, navigation, feeds, search, assets, and all the small files that you need to share your site.

(Note: the website linked above was entirely written in Typst!)

The websites that Calepin generates are “static,” so they don’t require complex server-side infrastructure. You can just upload the files to Github, Netlify, an S3 bucket, or a simple web server. It should just work.

Notable features include:

  • Pure Typst authoring
  • Navigation
  • Search
  • Local server for live preview
  • Incremental builds for fast render
  • Themes: Built-in or customized with Jinja partials
  • Blog-friendly metadata and feeds
  • Multilingual websites
  • Light and dark modes
  • Web components: Cards, galleries, lightboxes, code blocks, margin notes, etc.
  • Minification for html and css

I like Typst because it is a coherent and powerful writing system. The notebook feature made Typst useful for computation-heavy and reproducible documents and reports. Static website generation extends the same idea to publishing. A Calepin project can now be a research note, a report, a course website, a software manual, a blog, a slide deck, and a computational notebook, all with the same source language and the same command-line tool.

Please submit bug reports and feature requests on the Github repository. And I’d love to review Pull Requests if you are interested in contributing!

1 Like