From b8736ced465de15746c3d69e607e7951bbdc8790 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 16 Nov 2026 18:45:18 -0800 Subject: [PATCH] Put Clients and Integrations in the docs layout and menu /clients/ and /integrations/ now use the documentation layout: the docs menu on the left, and a breadcrumb like a topic's. In the menu, Clients and Integrations are the last entries of Application development (extra.docs_menu_libraries_section), which their pages open, with the current page marked like a topic. The catalog loses its own page padding, its h2s keep their case under the docs layout's uppercase h2 rule, and the toolbar's breakpoints are on the catalog's width, since the content column is narrower than the window. Signed-off-by: Madelyn Olson --- config.toml | 5 ++++ sass/_catalog.scss | 42 +++++++++++++++----------------- templates/libraries.html | 51 +++++++++++++++++++++++++++++++++++---- templates/macros/nav.html | 25 ++++++++++++++++++- 4 files changed, 94 insertions(+), 29 deletions(-) diff --git a/config.toml b/config.toml index a1c598c0..18db29ea 100644 --- a/config.toml +++ b/config.toml @@ -42,6 +42,11 @@ nav_path = "../build-topics/../nav.yml" nav_sources_path = "../build-topics/../modules-nav/" nav_sources = ["valkey-bloom", "valkey-json", "valkey-search", "valkey-ldap", "valkey-bundle", "valkey-large-object"] +# The docs menu's Clients and Integrations entries go at the end of this +# nav.yml section, which their pages open. They go at the start of the menu if +# there's no such section. +docs_menu_libraries_section = "application-development" + # Topics with known problems, shown with a "This page is under review" note. review_list = [ "/topics/distlock/" diff --git a/sass/_catalog.scss b/sass/_catalog.scss index b18cedaa..36dd1eff 100644 --- a/sass/_catalog.scss +++ b/sass/_catalog.scss @@ -39,10 +39,10 @@ $cat-radius-lg: 16px; // Layout wrapper // --------------------------------------------------------------------------- +// The catalog sits in the docs content panel (templates/left-aside.html), +// which has its own padding. .catalog { - max-width: var(--max-width); - margin: 0 auto; - padding: 10px 20px 0; + container-type: inline-size; @include sans-serif; color: $cat-fg; background: $cat-surface; @@ -53,26 +53,23 @@ $cat-radius-lg: 16px; a:visited { color: $cat-fg; } + + // The docs layout uppercases h2s (`.left-aside h2`); card names and the + // catalog's own headings keep their case. + h2 { + text-transform: none; + } } // --------------------------------------------------------------------------- // Compact header // --------------------------------------------------------------------------- // -// A small heading, one lede line, and a link to the other catalog. Keeps the -// top of the page tight so cards reach the fold. +// The page title (.docs-page-title, as on topic pages), one lede line, and a +// link to the other catalog. .catalog-header { - margin: 2.4rem 0; - - .catalog-title { - margin: 0 0 0.6rem; - font-size: 3rem; // compact vs. the site hero - font-weight: 700; - letter-spacing: -0.01em; - line-height: 1.2; - color: $cat-fg; - } + margin: 0 0 2.4rem; .catalog-lede { margin: 0; @@ -103,8 +100,9 @@ $cat-radius-lg: 16px; // --------------------------------------------------------------------------- // // Three columns: the search field stretches; the toggle and sort take their -// intrinsic/fixed width on the right. Collapses to a single column on narrow -// viewports. +// intrinsic/fixed width on the right. Collapses to a single column in a narrow +// catalog. The breakpoints are on the catalog's width, not the viewport's, +// since the docs menu takes part of the window on wide screens. .catalog .toolbar { display: grid; @@ -113,11 +111,11 @@ $cat-radius-lg: 16px; align-items: end; margin: 0 0 3.2rem; - @media (max-width: 900px) { + @container (max-width: 860px) { grid-template-columns: minmax(0, 1fr) auto; } - @media (max-width: 620px) { + @container (max-width: 580px) { grid-template-columns: minmax(0, 1fr); } @@ -887,7 +885,7 @@ $cat-radius-lg: 16px; .catalog .submission-heading { margin: 0 0 0.6rem; - font-size: 3rem; // matches .catalog-title + font-size: 3rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; @@ -926,9 +924,7 @@ $cat-radius-lg: 16px; } .catalog-nojs-note { - margin: 2rem auto; - max-width: var(--max-width); - padding: 0 20px; + margin: 2rem 0; color: $cat-muted; font-size: 1.4rem; } diff --git a/templates/libraries.html b/templates/libraries.html index e7faebfc..fbf16f17 100644 --- a/templates/libraries.html +++ b/templates/libraries.html @@ -1,4 +1,4 @@ -{% extends "default.html" %} +{% extends "left-aside.html" %} {# Libraries catalog page. Each URL renders one catalog: #} {# content/clients/_index.md → kind = "clients" #} @@ -8,8 +8,49 @@ {# Cards are rendered at build time from _data/libraries/ (no runtime fetch); #} {# libraries.js filters and sorts them. Without JS the JS-only controls are #} {# hidden and every card shows. #} +{# The pages use the documentation layout. Their menu entries are in the #} +{# section extra.docs_menu_libraries_section (see nav_libraries). #} -{% block content %} +{%- block head -%} +{% set nav_json %}{{< nav_merged extra={config.extra} />}}{% endset %} +{% set nav_data = load_data(literal=nav_json, format="json") %} +{% set menu_section = [s for s in nav_data if s.id == config.extra.docs_menu_libraries_section] %} +{%- endblock head -%} + +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block related_content %} +{#- The same menu setup as docs.html, with this page's section open. #} +{% set nav_index_json %}{{< nav_command_index extra={config.extra} />}}{% endset %} +{% set nav_index = load_data(literal=nav_index_json, format="json") %} +{% set nav_map_json %}{{< nav_command_map nav={nav_data} index={nav_index} />}}{% endset %} +{% set nav_command_map = load_data(literal=nav_map_json, format="json") %} +{{< nav_menu nav={nav_data} extra={config.extra} open={config.extra.docs_menu_libraries_section} command_map={nav_command_map} index={nav_index} libraries_path={current_path} />}} +{% endblock related_content %} + +{% block main_content %} {%- set kind = section.extra.kind | default(value="clients") -%} @@ -77,13 +118,13 @@ {% if kind == "clients" %}
-

