跳转到内容

Mustache 模板代码检查与格式化工具

djLint 可以检查和格式化 Mustache 模板。设置 handlebars 预设,让规则和格式化方式适合这类模板。

什么是 Mustache?

终端窗口
djlint /path/to/templates --profile=handlebars

在项目的 pyproject.toml、djlint.toml / .djlint.toml 或 .djlintrc 文件中配置 djLint。

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