Skip to content

Commit 65e31b4

Browse files
committed
Document how to use feature_gate_name param with feature-state shortcode
1 parent fdc49a6 commit 65e31b4

File tree

1 file changed

+15
-0
lines changed
  • content/en/docs/contribute/style/hugo-shortcodes

1 file changed

+15
-0
lines changed

content/en/docs/contribute/style/hugo-shortcodes/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ Renders to:
4949

5050
{{< feature-state for_k8s_version="v1.10" state="beta" >}}
5151

52+
### Feature state retrieval from description file
53+
54+
To dynamically determine the state of the feature, make use of the `feature_gate_name`
55+
shortcode parameter. The feature state details will be extracted from the corresponding feature gate
56+
description file located in `content/en/docs/reference/command-line-tools-reference/feature-gates/`.
57+
For example:
58+
59+
```
60+
{{</* feature-state feature_gate_name="NodeSwap" */>}}
61+
```
62+
63+
Renders to:
64+
65+
{{< feature-state feature_gate_name="NodeSwap" >}}
66+
5267
## Feature gate description
5368

5469
In a Markdown page (`.md` file) on this site, you can add a shortcode to

0 commit comments

Comments
 (0)