HTML templating/quasiquoter for Halogen

Hi, I’m having lots of fun with Halogen atm. What’s not so fun is rewriting HTML bits into Halogen AST since I’m porting a set of static pages into a single-page app.

I suppose what I’d really like would be a quasiquoter or some other syntactically-sound way to splice in markup. Does it exist?

1 Like

I’ve seen an announcement about a library that parses HTML and produces valid Halogen, but I can’t find it now. You should search the discourse, it was there somewhere. I actually used in my project, and after a few manual tweaks in the output it worked nicely.

Perhaps GitHub - rnons/purescript-html-parser-halogen: A library to render HTML string into Halogen views ?

1 Like

Yes that looks very much like what I had in mind. Thanks!

There’s also a tool that helps you convert HTML into Halogen syntax (before runtime, that is):