Cool stuff! In a somewhat similar vein, I've been working on a static site generator (like Jekyll) that uses React/Redux instead of a templating system: https://github.com/thomasboyt/peridot It actually is very similar to any other isomorphic React app, except instead of hosting an API, it simply renders each page out to a file, as well as a JSON version of each post that acts as the "API" used to retrieve further pa…
For the past few weeks, I've been experimenting with how I could render both React + Markdown into HTML and minimize the numerous edge cases that occur during the build process.
For example, ReactDOMServer.renderToStaticMarkup(page) will remove all line breaks in the HTML output. The problem with that is pre/code elements will have their line breaks removed as well which for obvious reasons is not good. Oh and another problem, it converts all (or most, if I remember correctly) HTML entities to their literals.. so those code blocks may look pretty messed up in the browser.
But after weeks of experimenting with different rendering/build processes and libraries, things have finally been coming together recently. Unfortunately, my private repo is a mess due to all the tests and methods I've tried. I'm going to be releasing a clean public repo of the project soon after I develop a landing github.io page for it. That will also be open source and serve as a great example for how to use the generator.
However, I did rewrite my live website from Jekyll to my generator (need to come up with a good name still..) this past week.
Regarding build times on my $5 DigitalOcean droplet, my website is built in ~3.7s with Jekyll and ~9.5s with my generator. I still have many ways to improve performance and I haven't tested NODE_ENV production mode yet which the React team says should be much faster due to no warnings/error checking. Though, most of that build time is due to Babel converting my ES6+JSX components into actual JS that Node can execute. I'll be focusing on lowering this build time for the next week or two probably.