Skip to main content

Just a static site generator

Project description

Let me explain what was inside my head as I start this:

There are a bunch of templates that defined some basic views, like a list-view, a card-view or some grid-view. And the content files will be in another folder. Every file contains some data and define the template for the render. The structure of the files will be the structure of the output html files.

And there it is. Still under development!


pip install justic


python -m justic example
python -m http.server --directory example/build

Content files

The content are simple python files with a specific structure. There are three important sections:


For settings for the Justic class. This will be inherited to the sub directory.


Parameters for the current instance, like the template name or build file.


All other capitalized variable will be passed to the template.

All Parameters:

__JUSTIC__ = {
  'remove_build_prefix': 'content',
  'default_template': 'index.html',

__META__ = {
  'target': 'content',
  'targets': ['content'],
  'static': 'static',
  'template': 'foo.html',

TITLE = 'Foo'


Virtual environment windows:

python -m venv venv

Virtual environment linux:

python3 -m venv venv
source venv/bin/activate

Setup project:

python -m pip install --upgrade pip wheel setuptools coverage pytest flake8 pylint tox
python -m pip install -e .

Run single test with code coverage:

coverage run --source=justic -m pytest
coverage report -m

Run test for multiple python versions:

tox -p auto

Check syntax:

python -m flake8 justic
python -m pylint --rcfile=setup.cfg justic

Create package Jenkins will do it:

git tag -a 0.1.7 -m "version 0.1.7"
git push --follow-tags

No Jenkins?:

python -m pip install --upgrade twine
python sdist bdist_wheel
python -m twine check dist/*
python -m twine upload dist/*


  1. copy static don’t work for sub directory

  2. improve test

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

justic-1.0.0.tar.gz (58.2 kB view hashes)

Uploaded source

Built Distribution

justic-1.0.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded py3

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