Staticgen
A static website generator that lets you use HTTP servers and frameworks you already know. Just tell Staticgen how to start your server, then watch it crawl your site and generate a static version with all of the pages and assets required.
About
If you're unfamiliar, you can actually use the decades-old wget command to output a static website from a dynamic one, this project is purpose-built for the same idea, letting your team to use whatever HTTP servers and frameworks you're already familiar with, in any language.
I haven't done any scientific benchmarks or comparisons yet, but here are some results on my 2014 8-core MBP:
- Compiles 3,296 pages of the Signal v. Noise blog in 1 second
- Compiles my Apex Software site in 150ms
Installation
Via gobinaries.com:
$ curl -sf https://gobinaries.com/tj/staticgen/cmd/staticgen | sh
Configuration
Configuration is stored within a ./static.json file in your project's root directory. The following options are available:
- command — The server command executed before crawling.
- url — The target website to crawl. Defaults to
"http://127.0.0.1:3000".
- dir — The static website output directory. Defaults to
"build".
- pages — A list of paths added to crawl, typically including unlinked pages such as landing pages. Defaults to
[].
- concurrency — The number of concurrent pages to crawl. Defaults to
30.