diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 6ec95d00..172022ec 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -42,6 +42,9 @@ repos:
- id: djlint-reformat-jinja
files: ".*templates/.*.html"
types_or: ["html"]
+ - id: djlint-jinja
+ files: ".*templates/.*.html"
+ types_or: ["html"]
# Autoformat and linting, misc. details
- repo: https://github.com/pre-commit/pre-commit-hooks
diff --git a/docs/source/_templates/redoc.html b/docs/source/_templates/redoc.html
index bf764d11..6e457719 100644
--- a/docs/source/_templates/redoc.html
+++ b/docs/source/_templates/redoc.html
@@ -19,14 +19,18 @@
{%- block content %}
{%- endblock content %}
diff --git a/examples/service-announcement/templates/page.html b/examples/service-announcement/templates/page.html
index de980f51..23c544ab 100644
--- a/examples/service-announcement/templates/page.html
+++ b/examples/service-announcement/templates/page.html
@@ -1,10 +1,12 @@
{% extends "templates/page.html" %}
-{% block announcement %}
Jupyter has lots of moons, but this is not one...
{% endblock %}
+{% block error_detail %}
+ Jupyter has lots of moons, but this is not one...
+{% endblock error_detail %}
diff --git a/share/jupyterhub/templates/accept-share.html b/share/jupyterhub/templates/accept-share.html
index fd8d8d69..450795e1 100644
--- a/share/jupyterhub/templates/accept-share.html
+++ b/share/jupyterhub/templates/accept-share.html
@@ -1,5 +1,6 @@
{% extends "page.html" %}
-{% block login_widget %}{% endblock %}
+{% block login_widget %}
+{% endblock login_widget %}
{% block main %}
@@ -16,7 +17,7 @@
to start the server before you can access it.
{% endif %}
-
-{% endblock %}
+{% endblock main %}
diff --git a/share/jupyterhub/templates/admin.html b/share/jupyterhub/templates/admin.html
index c5936c7c..572003d9 100644
--- a/share/jupyterhub/templates/admin.html
+++ b/share/jupyterhub/templates/admin.html
@@ -2,12 +2,12 @@
{% block main %}
-{% endblock %}
+{% endblock main %}
{% block footer %}
JupyterHub {{ server_version }}
-{% endblock %}
+{% endblock footer %}
diff --git a/share/jupyterhub/templates/error.html b/share/jupyterhub/templates/error.html
index 1a63fe04..b7e8d9c0 100644
--- a/share/jupyterhub/templates/error.html
+++ b/share/jupyterhub/templates/error.html
@@ -1,5 +1,6 @@
{% extends "page.html" %}
-{% block login_widget %}{% endblock %}
+{% block login_widget %}
+{% endblock login_widget %}
{% block main %}
{% block h1_error %}
@@ -11,7 +12,7 @@
{% if extra_error_html %}
{{ extra_error_html | safe }}
{% endif %}
{% endblock error_detail %}
-{% endblock %}
+{% endblock main %}
{% block script %}
{{ super() }}
-{% endblock %}
+{% endblock script %}
diff --git a/share/jupyterhub/templates/home.html b/share/jupyterhub/templates/home.html
index 0ccc4308..17565ed4 100644
--- a/share/jupyterhub/templates/home.html
+++ b/share/jupyterhub/templates/home.html
@@ -86,5 +86,7 @@
{% endblock main %}
{% block script %}
{{ super() }}
-
-{% endblock %}
+
+{% endblock script %}
diff --git a/share/jupyterhub/templates/login.html b/share/jupyterhub/templates/login.html
index 03ad65b5..8c8e83bd 100644
--- a/share/jupyterhub/templates/login.html
+++ b/share/jupyterhub/templates/login.html
@@ -2,7 +2,8 @@
{% if announcement_login is string %}
{% set announcement = announcement_login %}
{% endif %}
-{% block login_widget %}{% endblock %}
+{% block login_widget %}
+{% endblock login_widget %}
{% block main %}
{% block login %}
@@ -86,21 +87,21 @@
{% endblock login_container %}
{% endblock login %}
-{% endblock %}
+{% endblock main %}
{% block script %}
{{ super() }}
-{% endblock %}
+{% endblock script %}
diff --git a/share/jupyterhub/templates/logout.html b/share/jupyterhub/templates/logout.html
index 910c580f..994e7769 100644
--- a/share/jupyterhub/templates/logout.html
+++ b/share/jupyterhub/templates/logout.html
@@ -6,4 +6,4 @@
-{% endblock %}
+{% endblock main %}
diff --git a/share/jupyterhub/templates/not_running.html b/share/jupyterhub/templates/not_running.html
index 52d56c77..49fb2025 100644
--- a/share/jupyterhub/templates/not_running.html
+++ b/share/jupyterhub/templates/not_running.html
@@ -11,7 +11,7 @@
Server not running
{% endif %}
- {% endblock %}
+ {% endblock heading %}
{% block message %}
{% if failed %}
@@ -35,7 +35,7 @@
{% endif %}
{% endif %}
- {% endblock %}
+ {% endblock message %}
{% block start_button %}
- {% endblock %}
+ {% endblock start_button %}
-{% endblock %}
+{% endblock main %}
{% block script %}
{{ super () }}
{% if implicit_spawn_seconds %}
{% endif %}
-
+
{% endblock script %}
diff --git a/share/jupyterhub/templates/oauth.html b/share/jupyterhub/templates/oauth.html
index 4756312f..edb11bc7 100644
--- a/share/jupyterhub/templates/oauth.html
+++ b/share/jupyterhub/templates/oauth.html
@@ -1,5 +1,6 @@
{% extends "page.html" %}
-{% block login_widget %}{% endblock %}
+{% block login_widget %}
+{% endblock login_widget %}
{% block main %}