Clients

+

Clients

Client libraries and tools used for connecting to Valkey. Anything that speaks the Redis 7.2 wire protocol works with Valkey 7.2 and later, so most existing clients need no changes to migrate.

{% else %}
-

Integrations

+

Integrations

Frameworks, job queues, AI libraries, and operations tools that work with Valkey.

@@ -279,4 +320,4 @@

Feature definitions

{{}} -{% endblock content %} +{% endblock main_content %} diff --git a/templates/macros/nav.html b/templates/macros/nav.html index ac397aad..49e94da8 100644 --- a/templates/macros/nav.html +++ b/templates/macros/nav.html @@ -308,6 +308,21 @@ {% endcomponent nav_command_reference %} +{#- + The Clients and Integrations entries, for the pages built from + _data/libraries/. They're rendered after the topics of the section whose + id is extra.docs_menu_libraries_section in config.toml, or at the start of + the menu if there's none. + path: the current path on those pages, "" elsewhere. +-#} +{% component nav_libraries(path="") %} +{%- for name in ["clients", "integrations"] %} +{%- set library_section = get_section(path=name ~ "/_index.md") %} +
  • {{ library_section.title }}
  • +{%- endfor %} +{% endcomponent nav_libraries %} + {#- The menu. current: slug of the current topic. @@ -322,10 +337,15 @@ index: from nav_command_index; used to list the command categories (groups) that have documented commands. on_command_reference: true on the command reference page. + libraries_path: see nav_libraries. -#} -{% component nav_menu(nav, extra, current="", related="", open="", command_map={}, current_command="", index=[], on_command_reference=false) %} +{% component nav_menu(nav, extra, current="", related="", open="", command_map={}, current_command="", index=[], on_command_reference=false, libraries_path="") %}