Skip to content

Commit d7a1650

Browse files
authored
Adds deprecation advice (#286)
### Description On deprecated commands, it adds a "Deprecation Advice" section that nicely tells users what they should use instead of the deprecated command. <img width="799" alt="Screenshot 2025-06-27 at 3 09 03 PM" src="https://github.com/user-attachments/assets/182be6b1-de15-4716-a74c-eb99e1317958" /> <img width="753" alt="Screenshot 2025-06-27 at 3 08 49 PM" src="https://github.com/user-attachments/assets/12dea151-d23a-41dd-950a-36e0faf19920" /> <img width="708" alt="Screenshot 2025-06-27 at 3 08 25 PM" src="https://github.com/user-attachments/assets/129cc8fc-652a-453a-9b34-2b3879e0460a" /> ### Issues Resolved #280 ### 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 73dccf8 commit d7a1650

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sass/_valkey.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,12 @@ pre table {
12711271
border-collapse: collapse;
12721272
}
12731273

1274+
.replaced-by {
1275+
display: inline;
1276+
p {
1277+
display: inline;
1278+
}
1279+
}
12741280
.command-group {
12751281
margin-bottom: 2rem;
12761282

templates/command-page.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@
151151
{% else %}
152152
<code>ERROR. Command description not loaded</code><br />
153153
{% endif %}
154+
{% if command_data_obj.replaced_by %}
155+
<h3>Deprecation advice</h3>
156+
Instead of using <code>{{ command_title }}</code> use <div class="replaced-by">{{ command_data_obj.replaced_by | markdown | safe }}</div>
154157

158+
{% endif %}
155159
{% set_global resp2_replies = load_data(path="../_data/resp2_replies.json", required=false) -%}
156160
{% set_global resp3_replies = load_data(path="../_data/resp3_replies.json", required=false) -%}
157161
{% if resp2_replies and resp3_replies -%}

0 commit comments

Comments
 (0)