Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang

License

NotificationsYou must be signed in to change notification settings

djlint/djLint

Repository files navigation


djLint Logo

🏗️ Maintainers needed, please reach out on discord or email!

The missing formatter and linter for HTML templates.

tweetDiscord Chat

Codecov StatusCodacy StatusDownloadsnpmPypi Download

What lang are you using?

DjangoJinjaNunjucksTwigHandlebarsMustacheGoLangAngular

demo

🤔 For What?

Once upon a time all the other programming languages had a formatter and linter. Css, javascript, python, the c suite, typescript, ruby, php, go, swift, and you know the others. The cool kids on the block.

HTML templates were left out there on their own, in the cold, unformatted and unlinted :( The dirty corner in your repository. Something had to change.

djLint is a community build project to and add consistency to html templates.

✨ How?

Grab it withpip

pip install djlint

Or with the npm experimental install - Note, this requires python and pip to be on your system path.

npm i djlint

Lint your project

djlint. --extension=html.j2 --lint

Check your format

djlint. --extension=html.j2 --check

Fix my format!

djlint. --extension=html.j2 --reformat

💙 Like it?

Add a badge to your projectsreadme.md:

[![Code style: djlint](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://www.djlint.com)

Add a badge to yourreadme.rst:

..image::https://img.shields.io/badge/html%20style-djlint-blue.svg:target:https://www.djlint.com

Looks like this:

djLint

🛠️ Can I help?

Yes!

Would you like to add a rule to the linter? Take a look at thelinter docs andsource code

Are you a regex pro? Benchmark and submit a pr with improved regex for thelinter rules

⚠️ Help Needed!⚠️Good with python? djLint was an experimental project and is catching on with other devs. Help out with a rewrite of the formatter to improve speed and html style for edge cases. Contribute on the2.0 branch

🏃 Other Tools Of Note

  • DjHTML A pure-Python Django/Jinja template indenter without dependencies.
  • HTMLHint Static code analysis tool you need for your HTML
  • curlylint Experimental HTML templates linting for Jinja, Nunjucks, Django templates, Twig, Liquid

[8]ページ先頭

©2009-2025 Movatter.jp