I wanted to use JSX as the templating language for an SSG, but couldn’t find a suitable out-of-the-box option.
So I made one.
Key values for this project
zero configexperience is the golden path. Things that mess with this should not be added.
- "Better documentation" is more important than "more features"
Why make another SSG?
The web is awesome, by default. HTML, URLs, navigation, page loading; they’re all awesome concepts. And they’re super accessible and super fast, too. “Basic” websites are the best websites.
But you know what’s also awesome? Component-based architecture. Building a site from a collection of versatile and reusable components is so much better than the alternative (i.e. writing everything out by hand for every page).
That’s why Static Site Generators exist in the first place. You get to shove your content into a bunch of templates, and the SSG spits out all the files you need for a fantastic “static” site.
The trouble is, I find the usual bunch of templating languages don’t play well with my style of coding. I much prefer the way React does things; JSX is absolutely fantastic. IMO it’s as important a tool as Markdown (and I am bullish on Markdown!)
But if you want to write your templates in JSX, you need to ship a React project, right? Well not any more. JS.SSG lets you use JSX for your templates and MDX for your content, but the end result is nothing more than good ol’ fashioned HTML files.
You write your content, templates, and components, and JS.SSG handles the rest for you.