Immediately after switching the page, it will work with CSR.
Please reload your browser to see how it works.

Source:https://github.com/SoraKumo001/next-streaming

⬅️ Herb: Powerful and seamless HTML-aware ERB parsing and tooling
Alifatisk 3 daysReload
> Parses input fast enough to update on every keystroke, ensuring real-time responsiveness…

Wow!!! Cool to see ERB being embraced and enhanced in this way, I’ll have to check it out


notpushkin 3 daysReload
If it is what I think it is, it’s extremely neat. Parsing both HTML and templating syntax at the same time is way more robust than doing just the templating and hoping for the best.

I was thinking about something like this, but with some blend of Jinja2 / Twig / Nunjucks [1] syntax and Svelte/JSX-like use of variables in element attributes:

  {% for para in page.body %}
    <p class={{ para.class }} {{ **para.attrs }}>
      {{ para.text }}
    </p>
  {% endfor %}
---

[1]: the irony is not lost on me that I’m mentioning Python, PHP and JS template engines in a Ruby discussion :-) Liquid is the closest equivalent I think, but there was some crucial piece missing last time I had to use it, though I can’t remember what exactly.


mrinterweb 3 daysReload
One thing that's not very clear from the documentation is what the application of this may be. I see that it parses ERB and or HTML into an AST. Is this intended to enable improved HTML and ERB linters and language servers? This seems like a tool that other development tools will benefit from.

I realize this is new, but as tools start using herb, it would nice to link to those tools from the herb website and or github readme.


9dev 3 daysReload
If you're not familiar with the Ruby ecosystem, the site does a very poor job of communicating what this is actually about. A single definition of ERB would have helped a lot.