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

Send a pr with a new feature, or 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.4.7.tar.gz (28.0 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.4.7-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.4.7.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.8.2 Linux/5.8.0-1042-azure

File hashes

Hashes for djlint-0.4.7.tar.gz
Algorithm Hash digest
SHA256 9c7ec3a6bb0b0e9b55684767e981df8a4fdb78a6cc80aa1b36c5404eea65a252
MD5 3f9bbf839113b3320fcf72e05acdc529
BLAKE2b-256 3a8847fa3f78f4219474b5573a3b1590fb930b47e5cc801fad87ecfc11ded7ae

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for djlint-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fe5047a79ee812bf2d2a5aef0fb482659c6becef66f9e3f6b9a380ca8d1612fb
MD5 4509590af55dd1f8b9ef58a70fb8d5dc
BLAKE2b-256 da046bce077b05546d6c0c838be65788ef1e0c4c1412c23a0285142e9811ae49

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