From 4f0fe91791543be85853276a8a272c0336d4198c Mon Sep 17 00:00:00 2001 From: "Kyle J. Davis" Date: Fri, 26 Sep 2025 13:49:24 -0600 Subject: [PATCH] refactors community into a section Signed-off-by: Kyle J. Davis --- content/{community.md => community/_index.md} | 2 +- templates/community.html | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) rename content/{community.md => community/_index.md} (98%) diff --git a/content/community.md b/content/community/_index.md similarity index 98% rename from content/community.md rename to content/community/_index.md index 18303ace..f2b4b8e4 100644 --- a/content/community.md +++ b/content/community/_index.md @@ -2,7 +2,7 @@ title = "Community" description = "Join the Valkey community" template = "community.html" - +page_template = "community.html" [extra] cards = [ { icon = "icon-question.svg", title = "Ask Questions", description = "If you have any inquiries about Valkey, feel free to join the conversation on our GitHub discussions or chat with us on Slack.", links = [ diff --git a/templates/community.html b/templates/community.html index 0758b941..da3e52da 100644 --- a/templates/community.html +++ b/templates/community.html @@ -4,11 +4,23 @@
+ {% if section %} + {{ section.content | markdown | safe }} + {% else %} {{ page.content | markdown | safe }} + {% endif %}
- {% if page.extra.cards %} + {% set cards_meta = get_section(path="community/_index.md", metadata_only=true) %} + {% if (page and page.extra and page.extra.cards) %} + {% set page_cards = page.extra.cards %} + {% else %} + {% set page_cards = [] %} + {% endif %} + {% set cards = page_cards | concat(with= cards_meta.extra.cards) %} + + {% if cards %}
- {% for card in page.extra.cards %} + {% for card in cards%}
{{ card.title }}

{{ card.title }}