diff --git a/sass/_valkey.scss b/sass/_valkey.scss index 7d86f510..1b77e340 100644 --- a/sass/_valkey.scss +++ b/sass/_valkey.scss @@ -1289,6 +1289,18 @@ pre table { .command-group { margin-bottom: 2rem; + .command-entry .deprecated-notice { + text-transform: uppercase; + text-decoration: none; + color: black; + display: inline-block; + background-color: #d1d9ff; + padding: 0.33rem; + border-radius: 3px; + font-size: 0.75em; + font-weight: 600; + } + h2 { border-bottom: 1px solid $line; padding-bottom: 1rem; diff --git a/templates/command-page.html b/templates/command-page.html index be3e02f2..5a59c263 100644 --- a/templates/command-page.html +++ b/templates/command-page.html @@ -152,7 +152,7 @@ ERROR. Command description not loaded
{% endif %} {% if command_data_obj.replaced_by %} -

Deprecation advice

+

Deprecation advice

Instead of using {{ command_title }} use
{{ command_data_obj.replaced_by | markdown | safe }}
{% endif %} diff --git a/templates/commands.html b/templates/commands.html index 9736970b..cd7c4bc0 100644 --- a/templates/commands.html +++ b/templates/commands.html @@ -38,11 +38,17 @@

We couldn't find any results matching your search

{% if command_data_obj.container %} {% set command_display = command_data_obj.container ~ " " ~ command_display %} {% endif %} + {% if command_data_obj.replaced_by %} + {% set deprecated = true %} + {% else %} + {% set deprecated = false %} + {% endif %} {% set command_entry = [ command_display, page.permalink | safe, command_data_obj.summary, - command_data_obj.group + command_data_obj.group, + deprecated ] %} {% set_global commands_entries = commands_entries | concat(with= [ command_entry ]) %} {% endif %} @@ -58,7 +64,13 @@

{{ group_descriptions[command_group_ {{ group_descriptions[command_group_description_name].description }}

{% for entry in command_group | sort(attribute="0") %} -
{{ entry[0] }} {{entry[2]}}
+
+ {% if entry[4] == true %} + deprecated + {% endif %} + {{ entry[0] }} {{entry[2]}} + +
{% endfor %}
Back to top