Skip to content
/ djLint Public
forked from djlint/djLint

HTML Template Linter and Formatter. Use with Django, Jinja, Nunjucks and Handlebars templates.

License

Notifications You must be signed in to change notification settings

jayvdb/djLint

 
 

Repository files navigation

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.

About

HTML Template Linter and Formatter. Use with Django, Jinja, Nunjucks and Handlebars templates.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.0%
  • HTML 1.0%