Skip to content

Commit 400b364

Browse files
authored
Fixing code highlighting issues (#305)
### Description - A couple of blog posts had issues with code highlighting which was spamming the Zola log making it hard to find issues. - I also assigned code block names to undefined ones to stop the linter yelling at me ### Issues Resolved n/a ### Check List - [x] Commits are signed per the DCO using `--signoff` By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License. Signed-off-by: Kyle J. Davis <[email protected]>
1 parent 8dbec69 commit 400b364

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

content/blog/2025-03-4-go-client-in-public-preview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ config := api.NewGlideClientConfiguration().
270270
The Valkey GLIDE Go client is built on top of the Valkey GLIDE core. The core framework is written in Rust (lib.rs), which exposes public functions. These functions are converted to a C header file using Cbindgen. The Go client then uses CGO to call these C functions, providing Go developers with an idiomatic interface while leveraging Rust's performance advantages. This architecture ensures consistent behavior across all Valkey GLIDE language implementations (Java, Python, Node.js, and Go) while maintaining performance and reliability.
271271

272272
### Component details
273-
```text
273+
```txt
274274
+------------+ +------+ +------------+ +------------+ +------------+
275275
| | | | | | | | | |
276276
| Go |----->| |----->| C Header |----->| Rust |----->| Valkey |

content/blog/2025-06-23-valkey-bundle-one-stop-shop-for-low-latency-modern-applications/index.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@ Start your *valkey-bundle* instance:
3131

3232
1. Get the latest version of the container image
3333
```bash
34-
> docker pull valkey/valkey-bundle
34+
$ docker pull valkey/valkey-bundle
3535
```
3636

3737
2. Run a standalone valkey using the default port
3838
```bash
39-
> docker run --name my-valkey-bundle \
39+
$ docker run --name my-valkey-bundle \
4040
-p 6379:6379 \
4141
-d valkey/valkey-bundle
4242
```
4343

4444
3. Connect to the same container we have previously created using the built-in `valkey-cli`:
4545
```bash
46-
> docker exec -it my-valkey-bundle \
46+
$ docker exec -it my-valkey-bundle \
4747
valkey-cli -h localhost -p 6379 -3
4848
```
4949

5050
List the available modules using the [`INFO`](https://valkey.io/commands/info/) command.
5151

52-
```
52+
```txt
5353
my-valkey-bundle:6379> INFO modules
5454
# Modules
5555
module:name=bf,ver=10000,api=1,filters=0,usedby=[],using=[],options=[]
@@ -97,21 +97,21 @@ Sample document for key `user:6379`
9797

9898
Store and retrieve JSON document with nested elements and arrays using `valkey-cli` with the [`JSON.SET`](https://valkey.io/commands/json.set/) command.
9999

100-
```
100+
```txt
101101
> JSON.SET user:6379 $ '{"name": "Val Key","address": {"city": "New York","zip": "10001"},"orders": [{"id": "ord1", "total": 99.99},{"id": "ord2", "total": 150.50}]}'
102102
OK
103103
```
104104

105105
Complex query with filters to retrieve orders where total is over 100 from within the array in the document for the given user, we'll use [`JSON.GET`](https://valkey.io/commands/json.get/) command.
106106

107-
```
107+
```txt
108108
> JSON.GET user:6379 '$.orders[?(@.total > 100)]'
109109
"[{\"id\":\"ord2\",\"total\":150.50}]"
110110
```
111111

112112
Perform *Array* operations by inserting an item to the orders list using [`JSON.ARRAPPEND`](https://valkey.io/commands/json.arrappend/) command.
113113

114-
```
114+
```txt
115115
> JSON.ARRAPPEND user:6379 $.orders '{"id": "ord3","total": 75.25}'
116116
1) (integer) 3
117117
```
@@ -141,36 +141,36 @@ Perform *Array* operations by inserting an item to the orders list using [`JSON.
141141

142142
Create a non-scaling (fixed memory) filter with specific parameters with [`BF.RESERVE`](https://valkey.io/commands/bf.reserve/):
143143

144-
```
144+
```txt
145145
> BF.RESERVE non_scaling_filter 0.001 1000000 NONSCALING
146146
OK
147147
```
148148

149149
Create a scaling filter with custom expansion using [`BF.INSERT`](https://valkey.io/commands/bf.insert/):
150150

151-
```
151+
```txt
152152
> BF.INSERT scaling_filter EXPANSION 4 ITEMS item1 item2
153153
1) (integer) 1
154154
2) (integer) 1
155155
```
156156

157157
Check filter capacity and stats using [`BF.INFO`](https://valkey.io/commands/bf.info/) for fixed filter
158158

159-
```
159+
```txt
160160
> BF.INFO non_scaling_filter CAPACITY
161161
(integer) 1000000
162162
```
163163

164164
Check filter capacity and stats for scaling filter
165165

166-
```
166+
```txt
167167
> BF.INFO scaling_filter MAXSCALEDCAPACITY
168168
(integer) 34952500
169169
```
170170

171171
Bulk operations, use [`BF.MADD`](https://valkey.io/commands/bf.madd/) to track multiple elements at once:
172172

173-
```
173+
```txt
174174
> BF.MADD non_scaling_filter item1 item2 item3
175175
1) (integer) 1
176176
2) (integer) 1
@@ -179,7 +179,7 @@ Bulk operations, use [`BF.MADD`](https://valkey.io/commands/bf.madd/) to track m
179179

180180
Check for multiple items in a single roundtrip using [`BF.MEXISTS`](https://valkey.io/commands/bf.mexists/), if we try to get an item that does not exist (item4), we get a Zero as response.
181181

182-
```
182+
```txt
183183
> BF.MEXISTS non_scaling_filter item1 item2 item4
184184
1) (integer) 1
185185
2) (integer) 1
@@ -220,7 +220,7 @@ Check for multiple items in a single roundtrip using [`BF.MEXISTS`](https://valk
220220

221221
Create an index with HNSW configuration with [`FT.CREATE`](https://valkey.io/commands/ft.create/):
222222

223-
```
223+
```txt
224224
> FT.CREATE productIndex \
225225
ON JSON PREFIX 1 product: \
226226
SCHEMA $.vector AS vector \
@@ -237,7 +237,7 @@ OK
237237

238238
Perform Hybrid query combining vector similarity with filters using [`FT.SEARCH`](https://valkey.io/commands/ft.search/)` index query`:
239239

240-
```
240+
```txt
241241
> FT.SEARCH productIndex "*=>[KNN 5 @vector $query_vector] @category:{electronics} @price:[100 500]" \
242242
PARAMS 2 query_vector "$encoded_vector"
243243
```
@@ -262,7 +262,7 @@ Perform Hybrid query combining vector similarity with filters using [`FT.SEARCH`
262262
**Basic configuration**
263263

264264
Simple bind mode setup to our imaginary LDAP server:
265-
```
265+
```txt
266266
> CONFIG SET ldap.servers "ldap://ldap.valkey.io:389"
267267
OK
268268
@@ -274,7 +274,7 @@ OK
274274
```
275275

276276
Enable TLS:
277-
```
277+
```txt
278278
> CONFIG SET ldap.use_starttls yes
279279
OK
280280
@@ -285,13 +285,13 @@ OK
285285
**User Management**
286286

287287
Create LDAP-authenticated user
288-
```
288+
```txt
289289
> ACL SETUSER valkey on resetpass +@all
290290
OK
291291
```
292292

293293
Authenticate
294-
```
294+
```txt
295295
> AUTH valkey "ldap_password"
296296
OK
297297
```
@@ -301,14 +301,14 @@ OK
301301
* Use bind mode when possible (faster)
302302
* Adjust connection pool size for high traffic:
303303

304-
```
304+
```txt
305305
> CONFIG SET ldap.connection_pool_size 5
306306
OK
307307
```
308308

309309
* Configure multiple LDAP servers for reliability
310310

311-
```
311+
```txt
312312
> CONFIG SET ldap.servers "ldap://main:389,ldap://backup:389"
313313
OK
314314
```
@@ -322,7 +322,7 @@ Deploying *valkey-bundle* in production requires careful consideration of persis
322322
For example:
323323

324324
```bash
325-
docker run --name my-valkey-bundle \
325+
$ docker run --name my-valkey-bundle \
326326
-d valkey/valkey-bundle \
327327
valkey-server --save 60 1
328328
```
@@ -341,7 +341,7 @@ This sample configuration file includes optimized settings for:
341341

342342
Note: This is not an official nor recommended configuration is only for demonstration purposes of the module settings.
343343

344-
```
344+
```conf
345345
# Valkey settings
346346
port 6379
347347
bind 127.0.0.1
@@ -424,7 +424,7 @@ logfile "/var/log/valkey/valkey.log"
424424
Load the file as follows:
425425

426426
```bash
427-
docker run -v /valkey/my-valkey-bundle.conf:/usr/local/etc/valkey \
427+
$ docker run -v /valkey/my-valkey-bundle.conf:/usr/local/etc/valkey \
428428
--name my-valkey-bundle \
429429
valkey/valkey-bundle
430430
```
@@ -456,14 +456,14 @@ First, we needed a flexible way to store user profiles. Valkey JSON proved perfe
456456

457457
The beauty of using Valkey JSON is how easily we can update specific fields for user with id `u123456`.
458458

459-
```
459+
```txt
460460
> JSON.SET user:u123456 . '{"user_id": "u123456","personal": {"name": "Val Key","email": "[email protected]"},"preferences": {"categories": ["electronics", "sports"],"brands": ["nike", "apple"]},"embedding": [0.23, 0.45, 0.67]}'
461461
OK
462462
```
463463

464464
Update user preferences by adding the automotive category.
465465

466-
```
466+
```txt
467467
> JSON.ARRAPPEND user:u123456 $.preferences.categories '"automotive"'
468468
1) (integer) 3
469469
```
@@ -474,7 +474,7 @@ Here's where things get interesting. We use Valkey Search to implement vector si
474474

475475
Create a vector similarity index.
476476

477-
```
477+
```txt
478478
> FT.CREATE product_idx ON JSON
479479
PREFIX 1 product:
480480
SCHEMA
@@ -491,13 +491,13 @@ This setup allows us to find similar products while applying business rules like
491491
Here's how we can fetch similar products based on user preferences:
492492

493493
Get the preference vector from the user with Id u123456
494-
```console
494+
```txt
495495
> SET user_vector `JSON.GET user:u123456 $.embedding`
496496
OK
497497
```
498498

499499
Find similar products in the same category
500-
```console
500+
```txt
501501
> FT.SEARCH product_idx "*=>[KNN 5 @embedding $user_vector] @category:{electronics}"
502502
PARAMS 2 user_vector "$user_vector"
503503
```
@@ -509,7 +509,7 @@ This query combines vector similarity search with category filtering, ensuring r
509509
Nobody likes seeing the same ad repeatedly. We use Valkey Bloom to efficiently track which user each ad has been shown. The beauty of Bloom filters is their space efficiency, we can track millions of impressions using minimal memory.
510510

511511
Track ad impressions by the Ad Id
512-
```console
512+
```txt
513513
> BF.RESERVE ad:a789012 0.01 10000000
514514
OK
515515
@@ -518,13 +518,13 @@ OK
518518
```
519519

520520
Quick check before showing an ad
521-
```console
521+
```txt
522522
> BF.EXISTS ad:a789012 "user:u123456"
523523
(integer) 1
524524
```
525525

526526
Try a different user for the same Ad Id.
527-
```console
527+
```txt
528528
> BF.EXISTS ad:a789012 "user:u234567"
529529
(integer) 0
530530
```
@@ -540,7 +540,7 @@ Our Ad Platform needs to support multiple teams with different access levels - f
540540
First, let's set up our LDAP integration to map organizational roles:
541541

542542
Configure LDAP connection with out imaginary Valkey LDAP
543-
```console
543+
```txt
544544
> CONFIG SET ldap.servers "ldaps://ldap.valkey.io:636"
545545
OK
546546
@@ -555,7 +555,7 @@ OK
555555
```
556556

557557
Enable TLS for secure communication
558-
```console
558+
```txt
559559
> CONFIG SET ldap.use_starttls yes
560560
OK
561561
@@ -568,7 +568,7 @@ OK
568568
We'll create different access levels using Valkey ACLs that map to LDAP groups:
569569

570570
Account Managers - Can view and modify client campaigns
571-
```console
571+
```txt
572572
> ACL SETUSER account_manager on resetpass +@read +@write -@admin >client_secret
573573
~campaign:*
574574
~client:*
@@ -577,7 +577,7 @@ OK
577577
```
578578

579579
Content Creators - Can manage ad content and view basic analytics
580-
```console
580+
```txt
581581
> ACL SETUSER content_creator on resetpass +@read +@write -@admin >content_secret
582582
~ad:*
583583
~content:*
@@ -586,15 +586,15 @@ OK
586586
```
587587

588588
Data Analysts - Read-only access to all analytics data
589-
```console
589+
```txt
590590
> ACL SETUSER data_analyst on resetpass +@read -@write -@admin >analyst_secret
591591
~analytics:*
592592
&campaign:*
593593
OK
594594
```
595595

596596
System Administrators - Full access
597-
```console
597+
```txt
598598
> ACL SETUSER admin on resetpass +@all >admin_secret
599599
OK
600600
```

0 commit comments

Comments
 (0)