pelican-plugins / pandoc-reader

Pandoc Reader is a Pelican plugin that processes Markdown content via Pandoc
11 stars 3 forks source link

Support Typst #37

Open memeplex opened 3 months ago

memeplex commented 3 months ago

Maybe this is already possible, but it would be nice if now that pandoc has a typst reader we could also write posts directly in typst instead of markdown. Granted, the reader won't cover all cases, but for simple markdown-like documents it should suffice. Typst sports a very lightweight markup so it's a nice alternative to write posts, specially if you are already using it for more formal documentation. Also notice that they are working in adding html output to typst, but for a blog pandoc seems good enough.

So this is a mix of a question and a request: can this be already achieved by the plugin? If not, could you generalize it to take non-markdown inputs?

Thanks!

nandac commented 2 days ago

@memeplex Sorry for not getting back to you sooner. Looks like I missed your message in the deluge of emails.

Yes, I want to support Typst and have been using it for PDF documents but have been a bit tied up so have not had time to work on the plugin.

To convert Typst to HTML I would probably have to convert it first to Pandoc's AST and then see what happens when we go to HTML5.

There are a few things I would have to try out as I also want to support citations and such.

Do you by any chance have a fully featured Typst source lying around somewhere that I could use to try out a few things?

memeplex commented 2 days ago

No worries! I found the reader to be somewhat limited anyway, for example last time I checked support for tables was poor. But it seems that they recently added writer support for the new table features of typst 0.11, not sure about the reader though. I would say don't hold your breath for advanced stuff. It's genius that jgm wrote a functional and decent typst reader, but I got the impression that long-term the plan is to leverage the (not yet implemented) native typst html output.

nandac commented 1 day ago

@memeplex I tried out a few things yesterday and there seems to be a lot of complexity involved such as the handling of metadata.

It might be best to wait for Pandoc to have better support for Typst or for Typst to have HTML support whichever one comes first.

memeplex commented 1 day ago

Sure. Feel free to close this or to keep it as a reminder, as you see fit. Thanks for taking a look!