Skip to main content

HTML Template Linter and Formatter

Project description

djLint Logo

Find common formatting issues and reformat HTML templates.

<style> .types { text-align: center; font-size: 110%; font-style: italic; width: 100%; position: relative; } .types::after { position: absolute; top: 11px; left:0; right:0; border: 1px solid rgba(0,0,0,.2); content: ""; z-index: -1; } .types span { padding: 15px; margin: 5px; background: #fff; z-index:1; } </style>

Django Jinja Nunjucks Handlebars

Ps, --check it out on Jinja and Handlebar 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

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

Checkout the issue list and help where you can.

Project details


Release history Release notifications | RSS feed

This version

0.3.5

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: djlint-0.3.5.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.2 Linux/5.8.0-1040-azure

File hashes

Hashes for djlint-0.3.5.tar.gz
Algorithm Hash digest
SHA256 648aa7fb0f3fe7b2c21bca6051f1a8caab79c0c81e8a70517c9869e6ccfaad57
MD5 c430518b86a469267e63d52106b36be7
BLAKE2b-256 864d824e49e0bec2bc98c238d7a3a16fdd50ef136dd8f4ab331d829cf90cc2f6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for djlint-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 09ff8b1f7a3820571ba17c33c63383cf0e507a0546a235d2def4fefe7085c204
MD5 815bc62fd515a0f588a74ce6127bee6b
BLAKE2b-256 040a065d8dd6cc525ed6cccec0cbadaaa27cd8735215b973d5a7a9cf22105346

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