Skip to content

Commit 0d668fc

Browse files
committed
Move examples
1 parent f7a13e0 commit 0d668fc

File tree

2 files changed

+40
-46
lines changed

2 files changed

+40
-46
lines changed

docs/syntax/_snippets/inline-level-applies-examples.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ This example shows how to use directly a key from the second level of the `appli
5656

5757
::::{tab-item} Output
5858

59-
- {applies_to}`{ serverless: "ga" , stack: "ga 9.1.0" }`
60-
- {applies_to}`{ edot_python: "preview 1.7.0" , apm_agent_java: "beta 1.0.0" }`
61-
- {applies_to}`{ stack: "ga 9.0" , deployment: { eck: "ga 9.0" } }`
59+
- {applies_to}`serverless: ga` {applies_to}`stack: ga 9.1.0`
60+
- {applies_to}`edot_python: preview 1.7.0, ga 1.8.0` {applies_to}`apm_agent_java: beta 1.0.0, ga 1.2.0`
61+
- {applies_to}`stack: ga 9.0` {applies_to}`eck: ga 3.0`
6262

6363
::::
6464

@@ -71,30 +71,5 @@ This example shows how to use directly a key from the second level of the `appli
7171
::::
7272

7373
:::::
74-
7574
::::::
7675

77-
::::::{dropdown} Complex scenarios with different product types
78-
79-
:::::{tab-set}
80-
81-
::::{tab-item} Output
82-
83-
- {applies_to}`{ stack: "preview 9.1", product: { edot_python: "preview 1.4.0" } }`
84-
85-
Notice that, when mixing different statement types, the applies_to inline syntax requires JSON-like nesting for product-specific applicability.
86-
87-
::::
88-
89-
::::{tab-item} Markdown
90-
```markdown
91-
- {applies_to}`{ stack: "preview 9.1", product: { edot_python: "preview 1.4.0" } }`
92-
```
93-
94-
Notice that, when mixing different statement types, the applies_to inline syntax requires JSON-like nesting for product-specific applicability.
95-
96-
::::
97-
98-
:::::
99-
100-
::::::

docs/syntax/applies.md

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,26 @@ Where:
2929
- The lifecycle is mandatory.
3030
- The version is optional.
3131

32-
:::{important}
33-
All documentation pages must include an `applies_to` tag in the YAML frontmatter. Use YAML frontmatter to indicate each deployment target's availability and lifecycle status. For a complete list of supported keys and values, see the [frontmatter syntax guide](./frontmatter.md).
34-
:::
32+
### Page level
3533

36-
### Versioned products
34+
Page level annotations are added in the YAML frontmatter, starting with the `applies_to` key and following the [key-value reference](#key-value-reference). For example:
3735

38-
Versioned products require a `version` tag to be used with the `lifecycle` tag:
39-
40-
```
36+
```yaml
37+
---
4138
applies_to:
42-
stack: preview 9.1, ga 9.4
39+
stack: ga
4340
deployment:
44-
ece: deprecated 9.2, removed 9.8
41+
ece: ga
42+
---
4543
```
4644

47-
Unversioned products use `lifecycle` tags without a version:
45+
For more examples, refer to [Page annotation examples](#page-annotation-examples).
4846

49-
```
50-
applies_to:
51-
serverless:
52-
elasticsearch: beta
53-
observability: removed
54-
```
47+
:::{important}
48+
All documentation pages must include an `applies_to` tag in the YAML frontmatter.
49+
:::
5550

56-
### Section annotations
51+
### Section level
5752

5853
A header can be followed by an `{applies_to}` directive which contextualizes the applicability of the section further.
5954

@@ -75,11 +70,13 @@ stack: ga 9.1
7570

7671
This allows the YAML inside the `{applies_to}` directive to be fully highlighted.
7772

73+
For more examples, refer to [Section annotation examples](#section-annotation-examples).
74+
7875
:::{note}
7976
The `{applies_to}` directive must be preceded by a heading directly.
8077
:::
8178

82-
### Inline annotations
79+
### Inline level
8380

8481
You can add inline applies annotations to any line using the following syntax:
8582

@@ -95,6 +92,8 @@ Property {preview}`<version>`
9592
: definition body
9693
```
9794

95+
For more examples, refer to [Inline annotation examples](#inline-annotation-examples).
96+
9897
## Key-value reference
9998

10099
Use the following key-value reference to find the appropriate key and value for your applicability statements.
@@ -125,6 +124,26 @@ Use the following key-value reference to find the appropriate key and value for
125124

126125
## Examples
127126

127+
### Versioning examples
128+
129+
Versioned products require a `version` tag to be used with the `lifecycle` tag:
130+
131+
```
132+
applies_to:
133+
stack: preview 9.1, ga 9.4
134+
deployment:
135+
ece: deprecated 9.2, removed 9.8
136+
```
137+
138+
Unversioned products use `lifecycle` tags without a version:
139+
140+
```
141+
applies_to:
142+
serverless:
143+
elasticsearch: beta
144+
observability: removed
145+
```
146+
128147
### Lifecycle and versioning examples
129148

130149
:::::{dropdown} Unversioned products

0 commit comments

Comments
 (0)