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

  • 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.

Source Distribution

legoman-1.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

legoman-1-py3-none-any.whl (54.3 kB view details)

Uploaded Python 3

File details

Details for the file legoman-1.tar.gz.

File metadata

  • Download URL: legoman-1.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for legoman-1.tar.gz
Algorithm Hash digest
SHA256 335b68e0e9ee6153e54388273fb4a739e480cfec0d2aa58e035832fe36fd1307
MD5 a3889fc236f7d31dd3be101642809c1e
BLAKE2b-256 5d67ae6e98db981a82f001f21f62fbf7323a61d64a3b2b521b071f7a83111a6c

See more details on using hashes here.

File details

Details for the file legoman-1-py3-none-any.whl.

File metadata

  • Download URL: legoman-1-py3-none-any.whl
  • Upload date:
  • Size: 54.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8

File hashes

Hashes for legoman-1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea786ead2e3c0068ab03359a6ac5b681470b7a80c21731fbf8bc0031b9c5b823
MD5 5fd2642cc69bad5d1b82f33960a754e4
BLAKE2b-256 ef7ea9954116b75965717efecf6b6542bab76ea9e70845778a51326b7c495784

See more details on using hashes here.

Supported by

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