DEV Community

What is the simplest static site framework?

Ben Halpern on February 07, 2020

What is the most minimal, straightfoward, and simple static site generator?

Maybe not the best, but the one with fewer moving pieces and an easy onboarding.

Collapse
 
kant312 profile image
Quentin Delcourt

Not a framework, but the simplest SSG for me is Eleventy: 11ty.dev/

Jekyll is great if you are used to dealing with Ruby on a day to day basis. Eleventy is JS based and as I deal with JS everyday it feels way more easier to use to me.

Collapse
 
scrabill profile image
Shannon Crabill

I've been wanting to try a static site generator and Eleventy is on my list to try.

Collapse
 
kant312 profile image
Quentin Delcourt

There is a clear documentation an a great community around it, which is really nice :)

Good luck on your trials ^

Collapse
 
sabi95oct profile image
Sabitha Kuppusamy • Edited

I would suggest netlify.com/. It is great for static sites. Recently, I tried using this for my react project and it is cool to use. It is integrated with Github. Whenever you make changes to your repository, the changes will be automatically reflected on your site which is hosted using netlify.

Collapse
 
dmitryvakulenko profile image
Dmitry Vakulenko

Pure html+css

Collapse
 
ben profile image
Ben Halpern

I like pure HTML+css but I do think markdowns and templates are useful.

Collapse
 
tiguchi profile image
Thomas Werner

Then Grav is probably a perfect candidate. It uses markdown files to generate static HTML pages.

Collapse
 
dmitryvakulenko profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Dmitry Vakulenko

If you need a templates this is not a static site. So specify question if you need more correct answer.

Thread Thread
 
felixdorn profile image
Félix Dorn

wtf? Arguments please ? Definition of a Static Site ?

Thread Thread
 
deciduously profile image
Ben Lovy

Yeah, I don't think that's true. If your server is crunching templates and then delivering entirely static content, I don't know why that wouldn't count.

Thread Thread
 
mathieuhuot profile image
Mathieu Huot

A static website is one that is rendered on requests without extra interventions from the server. So the server responds with a document from the file that sits on the requested location and that's it. When one build a website with a static site generator, although the process is dynamic, the end result is a static website. At least, that's how I understand it!

Thread Thread
 
ben profile image
Ben Halpern

Yeah, the templates here are part of a build step. Things are still static in the end.

But on the topic of a "dynamic site" which is actually kind of static: dev.to

We serve our pages statically from the edge even though they are dynamically generated. The initial requests to pages on this site are static HTML that never hits our server about 90% of the time.

After I submit this comment, we will re-compute and serve dynamic, but every pageview thereafter will be static until the next change on the page.

Thread Thread
 
dmitryvakulenko profile image
Dmitry Vakulenko

Static site - is a site that content isn't depend on any external data like GET/POST, time etc.

But templates/framework means you want to substitute some parts on pages on-the-fly. So I asked you to make you question more accurate to understand what exactly you need. Static (or looks like static) sites can be build with a range of tools - from simple text editor to CMS like Wordpress.

Thread Thread
 
deciduously profile image
Ben Lovy

Do templates always mean on-the-fly replacement? I'm using them as a means of abstraction for my current project, but by the time a client makes a request everything is already baked. Does the fact that I used a template in the compilation stage, well before deployment, make my site not static? They really only make a difference to the developer, the fully-substituted HTML is actually stored on on the server and is what's ultimately served.

Thread Thread
 
dmitryvakulenko profile image
Dmitry Vakulenko

No. Not only on-the-fly. But the need of templates depends on many things. It isn't necessary if you want just to make site and forget about it. But if you need to make new pages every day - maybe it will be useful.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga

It's definitely not the easiest, but the documentation is excellent and it always has the answers I need: Jekyll.

The fact that it works with GitHub Pages without any configuration is amazing. It's not the easiest, but you have great references to get started!

Adding this to my reading list, I'm very interested to see what others post!

Collapse
 
nathanminchow profile image
Nathan Minchow

I think Jekyll's maturity relative to the other frameworks helps a bit too. There's a lot of documentation and guides for setting things up, extending base functionally, etc.

Collapse
 
hybrid_alex profile image
Alex Carpenter

Eleventy is as simple as it gets

npm install -g @11ty/eleventy
echo '# Page header' > README.md
eleventy
Enter fullscreen mode Exit fullscreen mode
Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Seems to be Parcel.js bundler

You can glob -- parcel build "src/**/*.html"

11ty is another good one, but I don't know how to bundle with JSDOM or pupetter for *.11ty.js.

There is cogear.js, but it seems to be unmaintained.

Collapse
 
mathieuhuot profile image
Mathieu Huot

My SSG of choice right now is Eleventy (11ty). I like its simplicity and flexibility (it pretty much does what you want). 11ty is also Node base witch is convenient if your development environment is already Node!

Collapse
 
safaiyeh profile image
Jason Safaiyeh

Sapper!

Collapse
 
arschles profile image
Aaron Schlesinger

I love the simplicity and power, and mad respect to the framework. That being said, I messed up a link to one of my markdown files and I took 2 hours to figure out what happened. sapper export only seemed like it gave me the last line of the exception trace 😭.

I'm a n00b to Sapper though, so I figure with some extra docs or a flag (or both!) this thing could be friendly and powerful 🎉

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦 • Edited

Just write your own in plain ruby with no framework.
Ruby standard has erb integrated.

I wrote one for my other startup because I wanted to just use lambda to generate out the static files instead of having to use CodeBuild.

It generates out 100,000+ of html files within a few minutes, and I just wrote a bit of logic to diff for new files.

Collapse
 
ben profile image
Ben Halpern

Do you do markdown parsing as part of this process?

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦

