DEV Community

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

Collapse
 
flrnd profile image
Florian Rand • Edited

Better is very broad. Better in what? Better documentation? Better in build speed?

I can't say which one is better. I've tried Jekyll, Hugo, Hexo and Gatsby and I finally opted with gatsby because is very easy to start with, has a very good documentation, lot of plugins and what not. But the other three where perfectly fine options. Do you like ruby? Jekyll. Do you preffer golang? Hugo. Do you like react? Gatsby...

Collapse
 
oyetoket profile image
Oyetoke Toby

I prefer Gatsby(React), Hugo(Go), Cactus(Python/Django). My basic language is Python, Javascript, Go

Collapse
 
bhupesh profile image
Bhupesh Varshney 👾

Is there one for Python 😅😅 ?
I am currently using jekyll-now but do not know ruby 😅😅

Collapse
 
landreville profile image
Landreville • Edited

There's Nikola which isn't very well known, but I've found it easy to theme and customize heavily.

And Lektor which seems promising and allows defining custom models for posts (to have different metadata, templates, etc depending on the type of post).

Collapse
 
oyetoket profile image
Oyetoke Toby

There's Cactus

Collapse
 
pianomanfrazier profile image
Ryan Frazier • Edited

Not exactly python, but 11ty uses nunjucks, a port of jinja2 to javascript, so should feel very familiar. I have been able to do some cool things with it.

Collapse
 
flrnd profile image
Florian Rand

This is the only one I know github.com/getpelican/pelican but I'm sure if you search in google static site generator python there must be a few.

Thread Thread
 
bhupesh profile image
Bhupesh Varshney 👾

Yeah i have done that
Doesn't seem soo good
😭

Collapse
 
epsi profile image
E.R. Nurwijayadi

Does anynone know how to setup pelican for use with bitbucket.io ?

Collapse
 
prahladyeri profile image
Prahlad Yeri • Edited

I was in the same boat, switched to Pelican recently and never been happier! Its the python equivalent of ruby's jekyll.

Thread Thread
 
buzzedison profile image
Edison Ade

What makes it standout? checked out the website and can't find anything interesting

Thread Thread
 
miron profile image
Miron

If you want interesting, don't look for a static site generator :)

Collapse
 
omidmamadi profile image
Omid

hey, Pelican is Python base :)

Collapse
 
johnbokma profile image
John Bokma

I have written one in Python: github.com/john-bokma/tumblelog

You can see the site I generate with it at plurrrr.com/

Collapse
 
oyetoket profile image
Oyetoke Toby

Which do you prefer and best for your needs and the reasons

Collapse
 
flrnd profile image
Florian Rand • Edited

I like Gatsby and Hugo. I Ditched Hugo because I disliked its templating syntax, but that is a silly reason, just didn't like it.

{{ $title := .Site.Title }}
<ul>
{{ range .Params.tags }}
    <li>
        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
        - {{ $title }}
    </li>
{{ end }}
</ul>

I tried Gatsby and felt in love with it. Things like styled components and another few from the react ecosystem make Gatsby very attractive and fun to use. Another plus is that I can use my react experiments in my personal site and vice versa.

Thread Thread
 
svitekpavel profile image
Pavel Svitek

+1. It reminds me of PHP -> too many special characters for no good reason.

Thread Thread
 
bayuangora profile image
Bayu Angora

Why you complicate your code with that code?

{{ $title := .Site.Title }}
<ul>
{{ range .Params.tags }}
    <li>
        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
        - {{ $title }}
    </li>
{{ end }}
</ul>

What if make your code simpler like this?

<ul>
{{ range .Params.tags }}
    <li>
        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
        - {{ .Site.Title }}
    </li>
{{ end }}
</ul>
Thread Thread
 
flrnd profile image
Florian Rand • Edited

I copy pasted it from hugo itself, ask the developer :).

Besides, that variable that you removed it's probably used in more parts of the code I copy-pasted.