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.4.tar.gz (27.5 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.4-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for djlint-0.4.4.tar.gz
Algorithm Hash digest
SHA256 6f662f0979ed344ddd097c0707dcdb78c1e450454e727d3ac4f2eebbcf3237eb
MD5 58501c43ec8677d6828594d69aec5b0e
BLAKE2b-256 ec89a0f7720bc031759c8881a9c645284a5311d6e6966bf31eb7a928fd1cbc7a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for djlint-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 76affb7594b487d4a3aae3cb6c6ac4cbea9177d57c447b66b85d94af6effef4c
MD5 0630a74afc9a1573f521972dc69cede8
BLAKE2b-256 040d315c87732502d120f6eba524b08c488871b93191c3c41a4922401452beb1

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