From 9c5cb657544d8e00c17c0c6a3318fae2629251bf Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Wed, 18 Nov 2026 10:13:36 -0800 Subject: [PATCH] Give the download pages their own menu The download pages had no navigation between them. They now use the left-aside layout, like the docs and the blog, with a Download menu: Overview, each release line newest first, and All releases. The menu marks the current page, or a release's line on a release page. The lines are the pages in content/download/versions/, so a new line shows up once it has a page. The docs menu doesn't change. Each page's title moves from the banner into the content, as on docs pages. Signed-off-by: Madelyn Olson --- templates/download-layout.html | 16 ++++++++++++++++ templates/download.html | 6 ++---- templates/macros/release.html | 23 +++++++++++++++++++++++ templates/release-line.html | 7 ++----- templates/release-page.html | 6 ++---- templates/release-section.html | 6 ++---- 6 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 templates/download-layout.html diff --git a/templates/download-layout.html b/templates/download-layout.html new file mode 100644 index 00000000..dc7981d7 --- /dev/null +++ b/templates/download-layout.html @@ -0,0 +1,16 @@ +{% extends "left-aside.html" %} + +{#- The download pages: /download/, the release list, the release line pages + and each release. They have their own menu, as the blog has its own + sidebar. -#} + +{% block related_content %} +{#- The release line of a line page (extra.version) or a release page (extra.tag). -#} +{% set line = "" %} +{% if page is defined and page.extra?.version %} + {% set line = page.extra.version %} +{% elif page is defined and page.extra?.tag %} + {% set line = (page.extra.tag | split(pat="."))[:2] | join(sep=".") %} +{% endif %} +{{< download_menu path={current_path} line={line} />}} +{% endblock related_content %} diff --git a/templates/download.html b/templates/download.html index b0c03e1f..6f2ab295 100644 --- a/templates/download.html +++ b/templates/download.html @@ -1,9 +1,7 @@ -{% extends "right-aside.html" %} +{% extends "download-layout.html" %} -{% block subhead_content%} -

Download Valkey

-{% endblock subhead_content%} {% block main_content %} +

Download Valkey

{# The newest stable release on each major.minor line, newest line first. Same selection as the homepage in index.html. Pages are newest first, so within a diff --git a/templates/macros/release.html b/templates/macros/release.html index 9c1c6e72..a25f0fd6 100644 --- a/templates/macros/release.html +++ b/templates/macros/release.html @@ -63,3 +63,26 @@

Binary Artifacts

{% endfor %} {% endif %} {% endcomponent release_info %} + +{# + The menu on the download pages: the download page, each release line, + newest first, and all releases. The lines are the pages in + content/download/versions/, so a new line shows up once it has a page. + Styled like the docs menu. + path: the current page's path. + line: the release line of the current page, e.g. "9.1", or "". +#} +{% component download_menu(path, line="") %} +{%- set versions = get_section(path="download/versions/_index.md") %} +{%- set lines = [{"version": (p.extra.version | split(pat=".") | first | int) * 1000 + (p.extra.version | split(pat=".") | nth(n=1) | int), "page": p} for p in versions.pages] %} + +{% endcomponent download_menu %} diff --git a/templates/release-line.html b/templates/release-line.html index b0530170..02c4a5e8 100644 --- a/templates/release-line.html +++ b/templates/release-line.html @@ -1,10 +1,7 @@ -{% extends "right-aside.html" %} - -{% block subhead_content %} -

Download Valkey {{ page.extra.version }}

-{% endblock subhead_content %} +{% extends "download-layout.html" %} {% block main_content %} +

Download Valkey {{ page.extra.version }}

{% set line = page.extra.version %} {# Every release on this line, newest first, stable and pre-release kept apart. #} diff --git a/templates/release-page.html b/templates/release-page.html index 4cea3ee9..6b23542c 100644 --- a/templates/release-page.html +++ b/templates/release-page.html @@ -1,8 +1,6 @@ -{% extends "right-aside.html" %} +{% extends "download-layout.html" %} -{% block subhead_content%} -

Download Valkey {{page.title}}

-{% endblock subhead_content%} {% block main_content %} +

Download Valkey {{page.title}}

{{< release_info date={page.date} release={page.extra} />}} {% endblock main_content %} diff --git a/templates/release-section.html b/templates/release-section.html index 681a23d8..df79c4ed 100644 --- a/templates/release-section.html +++ b/templates/release-section.html @@ -1,9 +1,7 @@ -{% extends "right-aside.html" %} +{% extends "download-layout.html" %} -{% block subhead_content%} -

Valkey Releases

-{% endblock subhead_content%} {% block main_content %} +

Valkey Releases

{# Newest line first by version, not date: an older line's patch can ship after the newest line's. #}