Skip to content

Commit 3ac792a

Browse files
Replace/add applies_to examples
1 parent ef70953 commit 3ac792a

File tree

1 file changed

+187
-79
lines changed

1 file changed

+187
-79
lines changed

docs/syntax/applies.md

Lines changed: 187 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@ applies_to:
4444
observability: removed
4545
```
4646

47-
### Combined states
48-
You can specify multiple lifecycle states for the same product, separated by commas. For example:
49-
50-
```
51-
applies_to:
52-
stack: preview 9.1, ga 9.4
53-
```
54-
This shows that the feature was introduced in version 9.1 as a preview and became generally available in 9.4.
55-
5647
## When and where to use `applies_to`
5748

5849
✅ Use `applies_to` tags when features change state (`introduced`, `deprecated`, `removed`) or when availability differs across deployments and environments.
@@ -65,36 +56,142 @@ The `applies_to` metadata can be added at different levels in the documentation:
6556
* [Section-level](#section-annotations) annotations allow you to specify different applicability for individual sections when only part of a page varies between products or versions.
6657
* [Inline](#inline-annotations) annotations allow fine-grained annotations within paragraphs or definition lists. This is useful for highlighting the applicability of specific phrases, sentences, or properties without disrupting the surrounding content.
6758

68-
### Page annotations
69-
70-
All documentation pages **must** include an `applies_to` tag in the YAML frontmatter. Use yaml frontmatter to indicate each deployment targets availability and lifecycle status. For a complete list of supported keys and values, see the [frontmatter syntax guide](./frontmatter.md).
59+
### Lifecycle examples
60+
61+
#### Unversioned products
62+
Unversioned products aren’t following a fixed versioning scheme and are released a lot more often than versioned products. All users are using the same version of this product.
63+
* When a change is released in `ga`, it **doesn’t need any specific tagging**.
64+
* When a change is introduced as preview or beta, use `preview` or `beta` as value for the corresponding key within the `applies_to`:
65+
66+
```
67+
---
68+
applies_to:
69+
serverless: preview
70+
---
71+
```
72+
* When a change introduces a deprecation, use deprecated as value for the corresponding key within the applies_to:
73+
74+
```
75+
---
76+
applies_to:
77+
deployment:
78+
ess: deprecated
79+
---
80+
```
81+
82+
* When a change removes a feature, remove the content.
83+
**Exception:** If the content also applies to another context (for example a feature is removed in both Kibana 9.x and Serverless), then it must be kept for any user reading the page that may be using a version of Kibana prior to the removal. For example:
84+
85+
```
86+
---
87+
applies_to:
88+
stack: deprecated 9.1, removed 9.4
89+
serverless: removed
90+
---
91+
```
92+
93+
#### Versioned products
94+
95+
* When a change is released in `ga`, users need to know which version the feature became available in:
96+
97+
```
98+
---
99+
applies_to:
100+
stack: ga 9.3
101+
---
102+
```
103+
104+
* When a change is introduced as preview or beta, use `preview` or `beta` as value for the corresponding key within the `applies_to`:
105+
106+
```
107+
---
108+
applies_to:
109+
stack: beta 9.1
110+
---
111+
```
112+
113+
* When a change introduces a deprecation, use `deprecated` as value for the corresponding key within the `applies_to`:
114+
115+
```
116+
---
117+
applies_to:
118+
deployment:
119+
ece: deprecated 4.2
120+
---
121+
```
122+
123+
* When a change removes a feature, any user reading the page that may be using a version of Kibana prior to the removal must be aware that the feature is still available to them. For that reason, we do not remove the content, and instead mark the feature as removed:
124+
125+
```
126+
---
127+
applies_to:
128+
stack: deprecated 9.1, removed 9.4
129+
---
130+
```
131+
132+
#### Identify multiple states for the same content
133+
134+
A feature is deprecated in ECE 4.0 and is removed in 4.8. At the same time, it has already been removed in Elastic Cloud Hosted:
71135
72-
``` yaml
73-
---
74-
applies_to:
75-
product: preview 9.5, ga 9.6
76-
products:
77-
- id: cloud-kubernetes
78-
---
79136
```
80-
81-
```yaml
82137
---
83138
applies_to:
84-
stack: ga 9.1
85139
deployment:
86-
eck: ga 9.0
87-
ess: beta 9.1
88-
ece: deprecated 9.2.0
89-
self: unavailable
90-
serverless:
91-
security: unavailable
92-
elasticsearch: beta
93-
observability: deprecated
94-
product: preview 9.5, deprecated 9.7
140+
ece: deprecated 4.0, removed 4.8
141+
ess: removed
95142
---
96143
```
97144
145+
### Page annotations
146+
147+
All documentation pages **must** include an `applies_to` tag in the YAML frontmatter. Use yaml frontmatter to indicate each deployment targets availability and lifecycle status. For a complete list of supported keys and values, see the [frontmatter syntax guide](./frontmatter.md).
148+
149+
#### Page annotation examples
150+
151+
There are 3 typical scenarios to start from:
152+
1. The documentation set or page is primarily about using or interacting with Elastic Stack components or the Serverless UI:
153+
154+
```yaml
155+
---
156+
applies_to:
157+
stack: ga
158+
serverless: ga
159+
products:
160+
-id: kibana
161+
-id: elasticsearch
162+
-id: elastic-stack
163+
---
164+
```
165+
166+
2. The documentation set or page is primarily about orchestrating, deploying or configuring an installation (only include relevant keys):
167+
168+
```yaml
169+
---
170+
applies_to:
171+
serverless: ga
172+
deployment:
173+
ess: ga
174+
ece: ga
175+
eck: ga
176+
products:
177+
-id: cloud-serverless
178+
-id: cloud-hosted
179+
-id: cloud-enterprise
180+
-id: cloud-kubernetes
181+
---
182+
```
183+
184+
3. The documentation set or page is primarily about a product following its own versioning schema:
185+
186+
```yaml
187+
---
188+
applies_to:
189+
product: ga
190+
products:
191+
-id: edot-collector
192+
---
193+
```
194+
98195
### Section annotations
99196
100197
```yaml {applies_to}
@@ -137,6 +234,57 @@ stack: ga 9.1
137234

