bagel

Bagel is a naive static website generator.


Keywords
static, website, generator, bagel
License
Other
Install
pip install bagel==0.3.2

Documentation

Bagel

Description

Bagel is a naive static website generator.

Using a tempting system that pairs with your available command line tools, bagel helps you build websites without getting in the way.

Everything is constructed completely inside your HTML templates, no frameworks, libraries, or special syntax. Shell commands within the template are evaluated and rendered into a static file.

Python LiveReload

Using python-livereload is not required, but it makes development even faster and nearly seamless. There is a basic server.py in the example project directory.

Install

$ pip install bagel

Or clone this repository and run:

python setup.py install

Usage

$ bagel --help
usage: bagel [-h] [-t FILE_TYPE] [source] [target]

Evaluate template code and render file(s)

positional arguments:
  source                input path
  target                output path

optional arguments:
  -h, --help            show this help message and exit
  -t FILE_TYPE, --file-type FILE_TYPE
                        file extension for templates (ex: html)

Examples

Read from stdin and write to file:

$ cat app/template.html | bagel > bulid/index.html

Pass in source and target files as arguments:

$ bagel app/template.html build/index.html

Or render all html files in a directory:

$ bagel --file-type html app/templates/ bulid/

Screenshots

screenshots/template.png screenshots/index.png