From 6afa568ae74c4f88e25acd5d43fd51499a9a6022 Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Wed, 16 Oct 2024 14:39:51 -0600 Subject: [PATCH 1/4] organizes documentation topics, normalizes docs headings Signed-off-by: Kyle J. Davis --- content/docs/index.md | 17 ++++++-------- sass/_valkey.scss | 48 +++++++++++++++++++++++++++++++++++++++ templates/block-menu.html | 8 +++++++ templates/commands.html | 7 +++++- templates/default.html | 14 ++++++++---- templates/docs-page.html | 2 +- templates/docs.html | 25 +++++++++++++++++--- 7 files changed, 102 insertions(+), 19 deletions(-) create mode 100644 templates/block-menu.html diff --git a/content/docs/index.md b/content/docs/index.md index 5aea63e..321fe33 100644 --- a/content/docs/index.md +++ b/content/docs/index.md @@ -1,14 +1,11 @@ +++ -title = "Docs" -template = "fullwidth.html" +title = "Documentation" +template = "block-menu.html" page_template = "docs-page.html" +[extra] +body_class= "blocks-page" +++ -* [Command Reference](/commands/) -* [All Documentation Topics](/topics/) -* Management - * [Persistence](/topics/persistence/) - * Security - * [ACL](/topics/acl/) -* Valkey Manual - * [Keyspace Notifications](/topics/keyspace/) + +* [Command Reference](/commands/) A categorized listing of all Valkey commands +* [Documentation by topic](/topics/) In-depth documentation covering a wide variety of operational and usage subjects diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 465ec0f..f759670 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -546,6 +546,54 @@ pre table { } +.index-entry { + padding: 0.5em 1em; + margin-bottom: 0.5em; +} + +.block-menu ul li, +.index-entry { + border: 1px solid $line; + border-radius: 3px; + a { + display: block; + } +} + +.block-menu { + ul { + display: flex; + flex-direction: row; + flex-wrap: wrap; + list-style-type: none; + padding: 0; + gap: 1em; + li { + text-align: center; + padding: 1em; + flex: 1 1 0px; + a { + text-align: center; + padding-bottom: 1em; + } + } + } +} + +.blocks-page { + .container { + padding-right: 0; + } +} + +@media (max-width: 768px) { + .block-menu ul { + display: block; + li { + margin-bottom: 1em; + } + } +} diff --git a/templates/block-menu.html b/templates/block-menu.html new file mode 100644 index 0000000..2a90647 --- /dev/null +++ b/templates/block-menu.html @@ -0,0 +1,8 @@ +{% extends "fullwidth.html" %} + + +{% block main_content %} +
+{{ page.content | markdown | safe }} +
+{% endblock main_content %} diff --git a/templates/commands.html b/templates/commands.html index 75ddca1..ae42856 100644 --- a/templates/commands.html +++ b/templates/commands.html @@ -69,4 +69,9 @@

Alphabetical Command List

  • {{ entry[0] }}
  • {% endfor %} -{% endblock related_content %} \ No newline at end of file +{% endblock related_content %} + + +{% block subhead_content %} +

    Documentation: Command Reference

    +{% endblock subhead_content %} diff --git a/templates/default.html b/templates/default.html index 57d9ed4..baff568 100644 --- a/templates/default.html +++ b/templates/default.html @@ -2,8 +2,9 @@ {% include "includes/head.html" %} {%- if config.extra.banner -%}