Zum Inhalt springen

Linter und Formatter für Twig-Templates

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

Was ist Twig?

Pebble-Templates (Java) sind Twig-kompatibel. Verwenden Sie für sie daher dasselbe Profil.

Terminal-Fenster
djlint /path/to/templates --profile=nunjucks

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

pyproject.toml
[tool.djlint]
profile = "nunjucks"
djlint.toml / .djlint.toml
profile = "nunjucks"
.djlintrc
{ "profile": "nunjucks" }