From bc9018dfb8f8cc0c3dedad26fcf97eef44be538e Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 3 Sep 2025 14:26:51 +0200 Subject: [PATCH] Make docspage inherit from base.html There was 99+% overlap between these, leading to some details missed between them. The fact that the whole base is reproduced inside docspage.html is probably legacy from a long time ago. So instead make docspage.html inherit from base and set the required parametrs. The only output difference in this is that the rel=canonical link moves to a different part in the , but it's still in . As a bonus, this also fixes the gitrev tag for theme.js, that commit 97942bcab only fixed for base and not docs, and it fixes the footer link to policies that e7099c90e only updated for base and not docs. --- templates/docs/docspage.html | 96 +++--------------------------------- 1 file changed, 8 insertions(+), 88 deletions(-) diff --git a/templates/docs/docspage.html b/templates/docs/docspage.html index 1dd76532..f19cb0c7 100644 --- a/templates/docs/docspage.html +++ b/templates/docs/docspage.html @@ -1,82 +1,15 @@ - - - - PostgreSQL: Documentation: {{page.display_version}}: {{page.title}} - - - {%block meta%}{%endblock%} {# used for custom meta tags such as description which we don't want for every page #} - - {%if og%} - - - -{%if not og.noimage%} {%endif%} - -{%if og.description%} {%endif%} - {%endif%} +{% extends "base/base.html" %} + +{% block title %}Documentation: {{page.display_version}}: {{page.title}}{% endblock %} + +{% block extrahead %} {%if not page.version.supported%} {%endif%} {% if canonical_version %} {% endif %} - - - - {%if newstags %} - {%comment%}Default RSS links are only shown on pages that have newstags set{%endcomment%} - - {%for t in newstags%} - - {%endfor%} - - {%endif%} - +{% endblock %} - - - {%block extrahead%}{%endblock%} - - -
-
-
- - -
-
-
-
{%include "base/esi.html" with includepage="/include/topbar" %}
-
-
+{% block layoutblock %}
@@ -166,17 +99,4 @@
- - - - - +{% endblock %} -- 2.39.5