DEV Community

Discussion on: Which is the Best Static Site Generator and Why?

Collapse
 
pianomanfrazier profile image
Ryan Frazier

The difference is do you want to compile your site upfront front flat files (ie markdown, templates,...) or hold you data in a database like wordpress?

This has a lot of benefits like

  • better security (no backend or database to be hacked)
  • simple deployment (git push to publish with netlify)
  • cheaper to host (don't need php and/or some caching service)
Collapse
 
vuild profile image
Vuild

Thanks Ryan,

Not to argue (from ignorance), but these seem like pretty low value reasons:

  • Sec is not a CMS thing (I get the db, but that's not really a big concern).
  • Deployment is a dev, not consumer thing. I deploy nonstop.
  • Hosting is cheap.

These are all dev benefits, which I don't really care about in the sense that: Do they improve traffic/UI/SEO/performance etc.

I choose based on the consumer experience/value with less regard for what the devs want (think of it like race cars vs regular).

Trying to figure out if it is better or just another tech trend that is no real improvement. Not really into small, trafficless sites. Seems a lot like the old days (static HTML file can stay for 20 yrs, that part is nice).

Thread Thread
 
pianomanfrazier profile image
Ryan Frazier

No that's fine. No offense taken. Your points are valid.

For me, it really depends on the use case. For my own blog, being able to write markdown and deploy the flat files is a consumer thing when I write my own blog.

I like to program my blog as I blog and this way has given me a lot of flexibility.

If I want to move to a different blog platform I don't have to export from a database.

As far as small tragficcless sites, smashing magazine produces their whole site this way. smashingmagazine.com/2017/03/a-lit...

If I were setting up a blog for a customer, wordpress is still a good choice. For business websites wordpress seems overkill to me, so I use an ssg.

I just listed some of the reasons I have switched. Again for security, I got tired of staying on top of updating and securing my wordpress site. If I didn't touch my WP blog for several months it would get hacked.

I hope this gives you some more context on my comment.

Thread Thread
 
vuild profile image
Vuild • Edited

Ryan,

This answers all my questions as well as possible tbh.

Dev heavy markup, injection, intrusion are good reasons (I was wondering if it was worth losing the breadth of options). I'll try a couple.

Appreciate the explanation, thanks.

Thread Thread
 
ryanhaber profile image
Ryan Haber

From a user/viewer perspective, CMSs are often a lot slower than static. In fact, it's hard for me to see how they wouldn't be. My main concern is my user/viewer/reader, so unless we need functionality only possible in a CMS, I go with a static. FWIW, since you can do a lot of simple JS in a static web page, it's super easy to add Disqus, etc., for commenting and some other basic functionality.

Thread Thread
 
vuild profile image
Vuild

Thanks Ryan, I like the sound of it in a number of scenarios. Pretty agnostic on this stuff overall.

In general a cms is spitting out a static cached page mostly so they can be fast but most devs throw some Gfont embed, ga, a few plugins, db bloat & suddenly the site is garbage.

My site is not fully optimized, but is usually <1s. WP (& php) has a bunch of advanced stuff that i'd have to code already. There are many annoying {solvable} CMS related issues.

I am not using very many 3rd party services anymore unless requested as there is no need for a handful of players to have control of everything. My users are being respected (mostly) & I am enjoying working on my stuff under those circumstances (this is not that relevant to the sitegen but it's where growth is).

What static gen do you use? (I will make some things to see how it suits my needs).

Thread Thread
 
ryanhaber profile image
Ryan Haber

Yeah, absolutely.

Also, I've seen CMSs and I've seen CMSs. They're not all the same.

For static gen, I've only used Jekyll, actually. It's a bit of a new world to me.

For CMSs, my favorites are Joomla!, Drupal, Ghost (oooooh, love it), and a little known one called BrightSpot. There are some lightweight ones that are also pretty good, if simpler.

Thread Thread
 
johnhorner profile image
John Horner

Sec is not a CMS thing (I get the db, but that's not really a big concern).

I don't know what this means, but I recently had to fix up a Wordpress blog which had been hacked because of an insecure plugin. There were ads inserted as posts, and links hijacked to go to really bad sites. The administrator didn't notice for quite a while because the malware was smart enough not to appear if you were logged in as a user.

It's hard to imagine that happening to a static site. With a static site there are just files on a server. What is there to hack? Only the SSH connection to the server itself.

Thread Thread
 
vuild profile image
Vuild

Yeah, my first one was an injected encrypted footer links with useragent & tore down a set of top ranking sites (long time ago). I didn't mean to dismiss CMS sec, it's a pain.

"Sec is not a CMS thing" just meant: Lots of the serious stuff (beyond annoying defacing) is social engineering & lower down the stack. The CMS or db is one part of many.