From 0afc76fb78518bf8185c02e548e83e63c8bb0153 Mon Sep 17 00:00:00 2001
From: Dennis Fink
Date: Sat, 31 Oct 2026 19:07:58 +0100
Subject: chore(core): add djlint template tooling
Add djlint to the development toolchain with Jinja, CSS, and JavaScript
formatting rules so template style can be checked and normalized
consistently.
Reformat existing templates to match the configured conventions.
---
webmentions_ssg/templates/.djlintrc | 14 ++++++++++++++
webmentions_ssg/templates/base.html | 24 +++++++++++++-----------
webmentions_ssg/templates/login.html | 2 ++
webmentions_ssg/templates/received.html | 3 +++
webmentions_ssg/templates/sent.html | 5 ++++-
webmentions_ssg/templates/sent_source.html | 7 +++++--
webmentions_ssg/templates/status.html | 2 ++
7 files changed, 43 insertions(+), 14 deletions(-)
create mode 100644 webmentions_ssg/templates/.djlintrc
(limited to 'webmentions_ssg')
diff --git a/webmentions_ssg/templates/.djlintrc b/webmentions_ssg/templates/.djlintrc
new file mode 100644
index 0000000..75c02c7
--- /dev/null
+++ b/webmentions_ssg/templates/.djlintrc
@@ -0,0 +1,14 @@
+{
+ "blank_line_before_tag": "macro,block",
+ "blank_line_after_tag": "endmacro,extends",
+ "profile": "jinja",
+ "format_css": true,
+ "css": {
+ "indent_size": 2
+ },
+ "format_js": true,
+ "js": {
+ "indent_size": 2
+ },
+ "indent": "2"
+}
diff --git a/webmentions_ssg/templates/base.html b/webmentions_ssg/templates/base.html
index 15739ab..19412ed 100644
--- a/webmentions_ssg/templates/base.html
+++ b/webmentions_ssg/templates/base.html
@@ -20,6 +20,7 @@ SPDX-License-Identifier: BSD-3-Clause
type="image/png"
sizes="32x32"
href="{{ url_for('static', filename='images/favicon.png') }}">
+
{% block styles %}
{{ bootstrap.load_css() }}
@@ -31,7 +32,7 @@ SPDX-License-Identifier: BSD-3-Clause