HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang
Find a file
Christopher Pickering 41e95ce63b
fixed test coverage
2021-08-17 08:56:40 -05:00
.github/workflows added cancel script 2021-07-29 13:43:24 -05:00
docs fixed #5 updated version 2021-08-11 18:34:47 -05:00
src/djlint fixed test coverage 2021-08-17 08:56:40 -05:00
tests fixed test coverage 2021-08-17 08:56:40 -05: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
CHANGELOG.md code cleanup 2021-07-13 12:25:29 -05: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
pyproject.toml updated lint and version 2021-07-30 12:37:57 -05:00
README.md added usage to readme 2021-07-30 08:56:31 -05:00
setup.cfg added reformatter 2021-07-23 15:58:24 -05:00
setup.py fixed #5 updated version 2021-08-11 18:34:47 -05:00
tox.ini fixed test coverage 2021-08-17 08:56:40 -05:00

djLint Logo

Simple html template linter and reformatter to find common formatting issues. djLint is intended as a django template linter and django template formatter.

Ps, --check it out on Jinja and Handlebar templates as well!

codecov test Codacy Badge Maintainability Downloads

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: black](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 - Please Help!

Checkout the issue list and help where you can!