Skip to main content

Static Site Generator

Project description

Nib is a static site generator, written in Python, geared toward creating a simple site or blog, with the ability to generate metadata pages based on content attributes. It understands concepts like tags, archives, and paging series of individual entries into larger blocks of content. It is designed to be easily extended to create new content types with customized behaviors.

Concept

Nib uses a pluggable content pipeline that differentiates between “resources” like CSS or Javascript, and “documents” such as static pages or blog posts. The two pipelines are similar, are executed in parallel, and define multiple hooks where plugins can process a subset of entities, and even remove entities or generate new ones at runtime.

Requirements

  • Python 3.2

Installation

To install the latest official release:

$ pip3 install nib

or to install the version currently checked out from source:

$ python3 setup.py install

Getting Started

Once Nib is installed, you can generate basic configuration and site using the built-in wizard:

$ mkdir somesite && cd somesite $ nib wizard …

Once the wizard is complete, you should have a site configuration file, some example documents (a page and two blog posts), and a minimal site theme consisting of resources (favicon, CSS, and robots.txt), and templates:

$ ls config.nib documents/ resources/ templates/

$ ls documents about.md links/ posts/

$ ls resources favicon.ico main.less robots.txt

$ ls templates feed.xml list.html macros.html page.html post.html posts.html

To build the site:

$ nib … Done

The resulting HTML and resources will be in the site/ directory:

$ ls config.nib documents/ resources/ site/ templates/

$ ls site 2012/ about.html archive.html favicon.ico feed.xml index.html links/ main.css posts/ robots.txt tags/

To test the resulting site, Nib can run a simple HTTP server, as well as open the local server in your preferred web browser:

$ nib serve Serving site on port 8000… press Ctrl-C to terminate. ^C Done

or:

$ nib serve –port 9000 –browse Serving site on port 9000… press Ctrl-C to terminate. Opening http://localhost:9000 in web browser… ^C Done

License

Nib is licensed under the MIT license. See the LICENSE file for details.

Credits

Nib is developed by [John Reese](http://noswap.com) as a labor of love. It builds on top of many fine projects from the open source community, such as:

Inspiration for Nib its design is thanks to [Oben Sonne](http://obensonne.bitbucket.org/) and his project [Poole](http://bitbucket.org/obensonne/poole).

Project details


Download files

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

Source Distribution

Nib-0.4.0.tar.gz (10.5 kB view details)

Uploaded Source

File details

Details for the file Nib-0.4.0.tar.gz.

File metadata

  • Download URL: Nib-0.4.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Nib-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5df50fc6dd64aa51191dd8990d78c8bff2f3369b53e77b31c36902b591c3e35c
MD5 94be21c100d3d5989af7b8d3c45366cd
BLAKE2b-256 4f159654c17f8c887638c89d55b4a07895bb5c1c7af5798ff3f2514d8866352d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page