krz/orgo
Lightning fast org-mode static site generator.
clone: git clone https://gitbay.org/krz/orgo.git
main:
| 040000 | .github/ | |
| 100644 | .gitignore | 15 |
| 100644 | CODEOWNERS | 12 |
| 100644 | Cargo.lock | 34001 |
| 100644 | Cargo.toml | 1926 |
| 100644 | LICENSE | 639 |
| 100644 | README.md | 7328 |
| 100644 | RELEASING.org | 2088 |
| 100644 | SECURITY.md | 1197 |
| 040000 | docs/ | |
| 040000 | fixtures/ | |
| 040000 | src/ | |
| 040000 | syntaxes/ | |
| 040000 | tests/ | |
| 040000 | themes/ |
orgo
Turn a folder of org files into a website.
You write posts the way you already do — an .org file per page, in whatever directory
structure suits you — and orgo builds a complete site from them: pages, navigation, a blog
index, tags, an RSS feed, syntax-highlighted code. It is one binary with nothing to
install alongside it, and you do not need Emacs to build your site, only to write in a
format Emacs made.
Org is the source language here, not something to convert away from first. Tools that
route org through markdown lose what markdown has no words for — property drawers, a
heading's TODO state and tags, #+ keywords, ID links, captions on images. orgo keeps all
of it, and its output is checked page by page against what Emacs' own exporter produces
from the same file.
Documentation: https://krazywarez.github.io/orgo/ — that site is written in org and built by orgo, so it doubles as the longest worked example available.
Install
You need Rust (1.88 or newer). Nothing else — syntax highlighting and its themes are compiled in.
cargo install orgo
Or from a checkout, if you want to build the version you can read:
git clone https://github.com/krazywarez/orgo
cd orgo
cargo install --path .
Either way you get an orgo command on your PATH. Full notes, including how to run it
without installing anything: https://krazywarez.github.io/orgo/install.html
Your First Site
orgo init my-site
orgo serve my-site -o _site
Open http://127.0.0.1:3000. Edit my-site/index.org, save, and the page reloads on its
own — that is the loop you will spend your time in.
init writes a starter post, a page layout you can edit, and a config file with every
setting explained in comments. It never overwrites a file you already have. It also picks
one of the four built-in themes — plain, blog, wiki, docs — so the site is styled
from the first build; change theme in orgo.toml, or empty it and write your own CSS.
Org-Mode, Anywhere
orgo build ~/notes -o _site
No config file, no templates, no orgo-specific markup in your files. You get a real site: every page, links between them resolved, navigation across the top, code highlighted. That is a supported way to use it rather than a demo — configuration changes what you get, it is never what makes it work.
Nothing that should stay private is published: dot-directories like .git, your templates
and the output folder itself are all skipped.
Want to know what orgo will make of your files before trusting it with them?
orgo audit ~/notes reports which org constructs you use and how each one lands, with
counts and line numbers — never the text of your writing, so the report is safe to share.
Additional Features
Each of these is a few lines of config, and each has a page in the guide:
| Add | Documented in | |---|---| | A blog index, newest first | Collections | | Tag pages, and an index of tags | Collections | | An RSS feed | Collections | | Numbered pages when a list gets long | Collections | | A built-in theme for a blog, a wiki or a doc site | Configuration | | Your own design, in ordinary HTML templates | Templates | | Drafts that stay unpublished until you say so | Authoring | | A table of contents on long posts | Authoring | | Clean URLs that survive a renamed file | Authoring |
Rebuilds only touch the pages that actually changed, so saving a post on a site with hundreds of them stays instant.
Speed
Publishing one real site (cleberg.net) — 178 org files, ~180 pages — three ways. Median of three runs each, measured back to back on one machine:
| | Time | |
|---|---|---|
| weblorg (emacs --script publish.el) | 49.0s | |
| weblorg + build.py | 50.3s | |
| orgo, cold build | 0.22s | 223× faster |
| orgo, nothing changed since last build | 0.13s | 377× faster |
That middle row is the interesting one. weblorg alone does not group a blog index by year, write a tags page, rewrite image URLs, minify CSS or emit a sitemap — so I wrote ~600 lines of Python to do those on top of it. orgo does four of the five natively — the sitemap included, since writing this table is what prompted it.
Read the numbers with three things in mind. The weblorg figures include Emacs starting and loading its packages, which you pay on every publish and cannot avoid. orgo emits 13 pages weblorg does not, one per tag, so it is doing slightly more work. And the two do not produce byte-identical output — the differences are deliberate and listed under Org support.
Apple M2 Pro, 12 cores, macOS 26.6, Emacs 30.2, orgo built with --release.
Docs
https://krazywarez.github.io/orgo/
| Page | What is in it |
|---|---|
| Quick start | A working site in two commands, then your own writing, then your own design. |
| Install | Getting the binary, and running it without installing anything. |
| Commands | Every command and flag, and what each is for. |
| Configuration | Every setting in orgo.toml, what it changes, and what it costs. |
| Collections | Blog indexes, tag pages, pagination and RSS feeds. |
| Templates | Layouts, and every variable a template can use. |
| Org support | Which org syntax is handled, which is not, and how the rest degrades. |
| Authoring | URLs, drafts, excerpts, tables of contents. |
| Incremental builds | How it decides what to rebuild. |
| Watching and serving | The write-save-see loop. |
| Auditing | Reading a corpus before trusting a tool with it. |
| Deploying | Producing a production build, and putting it somewhere. |
Building
cargo test # includes a differential check against Emacs, when present
cargo run -- serve docs -o docs/_site # read the documentation locally
Licence
0BSD. Do what you like with it.