Skip to content
A refreshingly simple static site generator, for those who like to work in HTML.
Branch: master
Clone or download
audreyr Merge pull request #30 from zorba-4/HTML-minification
Added support for minification of html files
Latest commit 710dc77 Aug 28, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
complexity
docs Merge pull request #40 from matthewolsson/master May 13, 2015
requirements More explicit requirements files for Python 2.6, 2.7, 3.3. Also test … Aug 24, 2013
tests Added support for minification of html files, and also changed some o… Dec 7, 2013
.gitignore Add 'make coverage' setup. Aug 24, 2013
.travis.yml Fix Travis requirements. Aug 24, 2013
AUTHORS.rst Add @ialja to contributors list. Sep 20, 2013
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in Fix build on Python 3.3. Jul 13, 2013
Makefile Add help and packaging commands to Makefile. Aug 24, 2013
README.rst Added support for minification of html files, and also changed some o… Dec 7, 2013
setup.py Release 0.9.1. Dec 3, 2013
tox.ini More explicit requirements files for Python 2.6, 2.7, 3.3. Also test … Aug 24, 2013

README.rst

Complexity

https://badge.fury.io/py/complexity.png https://travis-ci.org/audreyr/complexity.png?branch=master https://pypip.in/d/complexity/badge.png

A refreshingly simple static site generator, for those who like to work in HTML.

Documentation

The full documentation is at http://complexity.rtfd.org.

Quickstart

Try it out:

$ pip install complexity
$ git clone git@github.com:audreyr/complexity-example.git my_proj
$ cd my_proj
$ complexity project/ www/

Once you've done that, open a web browser to http://127.0.0.1:9090 to see the newly generated Complexity static site.

Features

  • Works on Python 2.6, 2.7, and 3.3, and on PyPy.
  • Takes simple HTML templates as input.
  • Data from .json files turns into template context data.
  • Template inheritance, filters, etc. (Brought to you by Jinja2.)
  • Auto-expands .html file URLs into cleaner URLs (e.g. about.html gets expanded to /about/)
  • Minifies .html files
  • Can optionally be used as a library instead of from the command line. See Using Complexity as a Library for details.

Best Used With

Complexity is designed to be used with these packages:

  • Simplicity: Converts ReStructuredText into JSON, which Complexity can use as input.
  • A Lot of Effort: Deploys a static website (e.g. the output of Complexity) to Amazon S3.
  • Cookiecutter: Creates projects from project templates.

Sure, they could have all been built into Complexity, but decoupling them seemed like a nice thing to do.

Community

  • Stuck? Don't know where to begin? File an issue and we'll help you.
  • We love contributions. Read about how to contribute.
You can’t perform that action at this time.