Skip to main content

user-friendly generation of websites with jinja2 templates

Project description

jinja2html

Build Status Python 3.9+ License: GPL v3

jinja2html takes your jinja2 templates and outputs HTML.

More importantly, it supports developer-friendly live reloading so that you can create that masterpiece of a static website without ripping your hair out.

Why jinja2html?

Blogging frameworks are a dime a dozen. But what if you don't want to write a blog? What if you wanted to make a static landing page, but without all that client-heavy nonsense like React/Vue/Angular/etc?

That's where jinja2html comes in.

No fancy bells and whistles, no bull$hit, just your bold artisitic vision + jinja2html.

Install

pip install jinja2html

This installs the CLI command, jinja2html, which can be used to generate html or start the local development server.

Usage

usage: __main__.py [-h] [-d] [-p port] [-i input_dir] [-o output_dir] [-t template_dir] [--blacklist ignored_dir [ignored_dir ...]]

Render jinja2 templates as html/css/js

optional arguments:
  -h, --help            show this help message and exit
  -d                    enable development mode (live-reload)
  -p port               serve website on this port
  -i input_dir          The input directory (contianing jinja templates) to use. Defaults to the current working directory.
  -o output_dir         The output directory to write website output files to. Defaults to ./out
  -t template_dir       Shared templates directory (relative path only, this must be a subfolder of the input directory). Defaults to templates
  --blacklist ignored_dir [ignored_dir ...]
                        directories to ignore

Examples

# generate html files for use in prod
jinja2html

# run in dev mode, in the current directory
jinja2html -d

# generate html files for use in prod and ignore folders Foo/ and Bar/
jinja2html -d --blacklist Foo/ Bar/

# run in dev mode, on port 8080 and ignore folder hello/world/
jinja2html -d -p 8080 --blacklist hello/world/

Scope

jinja2html is designed for small and simple static websites. If you're trying to do something big and complex, then you should stick with the tooling of a conventional front-end framework.

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

jinja2html-0.4.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

jinja2html-0.4.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jinja2html-0.4.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for jinja2html-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f7ba6745faf1f33f6a5454719ef6b40cdb509b146fd46a081c46ca2811100c51
MD5 5aa78c264d9668df80199be5f8fdb10a
BLAKE2b-256 8a1e4d8c13a8383b28dd38704b0fb59924ee8caf4c1d69d4bb4eb4f6e0e9186e

See more details on using hashes here.

File details

Details for the file jinja2html-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: jinja2html-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for jinja2html-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97db8e2fed17edc97e4c93f6247c5dee1e5d9fb45b799f1b0a947cdd7b80c5d7
MD5 57e895a7b86f7355d6aeeaa7dc43392c
BLAKE2b-256 7e57c0da776806f30ab463d43a2caaed7b6fd374fb0431fbdc111e40e779b1eb

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