Skip to main content

a tiny static website generator

Project description


Simple static website generator.

Supports TOC, image captions, LaTeX, code highlighting and tables.



pip install legoman

# in an empty directory
legoman init
make html

# run devserver (requires inotify-tools)
make devserver

How it works

Files in content/ are rendered and copied to output/, so the directory structure of your rendered website matches the structure of your source files.

For example, the demo content/:

├── codehilite.css
├── index.j2
├── projects
│   ├── bar_proj
│   │   └──
│   └── foo_proj
│       ├── cheetos_small.png
│       └──
└── styles.css

yields this output/

├── codehilite.css
├── index.html
├── projects
│   ├── bar_proj
│   │   └── index.html
│   └── foo_proj
│       ├── cheetos_small.png
│       └── index.html
└── styles.css


Legoman can also render files individually, which is useful for CGI scripts on a webserver.

TEMPLATE_DIR=/path/to/templates legoman_cgi

Or for serving markdown with lighttpd:

$HTTP["url"] =~ "\.md$" {
	setenv.set-environment = ("TEMPLATE_DIR" => "/path/to/templates/")
    cgi.assign = (".md"  => "/path/to/legoman_cgi")


Usage: legoman [OPTIONS] COMMAND [ARGS]...

  --content_dir PATH
  --output_dir PATH
  --template_dir PATH
  --help               Show this message and exit.

  build  generate content
  cgi    run as CGI
  init   initialize project

See also

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for legoman, version 3.0.3.post1
Filename, size File type Python version Upload date Hashes
Filename, size legoman-3.0.3.post1-py3-none-any.whl (32.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size legoman-3.0.3.post1.tar.gz (32.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page