From: Magnus Hagander Date: Wed, 3 Sep 2025 12:26:51 +0000 (+0200) Subject: Make docspage inherit from base.html X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=bc9018dfb8f8cc0c3dedad26fcf97eef44be538e;p=pgweb.git 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. --- 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 %}