Skip to main content

Plugin-based static project generator

Project description

Hausse logo

Hausse

Hausse is a python plugin-based static site generator. It works with plugins that can be chained to process files and produce the wanted result.

Installation

pip install hausse

How it works

First, create a Hausse project.

project = Hausse()

Then, use the plugins you need. For example, if you want to parse markdown files, there is the Markdown plugin.

project.use(Markdown())

You can use multiple plugins for more precise processing.

# If your markdown files have rich metadata values, you can process them too
project.use(MetadataMarkdown("rich_metadata"))
# you may also render your pages with html page layouts
project.use(Handlebars())

Finally, build your project.

project.build()

When your pipeline is done, you can save it to a hausse.json file.

project.save()

This file allows you to build your project directly from command line.

python -m hausse path/of/your/project

That's it !

Examples

Here are a few examples to illustrate the possibilities offered by Hausse and to inspire your future projects

  • Blog. Just a simple blog.
  • Portfolio, a single-page website featuring a résumé, skills overviews and projects showcases.
  • Notes extraction, a presentation of a CSV file of a Notes app data extraction.

What if I need a new plugin ?

Nothing more simple ! Writing a new plugin for Hausse is very easy. A Plugin is nothing more than a python object with a specific __call__ method.

When build() is called on a Hausse project, all Plugins are successively called as functions with the same arguments :

  • elements is a Element list. A Element represents a file, with its own metadata accessible as object attributes, and content stored in ._contents attribute.
  • metadata is a dictionary of global metadata.
  • settings is a dictionary of technical objects, deposited by some Plugins to be easily usable by others plugins.
for plugin in plugins:
    plugin(elements, metadata, settings)

You may also implement the __init__ method as you wish to store Plugin parameters that will be needed during the build.

Why this name ?

The word hausse is the french name for a honey super. It thus refers to the grid that you set up for the bees to build a layer of the structure, which you then harvest.

One may also consider it as an acronym for Highly Adjustable Universal Static Site Generator.

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

hausse-0.1.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hausse-0.1.1-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file hausse-0.1.1.tar.gz.

File metadata

  • Download URL: hausse-0.1.1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for hausse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 75c053709c0d0d51b94cf134c7f0aa5234c9f3681a034136c0a662d1df3626c0
MD5 45ad760a9ace063125a3ddbfcba1bbee
BLAKE2b-256 fc4348069cd6e77c706332ba0d070deb91ba8b7c89865c39faff6d86cc66210d

See more details on using hashes here.

File details

Details for the file hausse-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hausse-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for hausse-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34616e66552b516969c5f39915994f3b6c451fb42ac292982188cee88d08fe63
MD5 47870ab5450f52b824e7d7e143e28405
BLAKE2b-256 707394b7665cdf59ad28c2dc3d3fd54815d571371846f703792a4ca925a2f883

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