Can I use the syntax of Typst only, and define custom primitive commands?

Yeah but as mentioned before, what you are trying to achieve is actually currently implemented by the maintainers of Typst.

Someone already posted the tracking issue: Tracking issue: HTML export · Issue #5512 · typst/typst · GitHub

With the git version of Typst you can already export very basic documents to HTML. It will become better over the next weeks and months. Applications like blogging are explicitly in the mind of the creators, just have a look at the tracking issue above, where “blog” is literally mentioned.

And someone just posted here on the Forum that he is already using Typst to generate his website: My website is now built with Typst's new experimental HTML exporter

1 Like