@Myriad-Dreamin
Typst is an interesting project, it’s actively maintained, and growing in popularity.
Conditions under which integration might occur:
- The “Typst to HTML” process must provide substantially the same output as “Typst to PDF”, and
- There is strong demand from a significant percentage of the Hugo user base, and
- The value offsets the cost (reasonable ROI)
And #3 is the most important: design, implementation, testing, documentation, support, and maintenance. If I had to guess, I would say that equates to over $25,000 USD in the first year—perhaps much more. We would also need to consider the opportunity cost (i.e., the delay of other features and fixes).
We currently have 6 content formats:
- Markdown
- HTML
- Org (Emacs Org mode)
- Asciidoc
- Pandoc
- reStructuredText
Combined, items 3, 4, 5, and 6 probably represent less than 1% of the content published with Hugo worldwide. To me, these seem like distractions without significant aggregate value. Yes, they are important to some users and organizations, but I’m not sure the value exceeds the cost.
With items 4, 5, and 6, we have to “shell out” to another executable, which means:
- Another dependency
- Another cross-platform matrix / headache
- Another source of risk, both in security and availabilty
- Performance is less than optimal
From what little I have learned so far, the “Typst to HTML” process would be yet another external dependency, similar to items 4, 5, and 6 above.
But, never say never.
EDIT 2024-11-08T06:33:25-08:00
It is still not possible to export to HTML using the typst CLI.
See https://github.com/typst/typst/issues/721.
Pandoc added a typst reader on 30 May 2023 with 46a4e24, available with the release of 3.1.3 on 6 Jun 2023. Pandoc uses the typst-hs Haskell library for parsing and evaluating typst syntax. The typst-hs library is actively maintained by John MacFarlane who also maintains pandoc.
The pandoc command to convert typst to HTML:
pandoc -f typst -t html in.typ > out.html
The typst project currently has 35k stars.
Typst documents have a typ
extension and the (unofficial) media type is text/x-typst
.