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

This version

0.7.0

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.0.tar.gz (33.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.7.0-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.7.0.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.2 Linux/5.11.0-1022-azure

File hashes

Hashes for djlint-0.7.0.tar.gz
Algorithm Hash digest
SHA256 b26bcdf2e2761f514ee9a5a71ef2b14571006e7d9d02456a3b5b38073b89e316
MD5 608d30d962b82917a7bbda3bfcbb8ad2
BLAKE2b-256 65f67f460dfc8e86cec46d25b87ffcc9d6222606831b2e26fb469318014b371d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for djlint-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56daf476e8dcd5afb408b9c0b386b3058c98330f2a645b25f5502fe63d1755a7
MD5 41550d9a2d812055dcb36af6713aa84c
BLAKE2b-256 e904faa0f06e7f329ff2e8dcf42be1d4185f00e347e285249fdf00f1d1ee0080

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