Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

a tiny static website generator

Project description

legoman

logo

A tiny static web generator in 60 lines.

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

Demo

Usage

pip install legoman

# in an empty directory
legoman init
make html

# run devserver (requires inotify-tools)
make devserver

How it works

  • .md files are rendered using the template specified in their frontmatter
  • .j2 files are rendered with Jinja2. They can loop over .md files and access their metadata
  • all other files are symlinked to output/

For example, the demo content/:

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

yields this output/

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

See also

  • Hugo - similar idea, but written in Go and uses Go's templating engine

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 1.post1
Filename, size File type Python version Upload date Hashes
Filename, size legoman-1.post1-py3-none-any.whl (93.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page