Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

inseven/incontext-python

Repository files navigation

InContext (Python)

Extensible static site generator

This Python version of InContext has now been replaced with a newer Swift implementation and is no longer being maintained.

Background

Most existing static site generators do a great job with text content, but treat media as an afterthought. InContext handles Markdown just as well as generators like Jekyll, and adds native support for photos and video. Adding support for additional media types is simply a matter of adding a new handler.

Installation

  1. Install Docker
  2. Clone the repository:
    git clone git@github.com:inseven/incontext.git
  3. Add InContext to your path:
    export PATH=$PATH:/path/to/incontext

Getting Started

incontext new my-new-site
cd my-new-site
incontext build

Front Matter

InContext has a few special Front Matter properties.

Include

By convention, collection templates are expected to use the include property to determine which document categories are included.

For example,

include:
  - posts
  - photos

Exclude

By convention, collection templates are expected to use the exclude property to determine which document categories should be excluded.

For example,

exclude:
  - drafts
  - screenshots

Sort

Collection templates make use of the sort property to determine the date-based sort order of content.

For example,

sort: ascending

or,

sort: descending

Templates

InContext uses Jinja2 for templating with some additional custom filters. Check out the Jinja2 Template Designer Documentation for basic usage.

History

InContext is named after a Perl static site generator I wrote in 2005 (and failed to publish). Back then, every piece of software I wrote was named with the 'In' prefix in keeping with my in7.co.uk domain name (e.g., InJapan, InModem). Hopefully this is more widely useful than my first attempt.

InSeven Limited is still the name of my company.

Releases

No releases published

Packages

No packages published

Languages