Package: complexity
A refreshingly simple static site generator, for those who like to work in HTML.DocumentationThe full documentation is athttp://complexity.rtfd.org.QuickstartTry 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 tohttp://127.0.0.1:9090to see the newly generated Complexity static site.FeaturesWorks 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/)Can optionally be used as a library instead of from the command line. SeeUsing Complexity as a Libraryfor details.Best Used WithComplexity 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.CommunityStuck? Don’t know where to begin? File an issue and we’ll help you.We love contributions. Read abouthow to contribute.History0.9.1 (2013-12-02)Depend on Jinja2 >= 2.4, not == 2.7.0.9.0 (2013-08-28)CONFIG CHANGE: Configuration is now via acomplexity.ymlfile inside the
project, instead of acomplexity.jsonfile.Support for anunexpanded_templatesconfig option (#23).Support for non-HTML files intemplates/(or whatever you settemplates_dirto be).Seehttp://complexity.readthedocs.org/en/latest/advanced_usage.html#config-using-complexity-ymlfor more info.0.8.0 (2013-08-10)USAGE CHANGE: At the command line, Complexity no longer takes an output_dir
argument. It now assumes that your output_dir iswww/by default, but you
can customize it incomplexity.json.Support for configuration viacomplexity.json: you can specify any or all
of the following key/value pairs:output_dirtemplates_dirassets_dircontext_dirSeehttp://complexity.readthedocs.org/en/latest/advanced_usage.html#config-using-complexity-jsonfor more info.0.7 (2013-08-05)A couple of small but important renames. If you rely on either of the following
defaults, you will need to rename them in your Complexity project.Directory parameter for .json files to be turned into context data has been
renamed fromjson_dirtocontext_dir.Default context directory valuejson/has been changed tocontext/.Sometimes you want your .json files to be turned into context variables, and
sometimes you don’t. This rename alleviates confusion when working with
non-context .json files.0.6 (2013-07-26)Support for multi-level template directories. (Upgrade to at least 0.6 if
you want to have folders within folders and beyond intemplates/.)Skip non-HTML files intemplates/rather than raisingNonHTMLFileException.0.5 (2013-07-25)Improved static site generation API - better parameters are used.Files in the root ofassets/(or the asset directory) now get copied over to the output.Much more documentation.0.4.2 (2013-07-21)Make reading of JSON files fromjson/optional.0.4.1 (2013-07-19)Fix reading of JSON files fromjson/.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 towww/during site generation.If thewww/directory was previously created, it prompts the user and then
deletes it before site regeneration.Templates starting withbaseare 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.