diff --git a/config.toml b/config.toml index a1c598c0..cc36eb02 100644 --- a/config.toml +++ b/config.toml @@ -47,6 +47,11 @@ review_list = [ "/topics/distlock/" ] +# The docs menu's Download entry, with the release lines, goes at the end of +# this nav.yml section, which the download pages open. It goes at the start of +# the menu if there's no such section. +docs_menu_download_section = "getting-started" + # Labels shown next to menu entries from other sources, by source name. Only # modules get one; valkey-bundle isn't a module. [extra.nav_badges] diff --git a/sass/_valkey.scss b/sass/_valkey.scss index d0f2248c..44aa6dc6 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -728,6 +728,11 @@ p { } } + // The release lines under Download: laid out like commands, but not code. + .docs-menu-releases li a { + @include sans-serif; + } + // A badge on a section title, for a section that comes from a module. The // section titles are uppercase; the badge isn't. The margin keeps it away // from the arrow. diff --git a/templates/download-layout.html b/templates/download-layout.html new file mode 100644 index 00000000..81284c81 --- /dev/null +++ b/templates/download-layout.html @@ -0,0 +1,23 @@ +{% extends "left-aside.html" %} + +{#- The download pages: /download/, the release list, the release line pages + and each release. They use the documentation layout, with Download current + in the menu. -#} + +{% block related_content %} +{#- The release line of a line page (extra.version) or a release page (extra.tag). -#} +{% set download_line = "" %} +{% if page is defined and page.extra?.version %} + {% set download_line = page.extra.version %} +{% elif page is defined and page.extra?.tag %} + {% set download_line = (page.extra.tag | split(pat="."))[:2] | join(sep=".") %} +{% endif %} +{#- The same menu setup as docs.html and commands.html. #} +{% set nav_json %}{{< nav_merged extra={config.extra} />}}{% endset %} +{% set nav_data = load_data(literal=nav_json, format="json") %} +{% 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} command_map={nav_command_map} index={nav_index} download_path={current_path} download_line={download_line} />}} +{% endblock related_content %} diff --git a/templates/download.html b/templates/download.html index bffa1537..de1a471e 100644 --- a/templates/download.html +++ b/templates/download.html @@ -1,9 +1,7 @@ -{% extends "right-aside.html" %} +{% extends "download-layout.html" %} -{% block subhead_content%} -