Skip to main content

HTML Template Linter and Formatter

Project description

djLint Logo

Find common formatting issues and reformat HTML templates.

Django · Jinja · Nunjucks · Twig · Handlebars · Mustache · GoLang

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

codecov test Codacy Badge Maintainability Downloadschat PyPI

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.7.6.tar.gz (34.6 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.7.6-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.7.6.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.2 Linux/5.11.0-1028-azure

File hashes

Hashes for djlint-0.7.6.tar.gz
Algorithm Hash digest
SHA256 7d36548d45b88835f5a20c50970eb41c01833fdaadabc07605407294252100bb
MD5 b3a07a05ef669dbf53c9e11ffc379bd2
BLAKE2b-256 fe75f0009ce89035383100a940d95b815c6b49c20fd13c4b05bb791ecc20391f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: djlint-0.7.6-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.2 Linux/5.11.0-1028-azure

File hashes

Hashes for djlint-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d14d25e1eeebc70ccfcf8dedbcf22e8dc791419ae736aeda9b12b5e7e61cfc04
MD5 9a18672e2051d36a1f6ccb1466e466a5
BLAKE2b-256 5347eeb4fdda87e1b7753e3f594a10ca0b46280f784e2dd02ff86b1ea23ddd98

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