Skip to content

Commit 9ccc57f

Browse files
committed
Fixed site to not require clients page build
Signed-off-by: Lior Sventitzky <[email protected]>
1 parent 5c8950c commit 9ccc57f

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ content/commands/*
88
!content/commands/_index.md
99
content/topics/*
1010
!content/topics/_index.md
11+
content/clients/*
12+
!content/clients/_index.md
1113
_site
1214
_data/groups.json
1315
_data/resp2_replies.json

build/init-topics-and-clients.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ if [ ! -L build-clients -o "$(readlink build-clients)" != "$2" ]; then
7373
fi
7474
echo "Symlink to clients has been created at ./build-clients "
7575

76+
# Check if the clients directory exists and set the `clients_built` flag in frontmatter
77+
if [ -d "build-clients" ]; then
78+
# Set `clients_built = true` if the build-clients directory exists
79+
sed -i 's/clients_built = false/clients_built = true/' content/clients/_index.md
80+
fi
81+
82+
echo "Updated clients_built flag in frontmatter."
83+

content/clients/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title = "Client Libraries"
33
template = "client-list.html"
44
[extra]
5+
clients_built = true
56
recommended_clients_paths = [
67
"/python/valkey-GLIDE.json",
78
"/python/valkey-py.json",

templates/client-list.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
{% import "macros/docs.html" as docs %}
33

44
{% block main_content %}
5+
{% if not section.extra.clients_built %}
6+
<strong>Clients page not found.</strong> You likely need to build the client page. See "Building additional content" in README.md file.
7+
{% else %}
58
<div class="markdown-content">
69
{% set content_parts = section.content | split(pat="<!-- split -->") %}
710
{{ content_parts[0] | markdown | safe }}
@@ -66,4 +69,5 @@ <h3 id="{{ client.name | slugify }}">{{ client.name }}</h3>
6669
{% set client_fields = section.extra.client_fields %}
6770
{% include "client-feature-table.html" %}
6871
</div>
72+
{% endif %}
6973
{% endblock main_content %}

0 commit comments

Comments
 (0)