Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
42 changes: 19 additions & 23 deletions sass/_catalog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
51 changes: 46 additions & 5 deletions templates/libraries.html
Original file line number Diff line number Diff line change
@@ -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" #}
Expand All @@ -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 %}
<nav class="breadcrumbs" aria-label="Breadcrumb">
<ul class="breadcrumb-list">
<li class="breadcrumb-item">
<a href="/topics/" class="breadcrumb-link">Topics</a>
</li>
{% for s in menu_section %}
<li class="breadcrumb-item">
<img src="/img/caret-right.svg" alt="" width="8" height="10"/>
{% if s.landing %}
<a href="/topics/{{ s.landing }}/" class="breadcrumb-link">{{ s.title }}</a>
{% else %}
{{ s.title }}
{% endif %}
</li>
{% endfor %}
<li class="breadcrumb-item breadcrumb-current" aria-current="page">
<img src="/img/caret-right.svg" alt="" width="8" height="10"/>
{{ section.title }}
</li>
</ul>
</nav>
{% 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 %}
<script>document.documentElement.classList.add('js');</script>

{%- set kind = section.extra.kind | default(value="clients") -%}
Expand Down Expand Up @@ -77,13 +118,13 @@

{% if kind == "clients" %}
<header class="catalog-header">
<h1 class="catalog-title">Clients</h1>
<h1 class="docs-page-title">Clients</h1>
<p class="catalog-lede">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.</p>
<p class="catalog-crosslink">See also: <a href="/integrations/">Integrations</a></p>
</header>
{% else %}
<header class="catalog-header">
<h1 class="catalog-title">Integrations</h1>
<h1 class="docs-page-title">Integrations</h1>
<p class="catalog-lede">Frameworks, job queues, AI libraries, and operations tools that work with Valkey.</p>
<p class="catalog-crosslink">See also: <a href="/clients/">Clients</a></p>
</header>
Expand Down Expand Up @@ -279,4 +320,4 @@ <h2 class="legend-title">Feature definitions</h2>
{{<catalog.footer_cta cta_text="Add your library" noscript_noun="library" />}}

<script defer src="/assets/js/libraries.js"></script>
{% endblock content %}
{% endblock main_content %}
25 changes: 24 additions & 1 deletion templates/macros/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,21 @@
</li>
{% 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") %}
<li><a href="{{ library_section.path }}"
{%- if library_section.path == path %} class="docs-menu-current" aria-current="page"{% endif %}>{{ library_section.title }}</a></li>
{%- endfor %}
{% endcomponent nav_libraries %}

{#-
The menu.
current: slug of the current topic.
Expand All @@ -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="") %}
<nav class="docs-menu" aria-label="Documentation">
{%- set libraries_section = extra.docs_menu_libraries_section | default(value="") %}
<ul class="docs-menu-sections">
{%- if libraries_section not in [x.id for x in nav] %}
{{< nav_libraries path={libraries_path} />}}
{%- endif %}
{%- for section in nav %}
{%- if section.id == "command-reference" %}
{{< nav_command_reference title={section.title} index={index} on_command_reference={on_command_reference} />}}
Expand All @@ -343,6 +363,9 @@
{%- set commands = command_map[entry.topic] if entry.topic in command_map else [] %}
{{< nav_menu_item slug={entry.topic} title={entry.title} source={"" if section_badge and entry.source == section.source else entry.source} current={current} related={related} extra={extra} commands={commands} current_command={current_command} />}}
{%- endfor %}
{%- if section.id == libraries_section %}
{{< nav_libraries path={libraries_path} />}}
{%- endif %}
{%- set other_key = "section:" ~ section.id %}
{%- if other_key in command_map %}
<li>
Expand Down
Loading