docs: add comparison with other SSGs

- Create comparison.md documenting sukr vs Zola/Hugo/Eleventy
- Feature matrix covers highlighting, math, diagrams, JS, binary
- Add condensed comparison table to README
- Link to full comparison page at sukr.io
This commit is contained in:
Timothy DeHerrera
2026-02-01 14:49:37 -07:00
parent 5ab8198ddf
commit d97aec30f4
2 changed files with 75 additions and 0 deletions

View File

@@ -28,6 +28,18 @@ Most static site generators punt rich content to the browser. sukr doesn't.
- **CSS minification** — LightningCSS optimization
- **Monorepo support** — Multiple sites via `-c` flag
## Comparison
| Feature | sukr | Zola | Hugo | Eleventy |
| :------------------ | :---------: | :-----: | :----: | :------: |
| Syntax Highlighting | Tree-sitter | syntect | Chroma | Plugins |
| Build-time Math | ✅ | ❌ | ❌ | Plugin |
| Build-time Diagrams | ✅ | ❌ | ❌ | Plugin |
| Zero JS Output | ✅ | ❌ | ❌ | Optional |
| Single Binary | ✅ | ✅ | ✅ | ❌ |
See the [full comparison](https://sukr.io/comparison.html) for details.
## Quick Start
```bash

View File

@@ -0,0 +1,63 @@
---
title: "Comparison"
description: "How sukr compares to other static site generators"
weight: 10
---
This page provides a factual comparison of sukr with other popular static site generators.
## Feature Matrix
| Feature | sukr | Zola | Hugo | Eleventy |
| :---------------------- | :-------------: | :-----: | :----------: | :-------------: |
| **Language** | Rust | Rust | Go | Node.js |
| **Single Binary** | ✅ | ✅ | ✅ | ❌ |
| **Syntax Highlighting** | Tree-sitter | syntect | Chroma | Plugin-based |
| **Build-time Math** | ✅ KaTeX→MathML | ❌ | ❌ | Plugin required |
| **Build-time Diagrams** | ✅ Mermaid→SVG | ❌ | ❌ | Plugin required |
| **Zero JS Output** | ✅ | ❌ | ❌ | Configurable |
| **Template Engine** | Tera | Tera | Go templates | Multiple |
## Syntax Highlighting
**sukr** uses [Tree-sitter](https://tree-sitter.github.io/), the same parsing technology used by GitHub, Neovim, and Helix. Tree-sitter builds actual syntax trees rather than matching regex patterns, which enables:
- Accurate highlighting of edge cases
- Language injection (e.g., bash inside Nix `buildPhase`, JS inside HTML)
- Consistent results across all supported languages
**Zola** uses syntect, which is regex-based (Sublime Text grammars). It works well for common cases but can struggle with nested languages or unusual syntax.
**Hugo** uses Chroma, a Go port of Pygments. Similar trade-offs to syntect.
## Math Rendering
**sukr** renders LaTeX math to MathML at build time using KaTeX. The output is browser-native — no JavaScript required in the browser. Modern browsers render MathML directly.
**Zola, Hugo, Eleventy** typically require client-side JavaScript (MathJax or KaTeX.js) to render math, or external tooling pipelines.
## Diagram Rendering
**sukr** converts Mermaid diagram definitions to inline SVG at build time. The diagrams are embedded directly in the HTML — no JavaScript library loads in the browser.
**Other generators** typically include the Mermaid.js library and render diagrams client-side, adding ~1MB to page weight and requiring JavaScript.
## When to Choose sukr
Consider sukr if you:
- Want zero JavaScript in your output
- Need accurate syntax highlighting with language injection
- Prefer a single Rust binary with no runtime dependencies
- Value build-time rendering over client-side hydration
## When to Choose Something Else
Consider Zola, Hugo, or Eleventy if you:
- Need a larger plugin ecosystem
- Require features sukr doesn't have (taxonomies, i18n, etc.)
- Prefer a more established community with extensive themes
- Don't care about client-side JavaScript
sukr is intentionally minimal. It does a few things well rather than trying to cover every use case.