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 · 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.6.1.tar.gz (32.9 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.6.1-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.6.1.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.2 Linux/5.11.0-1021-azure

File hashes

Hashes for djlint-0.6.1.tar.gz
Algorithm Hash digest
SHA256 045c030d28d710312d294ff246561fb7f5cc99bad14f0f0f705560619764ffe0
MD5 d45a3bc8841be789433dfea217418802
BLAKE2b-256 271095cd2b82dc6740c5f82a4c140714d0d945c0009c9ef26053a5170791a2d0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for djlint-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e079609107e160693ffea98ad0feb80db35b1ab4c67f3d31d3317fa1b64e08
MD5 1c0590e604f679dfc6a7d84ece8dbde0
BLAKE2b-256 2eea80c58cf78593522988b897bb2ea6e68b72de1e21887e79081ad9d6304422

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