Skip to main content

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

Project details


Download files

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

Source Distribution

legoman-2.tar.gz (132.1 kB view hashes)

Uploaded Source

Built Distribution

legoman-2-py3-none-any.whl (134.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page