pgbackrest.git / summary / log / commit / refs

commit    76ae49456c7dace20bbd6f17e8acdfd36bf03a46
Author:   David Steele <david@pgbackrest.org>
Date:     Sat Aug 01 13:32:04 2026 +0000

    Remove the contents from the releases page and close up the date.
    
    The contents held the introduction, the groups the releases are listed in, and whichever release is newest. That was as much as they could hold, since listing every release would run to well over a hundred entries, and each of those few is already on the first screen of the page. So a column of the page went to repeating what the reader could see without it. The document says toc="n" now and the notes have the whole width to themselves.
    
    The flag that kept the rest of the releases out of the contents goes with it, there being no contents left to keep them out of. The attribute a section sets to stay out of the contents is untouched, and the command reference still uses it for the option categories it lists.
    
    The date a release came out had as much space above it as below, so it sat between the title of the release and the notes rather than with either, and read as a line of its own. It has no margin above it now and sits directly under the title.


doc/lib/command/render/release.py | 11 ++++------- doc/resource/html/default.css | 2 +- test/src/module/doc/command/render/release_test.py | 7 ++++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/doc/lib/command/render/release.py b/doc/lib/command/render/release.py index bdd153ea6..1d968ec8f 100644 --- a/doc/lib/command/render/release.py +++ b/doc/lib/command/render/release.py @@ -326,6 +326,10 @@ class _Release: xml_node_attribute_set(root, "title", xml_node_attribute(self.root, "title", True)) + # The releases are listed at the top of the page already, so contents would only repeat them and take space the notes can + # make better use of + xml_node_attribute_set(root, "toc", "n") + # What the page is, which the header shows opposite what the project is subtitle = xml_node_attribute(self.root, "subtitle") @@ -355,8 +359,6 @@ class _Release: commit_list, remaining_list, commit_map, check = self._commit_list(version, release_idx, release_all) # Where the release is listed, which is by how interesting it still is rather than by when it happened - toc = True - if dev: if dev_total > 0: raise ToolError("only one development release is allowed") @@ -374,20 +376,15 @@ class _Release: xml_node_content_add(xml_node_text_add(xml_node_add(section, "title")), "Stable Releases") stable_total += 1 - toc = False else: if unsupported_total == 0: section = xml_node_add(root, "section", {"id": "unsupported"}) xml_node_content_add(xml_node_text_add(xml_node_add(section, "title")), "Pre-Stable Releases") unsupported_total += 1 - toc = False release_section = xml_node_add(section, "section", {"id": version}) - if not toc: - xml_node_attribute_set(release_section, "toc", "n") - # A release keeps its own anchor whichever group it ends up in, so a link to it does not break when it moves xml_node_attribute_set(release_section, SECTION_ANCHOR, SECTION_ANCHOR_NO_INHERIT) diff --git a/doc/resource/html/default.css b/doc/resource/html/default.css index b37f3a80a..5c20d67b4 100644 --- a/doc/resource/html/default.css +++ b/doc/resource/html/default.css @@ -527,9 +527,9 @@ Section font-weight: 650; } +/* The date sits right under the title of the release so the two read as one block rather than as separate lines */ .section1-subsubtitle, .section2-subsubtitle, .section3-subsubtitle { - margin-top: .75rem; color: var(--text-muted); font-size: 1rem; font-style: italic; diff --git a/test/src/module/doc/command/render/release_test.py b/test/src/module/doc/command/render/release_test.py index c3533dcf8..64a90fe53 100644 --- a/test/src/module/doc/command/render/release_test.py +++ b/test/src/module/doc/command/render/release_test.py @@ -196,9 +196,11 @@ def test_release_render(): # The introduction says what the page is, which the title of the page already says, so it has no header of its own assert_equal(xml_node_attribute(xml_node_child_list(root, "section")[0], "header"), "n") - # The document says what it is and what a search engine should show for it + # The document says what it is and what a search engine should show for it, and leaves out the contents since the releases are + # listed at the top of the page anyway assert_equal(xml_node_attribute(root, "title"), "Releases") assert_equal(xml_node_attribute(root, "subtitle"), "What Changed") + assert_equal(xml_node_attribute(root, "toc"), "n") assert_equal(xml_node_content(xml_node_child(root, "description")), "What changed.") assert_in("About the releases.", xml_node_content(xml_node_child_list(root, "section")[0])) @@ -211,10 +213,9 @@ def test_release_render(): assert_equal(xml_node_content(xml_node_child(release, "title")), "v2.03dev Notes") assert_equal(xml_node_content(xml_node_child(release, "subsubtitle")), "No Release Date Set") - # A release that is out says when it came out, and a release that is only listed for the record is not in the contents + # A release that is out says when it came out supported = xml_node_child_list(root, "section")[3] - assert_equal(xml_node_attribute(xml_node_child_list(supported, "section")[0], "toc"), "n") assert_equal( xml_node_content(xml_node_child(xml_node_child_list(supported, "section")[0], "subsubtitle")), "Released January 2, 2026" ) [parent: ab8df23807cc]