HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang
Find a file
2021-11-19 09:43:59 +01:00
.github Add Python 3.10 testing 2021-10-29 20:48:00 +08:00
docs fixed #139, updated tests 2021-11-19 09:43:59 +01:00
src fixed #139, updated tests 2021-11-19 09:43:59 +01:00
tests fixed #139, updated tests 2021-11-19 09:43:59 +01:00
.coveragerc fixed test coverage 2021-08-17 08:56:40 -05:00
.gitignore fixed bug with col number 2021-07-23 09:19:41 -05:00
.pre-commit-config.yaml initial commit 2021-07-12 13:26:46 -05:00
.pre-commit-hooks.yaml Make the repo a pre-commit hook. 2021-11-12 01:30:16 +00:00
LICENSE initial commit 2021-07-12 13:26:46 -05:00
MANIFEST.in updated formatter and docs 2021-07-29 13:41:34 -05:00
poetry.lock Updates PyYAML to 6.0. 2021-11-10 19:12:49 -05:00
pyproject.toml updated version 2021-11-16 11:54:15 +01:00
README.md restructured code. closes #111 2021-10-14 13:19:48 +03:00
setup.cfg updated py version 2021-09-20 17:28:58 +02:00
tox.ini Add Python 3.10 testing 2021-10-29 20:48:00 +08:00

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.