Skip to main content

HTML Template Linter and Formatter

Project description

djLint Logo

Find common formatting issues and reformat HTML templates.

Django · Jinja · Nunjucks · Handlebars

Ps, --check it out on other templates as well!

codecov test Codacy Badge Maintainability Downloadschat

Documentation

Read the documentation

Installation and Usage

djLint can be installed with pip install djlint, and is easy to run:

# to lint a directory
djlint /path

# to lint a directory with custom extension
djlint /path -e html.dj

# to check formatting on a file
djlint /path/file.html.j2 --check

# to reformt a directory without printing the file diff
djlint /path --reformat --quiet

# using stdin
echo "<div></div>" | djlint -

Show your format

Add a badge to your projects readme.md:

[![Code style: djlint](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://github.com/Riverside-Healthcare/djlint)

Add a badge to your readme.rst:

.. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg
   :target: https://github.com/Riverside-Healthcare/djlint

Looks like this:

djlint

Contributing

Checkout the issue list and help where you can.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

djlint-0.3.8.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

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

djlint-0.3.8-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file djlint-0.3.8.tar.gz.

File metadata

  • Download URL: djlint-0.3.8.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.2 Linux/5.8.0-1041-azure

File hashes

Hashes for djlint-0.3.8.tar.gz
Algorithm Hash digest
SHA256 b77e99eb3a8bb3e64409baa738d4397f4bd9a4561c70dd2449288d0b4b19ca14
MD5 72b7c7681c76406d41ae81e47ac98c8f
BLAKE2b-256 5b384cfaa1643b6ca20d6c1d51ee46d675ea8ea8daaf8d051464cdc9f9d30a89

See more details on using hashes here.

File details

Details for the file djlint-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: djlint-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.2 Linux/5.8.0-1041-azure

File hashes

Hashes for djlint-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f9079077728163fc722e17cd6d807f0ef98bbd914dc7fb0f857b8c4a066d5616
MD5 0853c5e2f45a35b30e5889b05ca36bc5
BLAKE2b-256 789186edb7ae7181100b42323fc1f512954031ee057f9014081beb8fe7095865

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