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.6.tar.gz (28.2 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.6-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.4.6.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.8.0 Darwin/20.6.0

File hashes

Hashes for djlint-0.4.6.tar.gz
Algorithm Hash digest
SHA256 fa64795a779ce7666e3b407f319f185f8c1ddbfbd8614fa9c6ded2c4a8645bfb
MD5 bb27bb4c19374db0b922cbd1f01e96e9
BLAKE2b-256 efade6289ada4e5e9bdd96c1e8a4482f23d285d471c8f805913221d2a079d7c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: djlint-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.8.0 Darwin/20.6.0

File hashes

Hashes for djlint-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3fc914a05f4afee7ef0da18a14f7478f18bbc79dadd6eb6c5c540a8645bf82aa
MD5 463ef9ffec73f7f70aababc3a79a5a18
BLAKE2b-256 9cf648df02bd4b81c24c9d4b7aad15af3487da5f21175709d1b247f57dc4b5f0

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