Skip to main content
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.

  • Takes simple HTML templates as input.

  • Template inheritance, filters, etc. (Brought to you by Jinja2.)

  • Data from .json files turns into template context data.

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.

History

0.4.1 (2013-07-19)

  • Fix reading of JSON files from json/.

0.4 (2013-07-19)

  • Project layout is now:

    my_repo/
    ├── project/       <--------- input
    │   ├── assets/
    │   │   ├── css/
    │   │   ├── js/
    │   │   └── img/
    │   ├── json/
    │   │   └── stuff.json
    │   └── templates/
    │       ├── base.html
    │       ├── index.html
    │       └── about.html
    └── www/          <---------- output (generated)
        ├── index.html
        ├── about/
        │   └── index.html
        ├── css/
        ├── js/
        └── img/
  • Assets are copied over to www/ during site generation.

  • If the www/ directory was previously created, it prompts the user and then deletes it before site regeneration.

  • Templates starting with base are not generated as individual pages. They are meant to be extended in other templates.

0.3 (2013-07-18)

  • Graceful shutdown/restart of dev server.

  • Required input and output dir arguments.

  • Optional port argument.

  • Improved server start/stop messages.

  • Major internal refactor.

0.2.1 (2013-07-15)

  • Fixes to setup.py.

0.2.0 (2013-07-15)

  • Data from .json files now gets read as template context data.

  • Tested (and passing!) on Python 2.6, 2.7, 3.3, PyPy.

0.1.1 (2013-07-10)

  • First release on PyPI.

Download files

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

Source Distribution

complexity-0.4.1.tar.gz (9.5 kB view details)

Uploaded Source

File details

Details for the file complexity-0.4.1.tar.gz.

File metadata

  • Download URL: complexity-0.4.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for complexity-0.4.1.tar.gz
Algorithm Hash digest
SHA256 009ea107e3252d1878ef7408b32bca15e2d4b3e3655f0315832bb98701044587
MD5 97cd1ab87096f0c71b87f232d998c4ae
BLAKE2b-256 9d7ced862673fc32c485f81149f6ea268b9d87b6780f342ba68a1874f0ca8b09

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