138235
This will allow the yaml inside the `{applies_to}` directive to be fully highlighted.
139236

237+
#### Section annotation examples
238+
239+
1. The whole page is generally applicable to Elastic Stack 9.0 and to Serverless, but one specific section isn’t applicable to Serverless (and there is no alternative for it):
240+
241+
````markdown
242+
## Configure a space-level landing page [space-landing-page]
243+
```{applies_to}
244+
stack: ga
245+
serverless: unavailable
246+
```
247+
````
248+
249+
2. The whole page is generally applicable to Elastic Cloud Enterprise and Elastic Cloud Hosted, but one specific paragraph only applies to Elastic Cloud Enterprise, and another paragraph explains the same, but for Elastic Cloud Hosted:
250+
251+
````markdown
252+
## Secure a deployment [secure-deployment-ech]
253+
```{applies_to}
254+
deployment:
255+
ess: ga
256+
```
257+
258+
[...]
259+
260+
## Secure a deployment [secure-deployment-ece]
261+
```{applies_to}
262+
deployment:
263+
ece: ga
264+
```
265+
266+
[...]
267+
````
268+
3. A specific section, paragraph or list item has specific applicability that differs from the context set at the page or section level, and the action is not possible at all for that context (meaning that there is no alternative). For example:
269+
270+
````markdown
271+
---
272+
applies_to:
273+
stack: ga
274+
serverless: ga
275+
---
276+
277+
# Spaces
278+
279+
[...]
280+
281+
## Configure a space-level landing page [space-landing-page]
282+
```{applies_to}
283+
stack: ga
284+
serverless: unavailable
285+
```
286+
````
287+
140288
### Inline annotations
141289

142290
Inline applies to can be placed anywhere using the following syntax
@@ -147,14 +295,16 @@ This can live inline {applies_to}`section: <life-cycle> [version]`
147295

148296
An inline version example would be {applies_to}`stack: beta 9.1` this allows you to target elements more concretely visually.
149297

150-
A common use case would be to place them on definition lists:
298+
#### Inline annotation examples
151299

152-
Fruit {applies_to}`stack: preview 9.1`
153-
: A sweet and fleshy product of a tree or other plant that contains seed and can be eaten as food. Common examples include apples, oranges, and bananas. Most fruits are rich in vitamins, minerals and fiber.
300+
1. The whole page is generally applicable to Elastic Stack 9.0 and to Serverless, but one specific section isn’t applicable to Serverless (and there is no alternative):
154301

155-
Applies {preview}`9.1`
156-
: A sweet and fleshy product of a tree or other plant that contains seed and can be eaten as food. Common examples include apples, oranges, and bananas. Most fruits are rich in vitamins, minerals and fiber.
302+
````markdown
303+
**Spaces** let you organize your content and users according to your needs.
157304

305+
- Each space has its own saved objects.
306+
- {applies_to}`stack: ga` {applies_to}`serverless: unavailable` Each space has its own navigation, called solution view.
307+
````
158308

159309
A specialized `{preview}` role exist to quickly mark something as a technical preview. It takes a required version number
160310
as argument.
@@ -186,46 +336,4 @@ applies_to:
186336
product:
187337
---
188338
```
189-
This allows you to annotate various facets as defined in [](../migration/versioning.md)
190-
191-
## Examples
192-
193-
#### Stack only
194-
```yaml {applies_to}
195-
stack: ga 9.1
196-
```
197-
198-
#### Stack with deployment
199-
```yaml {applies_to}
200-
stack: ga 9.1
201-
deployment:
202-
eck: ga 9.0
203-
ess: beta 9.1
204-
```
205-
206-
#### Deployment only
207-
```yaml {applies_to}
208-
deployment:
209-
ece: deprecated 9.2.0
210-
self: unavailable
211-
```
212-
213-
#### Serverless only
214-
When a change is released in `ga` for unversioned products, it doesn’t need any specific tagging.
215-
216-
```yaml {applies_to}
217-
serverless:
218-
elasticsearch: preview
219-
```
220-
221-
#### Serverless with project differences
222-
```yaml {applies_to}
223-
serverless:
224-
security: unavailable
225-
elasticsearch: beta
226-
observability: deprecated
227-
```
228-
#### Stack with product
229-
```yaml {applies_to}
230-
stack: ga 9.1
231-
```
339+
This allows you to annotate various facets as defined in [](../migration/versioning.md)

0 commit comments

Comments
 (0)