Nope, I only use what is provided in the standard ruby library. Its nice when you don't have a gem file since it makes bundling much easer for Lambda functions.

I could certainly include RedCarpet. I believe it relies on some native extensions but I could just create a Lambda Layer if that is the case.

I have lambda functions that run queries against my RDS database and that then download data into a json file.

That json file is then read and used to generate out static files. I just pass the data to erb files.

Collapse
 
ben profile image
Ben Halpern

I just tried it out. Definitely impressed by the simplicity!

Collapse
 
wuz profile image
Conlin Durbin

A good editor and HTML 😝

But for real, I've had some good success with Markdown+Pandoc and basic HTML, rendered in a Makefile.

Collapse
 
nqcm profile image
TheNiqabiCoderMum

I haven't tried a lot of them but between Jekyll, Publii, Hugo and Nikola I like Hugo the best. I recently tried MkDocs as well and like it a lot too. The only problem with Hugo (for me) is that I am not too comfortable using the templating language in Go. I preferred MkDocs as I am used to Jinja more.

Here is my Hugo site with a custom theme blog.naveeraashraf.com
And a MkDocs site with Material theme arabic.naveeraashraf.com

Collapse
 
rrees profile image
Robert Rees

I think you're asking two questions which is why there is a split of replies.

I think something like Jekyll or Hugo, while not the simplest, have huge communities with lots of resources and have addressed lots of problems you may encounter so doing something with them is quick despite them not really being simple.

Then there are minimal generators that have minimal amounts of code and then it depends on which languages or tools you feel most comfortable with. Writing your own file processor is quite simple as people point out and you can usually get by with a single file solution.

Collapse
 
wavrin profile image
Christopher Wavrin

I've only used Gridsome - gridsome.org/

But it was so easy, I can't imagine any other being more simple. :)

Collapse
 
mnlwldr profile image
manuel

I use Jekyll. But only because I'm to lazy to check out other static site generators :D

Collapse
 
joshuawilluhn profile image
Joshua Willuhn • Edited

I wrote one a couple months ago in node. It originally had markdown support using a library called Showdown, (markdown in html out) but I dropped it in favor of the flexibility of pure html 🤷🏼‍♂️ it's only a few post end points, the whole thing is pretty short but it works for me so far. It has an editor app I wrote too.

Collapse
 
jigar_online profile image
Jigar Shah

I have found TezJS a very easy and amazing Static Site Generator.

TezJS uses Vue as a primary language and helps you build JAMstack website. Even though, if you have a basic understanding about JavaScript, you could easily build website using TezJS.

GitHub - github.com/tezjs/tezjs

Collapse
 
ben profile image
Ben Halpern

We use middleman for codelandconf.com and I definitely like it.

Collapse
 
johnbokma profile image
John Bokma

The static site generator I wrote, of course! :-). It uses a single Markdown-ish input file to generate the static site (main focus is a blog) and you can either use the Perl or Python version. I use it for my blog Plurrrr.

Collapse
 
jcs224 profile image
Joe Sweeney

Jigsaw is my favorite so far. I only tried Hugo and found Jigsaw much easier. It doesn't have as many out-of-the-box features as Hugo but you have the full power of PHP at your disposal and uses the wonderful Laravel Blade syntax for creating templates and populating them with data.

Collapse
 
cescquintero profile image
Francisco Quintero 🇨🇴

Jekyll

Collapse
 
emh333 profile image
Ethan Hampton

Yes, and they seem to making great progress every release refining it into a greater piece of software

Collapse
 
ajeet profile image
Ajeet Yadav

getpublii.com/

Publii cms. I found it on the headlesscms.org site.

Here is my site built with this. Try this once

ajeet.dev

Collapse
 
cwraytech profile image
Christopher Wray

I love Nuxt static site options. I’m using it for my portfolio here.

Collapse
 
geraalcantara profile image
Gerardo Alcantara
Collapse
 
patilkrunal profile image
Krunal Patil

It's great but certainly not easy with graphql.

Collapse
 
sm0ke profile image
Sm0ke • Edited

Panini - A super simple flat file generator.
11ty - not just simple, is super smart at the same time.

Collapse
 
abouba21 profile image
Abouba 🇷🇼

Jekyll

Collapse
 
hxii profile image
Paul (hxii) Glushak

I know my reply is a bit late, but I was checking these out myself.
Ended up making my own - Saishō. Very educational and fits my needs.

Collapse
 
fennecdjay profile image
Jérémie Astor

there's this low hanging fruit I found from suckless site:
a bsh script called ssg.

Collapse
 
betkowski profile image
Betkowski

Just going to leave this here.

nextjs.org/

Collapse
 
adriangrigore profile image
Adrian Emil Grigore

Hi,

Sorry I'm late to the party! You may prefer to take a look at mkws.sh/.

Collapse
 
talzcloning profile image
Talz Cloning
Collapse
 
jvarness profile image
Jake Varness

I'm really impartial to anything using React: Next.js and Gatsby are two great options!

Collapse
 
edsulaiman20 profile image
Edwin Sulaiman

i think Hugo is good for you, for themeplating you just need basic Html+Css+Js and some basic Golang. for post, Hugo is using Markdown format

Collapse
 
philschonholzer profile image
Philip Schönholzer • Edited

I used 11ty, Gatsby and Nanogen.

It is definitely Nanogen.
doug2k1.github.io/nanogen/

Collapse
 
geraalcantara profile image
Gerardo Alcantara
Collapse
 
irishgeoff10 profile image
Geoff

You can go old school, and just use plain HTML and CSS.
For static website forms fabform is good choce too.

Collapse
 
atas profile image
Ata

I asked myself the same question then I built a simple vanilla PHP & HTML static site generator that deploys to GitHub Pages by default: github.com/atas/ssg
I hope it becomes useful.