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

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.5.2

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.5.2.tar.gz (29.4 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.5.2-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.5.2.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.2 Linux/5.8.0-1042-azure

File hashes

Hashes for djlint-0.5.2.tar.gz
Algorithm Hash digest
SHA256 2fbb7053c030b818448519d53f72022b162917565b1a952e09d89ffbf9904da4
MD5 d6beceb6d836272a0bb5ac3f07eb0ce1
BLAKE2b-256 05215de92b01a767889c6071bec9da9b24a884b99af68d0c2728e487eba088ce

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for djlint-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d276310b045c91cc6838c53cded723a806dea15b77e7c8e4ff0b7d5b4b69c21
MD5 12fec06d15a51eea2d233ac43941280b
BLAKE2b-256 8745132864b52d83399b2f248334c47f370fe00240352d64b65eea08ce9e5a12

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