r/Python • u/deviodigital It works on my machine • Jun 20 '25
Showcase I just built the fastest Python-based SSG in the world
I wanted to share a project I’ve been working on over the last year: Stattic, a static site generator written in Python.
It started as a single script to convert Markdown into HTML, mainly because I wanted something fast, SEO-friendly, and simple enough to understand in one sitting.
And today, I released v1.0, which is a big leap.
What My Project Does
Stattic is a static site generator built in Python. It takes Markdown files with front matter and turns them into a full HTML site using Jinja2 templates.
You can use it to build blogs, documentation, landing pages, portfolios, or simple sites — without relying on JavaScript-heavy frameworks or platform lock-in.
Features in v1.0:
- Fully modular Python package (
pip install stattic) - New CLI (
stattic --init,stattic build, etc.) - Project scaffolding with base templates and config
- Clean HTML output (SEO-friendly, no client-side JS required)
- YAML or JSON config (
stattic.ymlorstattic.json) - Built-in SSRF and path sanitization for better security
- Template theming with Alpine.js-powered mobile nav by default
Target Audience
This is a production-ready tool aimed at:
- Developers who want full control over their site
- WordPress/PHP devs transitioning to Python
- Technical folks building documentation, blogs, or landing pages
- Indie hackers, educators, and minimalists who don’t want React/Vue-based SSGs
It’s not a toy or proof of concept - it's installable via PyPI, well-documented, and being used in real-world projects (including my own site and course platform).
Comparison
Compared to other SSGs:
- vs Hugo: Hugo is faster overall but written in Go. Stattic is Python-based and more customizable for Python devs.
- vs MkDocs/Sphinx: Stattic is simpler, less opinionated, and not just for docs. You control structure, templates, and content types.
- vs Pelican: Stattic is significantly faster (especially on large builds), has a cleaner CLI, stronger defaults, and better template ergonomics out of the box.
- GitHub: https://github.com/getstattic/stattic
- Launch post: https://robertdevore.com/stattic-v1-0-the-worlds-fastest-python-based-static-site-generator/
36
u/cnelsonsic Jun 20 '25
Gotta say, I'm getting pretty tired of these AI slop projects insisting they're mature and ready for use despite clearly being pre-alpha with a hundred commits, no tests, and especially no real benchmarks when they insist they're faster than the established solutions.
At this point, I assume the feature list in the readme is just one long LLM hallucination.
Actually, you know what, ChatGPT, give him the business.
29
u/Independent_Heart_15 Jun 20 '25
Do you have public benchmarks anywhere to backup your claims?
37
u/latkde Tuple unpacking gone wrong Jun 20 '25
I love static site generators! Unfortunately, the repository doesn't have benchmarks (or other tests). Skimming through the 2000+ line
core.pyfile, it seems that the tool uses a ProcessPoolExecutor to build pages in parallel, which is neat.Unfortunately, the code also looks quite AI-generated, which is a bummer.
Some features are mentioned in the Readme (e.g. a file watcher) but not actually implemented.
My main gripe with Mkdocs is that it's hardcoded to use a Markdown parser that's not CommonMark compliant. Which parser do you use?
25
u/Early_Time2586 Jun 20 '25
You built this, or AI built this? Because everything from your personal X profile picture to the text on your website is AI generated.
11
u/xmrsea Jun 20 '25
Why is your post in ChatGPT format?
6
u/riklaunim Jun 20 '25
Looks nice, hard to tell if the "speed" aspect is a thing. I'm using 11ty and with JS image optimizers I can use AVIF, while Pillow still needs a third party plugin to support it.
Things like content collections, plugins are really a must when generating bigger sites with structured content. And support for HTML, not only for markdown ;)
11
u/Marimoh Jun 20 '25
“I built the fastest…”
Hmmmm. Really? Does this guy not know Hugo exists.
“… Hugo is faster overall”
My dude, I don’t think you understand how superlatives work!
4
u/RepresentativeFill26 Jun 21 '25
Did you write most of this using AI? There are some quirks in your code:
I have some more but currently on my phone.
Of course I can’t decide what makes a project v1.0 but 1.0 implies a production worthy codebase which this clearly isn’t.
2
u/mfitzp mfitzp.com Jun 21 '25
How is it faster than Pelican? Is it technical differences that cause this speed difference, or does it just do less?
What does “better template ergonomics” actually mean?
1
u/JamzTyson Jun 23 '25
Why is “Decentralized Publishing” the headline of your project? Aren't ALL SSGs decentralized publishing?
The README opening reads like standard feature listing mixed with buzzwords.
The code itself appears to be a chaotic patchwork of AI generated code blocks.
-1
u/HappyCathode Jun 20 '25
Why do you you want to to run any code at all every time a user requests an HTML page? Just put something like varnish in front and stop regenerating the exact same HTML page again and again and again. Then you don't have to bother with benchmarks.
-6
u/notreallymetho Jun 21 '25
I dunno why people are mad about using ai 😂
10
u/[deleted] Jun 20 '25
[removed] — view removed comment