From 89610e6aa71c78a7c5fe870a5b0fea1f8b6953e6 Mon Sep 17 00:00:00 2001 From: Craig Osterhout Date: Wed, 19 Nov 2025 09:01:02 -0800 Subject: [PATCH 1/2] components: add deprecated badge Signed-off-by: Craig Osterhout --- content/contribute/components/badges.md | 23 ++++++++++++++++++++--- layouts/partials/components/badge.html | 8 +++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/content/contribute/components/badges.md b/content/contribute/components/badges.md index db1cedf36c2f..6db626bd0e06 100644 --- a/content/contribute/components/badges.md +++ b/content/contribute/components/badges.md @@ -11,6 +11,7 @@ toc_max: 3 {{< badge color=red text="red badge" >}} {{< badge color=green text="green badge" >}} {{< badge color=violet text="violet badge" >}} +{{< badge color=gray text="gray badge" >}} You can also make a badge a link. @@ -18,17 +19,33 @@ You can also make a badge a link. ### Usage guidelines -We use badges to indicate new content and product content in various stages of the release lifecycle: +Use badges to indicate new content and product content in various stages of the release lifecycle: -- The violet badge to highlight new early access or experimental content -- The blue badge to highlight beta content +- The violet badge to highlight new early access or experimental content +- The blue badge to highlight beta content - The green badge to highlight new content that is either GA or not product-related content, such as guides/learning paths +- The gray badge to highlight deprecated content Best practice is to use this badge for no longer than 2 months post release of the feature. ### Markup +Inline badge: + ```go {{}} [{{}}](../overview.md) ``` + +Sidebar badge in frontmatter: + +```yaml +--- +title: Page title +params: + sidebar: + badge: + color: gray + text: Deprecated +--- +``` diff --git a/layouts/partials/components/badge.html b/layouts/partials/components/badge.html index 06678ef5a15d..75df76e56a4a 100644 --- a/layouts/partials/components/badge.html +++ b/layouts/partials/components/badge.html @@ -1,6 +1,8 @@ +layouts/partials/components/badge.html {{- $colors := (dict "amber" "bg-amber-500 dark:bg-amber-400" "blue" "bg-blue-500 dark:bg-blue-400" + "gray" "bg-gray-500 dark:bg-gray-400" "green" "bg-green-500 dark:bg-green-700" "red" "bg-red-500 dark:bg-red-400" "violet" "bg-violet-500 dark:bg-violet-400" @@ -8,11 +10,11 @@ -}} {{- if not (isset $colors .color) -}} - {{- errorf "[badge] wrong color name: '%s' - supported values: amber, blue, green, red, violet" .color -}}h + {{- errorf "[badge] wrong color name: '%s' - supported values: amber, blue, gray, green, red, violet" .color -}}h {{- end -}} {{ .content }} + >{{ .content }} + \ No newline at end of file From 73f3b3c43dd3596bd95562f128599aa0989d107e Mon Sep 17 00:00:00 2001 From: Craig Osterhout Date: Wed, 19 Nov 2025 09:20:06 -0800 Subject: [PATCH 2/2] Update layouts/partials/components/badge.html Co-authored-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/partials/components/badge.html | 1 - 1 file changed, 1 deletion(-) diff --git a/layouts/partials/components/badge.html b/layouts/partials/components/badge.html index 75df76e56a4a..8383f0375e13 100644 --- a/layouts/partials/components/badge.html +++ b/layouts/partials/components/badge.html @@ -1,4 +1,3 @@ -layouts/partials/components/badge.html {{- $colors := (dict "amber" "bg-amber-500 dark:bg-amber-400" "blue" "bg-blue-500 dark:bg-blue-400"