Many of us in the Julia community are enthusiastic about the typst typesetting language, which shares similar goals with latex but with a radically different design philosophy. Currently typst is mostly used to output PDF’s, but HTML output is in heavy development and I anticipate that this will completely change the way some of us approach creating web content.
A use case which I am very much looking forward to is generating Julia package documentation. I expect this to be particularly relevant for “math-heavy” packages. I am currently working on such a package, the need for serious documentation for it (even for my own edification while I’m developing it) has been steadily growing, and I’m getting closer to the point where I’d like to combine the typst notes I already have into Julia package docs.
Anyway, this is a long winded introduction to my new package TypstDocs.jl. This package is still quite early, in particular its use case is currently extremely niche as it is only really useful for generating PDF’s, however I fully expect to start using it for websites once typst HTML output is further in development. You can see the documentation I generated for the package itself here.
This package is not yet registered. I intend to register it, but I like to sit on it for a while and decide whether I need any major changes before doing so. I hope some people will check it out and make suggestions. Currently the package tries to do most work in typst: the Julia package itself basically just dumps a bunch of metadata into typst and I have a typst package that can be used to easily manipulate it. I don’t really see that design principle changing, but I’m otherwise not overly attached to the conventions I’ve chosen.
Thanks to @jakobjpeters for adding some functionality to Typstry.jl which was needed for this package to output typst objects. Currently Typstry.jl is the only dependency of TypstDocs.jl (TypstDocs.jl and Typstry.jl are not required as a strong or weak dependency of packages being documented).
Anticipated Question: Why is this totally separate from Documenter.jl? I briefly considered figuring out how to add this as a target for Documenter.jl. However, I found that the majority of the code base for Documenter.jl is concerned with generating a website, which is not even something that can be done yet with typst. The relatively small amount of code in that package for extracting doc strings and metadata assumes that the strings themselves are markdown, an assumption I need to violate for TypstDocs.jl to be useful. Therefore, there does not seem to be much use in involving Documenter.jl at this point. Later, when it’s practical to generate documentation websites with typst I will explore Documenter.jl integration. It is unlikely that I will be interested in “reinventing the wheel” for doc site documentation when that happens, but it will depend on what generating typst static websites looks like.
