cferdinandi / reef

A lightweight library for creating reactive, state-based components and UI.

Home Page:https://reefjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I use Reef to generate the HTML for a given route?

shooftie opened this issue · comments

I have recently come across a need to create static instances of the pages that are currently being driven by Reef.

I wonder whether you would have any suggestions as to how I might generate a .html file for a given route with:

  • all of the HTML rendered for the initial state
  • only the JS required to make the UI interactive i.e. accordions, show/hide etc.
  • any CSS files linked

I realise that this is not necessarily the purpose of Reef but it would save me having to add more weight to the project for this one requirement.

Reef is very much focused on progressively enhancing dynamic UI. For static rendering, I tend to either hard code my HTML files, or use a static-site generator like Hugo or 11ty.