diff --git a/.github/crd-config/templates/asciidoctor/operator/type.tpl b/.github/crd-config/templates/asciidoctor/operator/type.tpl index 6d7c0c9404..8481385b81 100644 --- a/.github/crd-config/templates/asciidoctor/operator/type.tpl +++ b/.github/crd-config/templates/asciidoctor/operator/type.tpl @@ -1,11 +1,26 @@ {{- define "type" -}} {{- $type := . -}} +{{- /* +Beta CRD marking: types whose names match this pattern document beta features. +They get a plain (beta) suffix on the section heading and a badge::[label=beta] +line at the start of the section body. The explicit [id=...] anchor above each +heading is untouched, so existing xrefs keep working. +Update this pattern when features graduate to GA or new beta CRDs are added. +Pipeline* = Pipeline CRD (beta in 26.2). NamedValueSource (exact match) is a +Pipeline-only supporting type that does not share the prefix. The shared +ValueSource type predates Pipeline and stays GA. StretchCluster and ShadowLink +are GA in 26.2 and deliberately not listed. +*/ -}} +{{- $betaTypePattern := "^(Pipeline|NamedValueSource$)" -}} +{{- $isBeta := regexMatch $betaTypePattern $type.Name -}} {{- if asciidocShouldRenderType $type -}} [id="{{ asciidocTypeID $type | asciidocRenderAnchorID }}"] -== {{ $type.Name }} {{ if $type.IsAlias }}({{ asciidocRenderTypeLink $type.UnderlyingType }}) {{ end }} +== {{ $type.Name }} {{ if $type.IsAlias }}({{ asciidocRenderTypeLink $type.UnderlyingType }}) {{ end }}{{ if $isBeta }}(beta){{ end }} -{{ $type.Doc }} +{{ if $isBeta }}badge::[label=beta] + +{{ end }}{{ $type.Doc }} {{ if eq $type.Name "RedpandaClusterSpec" }} For descriptions and default values, see xref:k-redpanda-helm-spec.adoc[]. diff --git a/local-antora-playbook.yml b/local-antora-playbook.yml index 1636d5f304..46666cce8d 100644 --- a/local-antora-playbook.yml +++ b/local-antora-playbook.yml @@ -39,6 +39,7 @@ asciidoc: - '@redpanda-data/docs-extensions-and-macros/macros/glossary' - '@redpanda-data/docs-extensions-and-macros/macros/config-ref' - '@redpanda-data/docs-extensions-and-macros/macros/helm-ref' + - '@redpanda-data/docs-extensions-and-macros/macros/badge' - '@redpanda-data/docs-extensions-and-macros/asciidoc-extensions/add-line-numbers-highlights' antora: extensions: