Skip to main content

A simple static website generator

Project description

sssimp :snake:

Simple Static Site Inductor Made in Python

Why?

I wanted a simple way to generate static websites and I like Jinja2. I had previous experiences working with Jekyll but it seemed like too much work to setup everytime and overkill for the job as it supports many features I don't necessarily use.

Installing

pip install sssimp

How to use

Create a folder called input, it will hold the data to generate the site.

Running python -m sssimp will generate content in the output folder.

Generators

  • Files placed in input/content will be directly copied to the output folder

    Example:
    input/content/favicon.png -> output/favicon.png

  • HTML files with the suffix .html placed in input/content will be parsed as Jinja2 templates, they can use templates defined in input/templates.
    See the Jinja2 documentation

    Example:
    input/content/index.html -> output/index.html
    Starting with content

    {% extends "base.html" %}
    
    ...
    

    Will use the template input/templates/base.html

  • CSS files in input/css will be merged together in a single file output/bundle.css

  • Markdown files with the suffix .md placed in input/content will be parsed to HTML and passed to a template with the same name as their parent folder as the parameter markdown

    Example:
    ./input/content/post/hello-world.md -> ./output/post/hello-world.html
    Using the template ./input/templates/post.html
    Generated with context {'markdown': 'the markdown file converted to HTML'}

    The template name can be overriden using the markdown meta argument "template"

    Example:
    ./input/content/post/special.md -> ./output/post/special.html
    Starting with content

    ---
    template: special.html
    ---
    
    ...
    

    Will use the template ./input/templates/special.html instead of post.html

    Examples

    See the example branch for an example input folder

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

sssimp-0.0.6.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

sssimp-0.0.6-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file sssimp-0.0.6.tar.gz.

File metadata

  • Download URL: sssimp-0.0.6.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for sssimp-0.0.6.tar.gz
Algorithm Hash digest
SHA256 6f305595236a612696427bab41c53ba0b063c9844515271067c566a44c2628c5
MD5 2841acf7ca19d8a626f2303515be56b1
BLAKE2b-256 a43073cf8314c9c24bd4312326362ee85f369cd159efeacb619483941b0c945e

See more details on using hashes here.

File details

Details for the file sssimp-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: sssimp-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for sssimp-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 34a5d21d18bffeefe919c03127e743ebecc998eac3b81191b19571e44b40c5b4
MD5 f3c891503b21da15bf500a8b62b9fa58
BLAKE2b-256 1774d93178d482425485ad0dab9555000b92024aa6aaf53c37b752163c6b8717

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