I keep hearing about static site generators in React, Vue or Jekyll etc. I'm confused as to what purpose they serve? Can't I use vanilla js, CSS, and HTML and have a static website?
They're good for when you want to serve static files, but you have a lot of content (so you want to use templates rather than maintain them manually) or if you want to use something like markdown to write your content (common with static generated blogs).
As an aside, many of the "static site generators" for SPA frameworks like React aren't really producing what I'd call a static site (ie. flat HTML). Rather they create a pre-rendered SPA payload, which loses a lot of the benefits of a static site. So choose carefully ;)
Personally I just use Pug templates for static sites. Nice balance of features and overhead.
Ben Buchanan (200ok)
I make some bits of the web.
They're good for when you want to serve static files, but you have a lot of content (so you want to use templates rather than maintain them manually) or if you want to use something like markdown to write your content (common with static generated blogs).
As an aside, many of the "static site generators" for SPA frameworks like React aren't really producing what I'd call a static site (ie. flat HTML). Rather they create a pre-rendered SPA payload, which loses a lot of the benefits of a static site. So choose carefully ;)
Personally I just use Pug templates for static sites. Nice balance of features and overhead.