Linter und Formatter für Jinja-Templates

djLint lintet und formatiert Jinja-Templates. Setzen Sie das Profil jinja, damit Regeln und Formatierung zu ihnen passen.

Was ist Jinja?

MiniJinja-Templates sind vollständig Jinja2-kompatibel. Verwenden Sie daher ebenfalls das Profil jinja.

Auch die Jinjava-Templates von HubSpot folgen dem Jinja-Stil. Verwenden Sie dieses Profil also auch für sie.

Über die Befehlszeile

djlint /path/to/templates --profile=jinja

Oder über eine Konfigurationsdatei

Konfigurieren Sie djLint in der Datei pyproject.toml, djlint.toml / .djlint.toml oder .djlintrc Ihres Projekts.

[tool.djlint]
profile = "jinja"
profile = "jinja"
{ "profile": "jinja" }