You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/syntax/applies.md
+65-64Lines changed: 65 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,34 @@
2
2
3
3
The `applies_to` metadata allows you to specify which product versions, deployment types, and environments a specific page, section, or line applies to. Documentation published using Elastic Docs V3 follows a [cumulative model](../contribute/index.md) where a single page covers multiple versions cumulatively over time, instead of creating separate pages for each minor release.
4
4
5
-
## When to use `applies_to`
5
+
## Syntax
6
6
7
-
Every page must include a [page-level `applies_to`](#page-annotations) tag to clearly define its scope and availability.
7
+
```
8
+
<life-cycle> [version], <life-cycle> [version]
9
+
```
8
10
9
-
Use version tagging when:
10
-
* A feature is introduced (e.g., preview, beta, or ga)
11
-
* A feature is deprecated (e.g., deprecated)
12
-
* A feature is removed (e.g., removed)
11
+
Taking a mandatory [life-cycle](#life-cycle) with an optional version.
13
12
14
-
You don’t need version tagging for:
15
-
* Typos, formatting, or style changes
16
-
* Long-standing features being documented for the first time
17
-
* Content updates that don’t reflect a feature lifecycle change
13
+
### Version
18
14
19
-
## Syntax
15
+
Can be in either `major.minor` or `major.minor.patch` format
16
+
17
+
Versioned products require a `version` tag to be used with the `lifecycle` tag. See [Syntax](#syntax):
20
18
21
19
```
22
-
<life-cycle> [version], <life-cycle> [version]
20
+
applies_to:
21
+
stack: preview 9.1, ga 9.4
22
+
deployment:
23
+
ece: deprecated 9.2, removed 9.8
23
24
```
25
+
Unversioned products use `lifecycle` tags without a version:
24
26
25
-
Taking a mandatory [life-cycle](#life-cycle) with an optional version.
27
+
```
28
+
applies_to:
29
+
serverless:
30
+
elasticsearch: beta
31
+
observability: removed
32
+
```
26
33
27
34
### Combined states
28
35
You can specify multiple lifecycle states for the same product, separated by commas. For example:
@@ -33,7 +40,7 @@ applies_to:
33
40
```
34
41
This shows that the feature was introduced in version 9.1 as a preview and became generally available in 9.4.
35
42
36
-
####Life cycle
43
+
### Life cycle
37
44
38
45
`applies_to` accepts the following lifecycle states:
39
46
@@ -46,60 +53,31 @@ This shows that the feature was introduced in version 9.1 as a preview and becam
46
53
47
54
Both versioned and unversioned products use the same lifecycle tags, but only versioned products can be marked `ga`. Unversioned products are considered `ga` by default and don’t need specification.
48
55
49
-
#### Version
50
-
51
-
Can be in either `major.minor` or `major.minor.patch` format
52
-
53
-
Versioned products require a `version` tag to be used with the `lifecycle` tag. See [Syntax](#syntax):
54
-
55
-
```
56
-
applies_to:
57
-
stack: preview 9.1, ga 9.4
58
-
deployment:
59
-
ece: deprecated 9.2, removed 9.8
60
-
```
61
-
Unversioned products use `lifecycle` tags without a version:
56
+
## When and where to use `applies_to`
62
57
63
-
```
64
-
applies_to:
65
-
serverless:
66
-
elasticsearch: beta
67
-
observability: removed
68
-
```
58
+
The `applies_to` tag can be added at different levels in the documentation: [page-level](#page-annotations), [section-level](#section-annotations), and [inline](#inline-applies-to). Each level uses slightly different syntax and serves a specific purpose:
59
+
*[Page-level](#page-annotations) tagging is **mandatory** and must be included in the frontmatter. It defines the overall applicability of the page across products, deployments, and environments. For a complete list of supported keys and values, see the [frontmatter syntax guide](./frontmatter.md).
69
60
70
-
#### Examples
61
+
When the context differs from what was specified at the page level in a specific section or part of the page, it is appropriate to re-establish it.
71
62
72
-
```
73
-
preview 9.5, ga 9.7
74
-
deprecated 9.9.0
75
-
unavailable
76
-
```
63
+
*[Section-level](#section-annotations) annotation lets you show or hide specific sections of content depending on the target context. This is helpful when only a part of a page varies between products or versions.
64
+
*[Inline tagging](#inline-applies-to) allows fine-grained annotations within paragraphs or definition lists. It’s useful for highlighting the applicability of specific phrases, sentences, or properties without disrupting the surrounding content.
77
65
78
-
##Structured model
66
+
### When to use `applies_to`
79
67
80
-

68
+
Every page must include a [page-level `applies_to`](#page-annotations) tag to clearly define its scope and availability.
81
69
82
-
The above model is projected to the following structured yaml.
70
+
Use version tagging when:
71
+
* A feature is introduced (e.g., preview, beta, or ga)
72
+
* A feature is deprecated (e.g., deprecated)
73
+
* A feature is removed (e.g., removed)
83
74
84
-
```yaml
85
-
---
86
-
applies_to:
87
-
stack:
88
-
deployment:
89
-
eck:
90
-
ess:
91
-
ece:
92
-
self:
93
-
serverless:
94
-
security:
95
-
elasticsearch:
96
-
observability:
97
-
product:
98
-
---
99
-
```
100
-
This allows you to annotate various facets as defined in [](../migration/versioning.md)
75
+
You don’t need version tagging for:
76
+
* Typos, formatting, or style changes
77
+
* Long-standing features being documented for the first time
78
+
* Content updates that don’t reflect a feature lifecycle change
101
79
102
-
## Page annotations
80
+
###Page annotations
103
81
104
82
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.
105
83
@@ -129,7 +107,7 @@ applies_to:
129
107
---
130
108
```
131
109
132
-
## Section annotation [#sections]
110
+
###Section annotations
133
111
134
112
```yaml {applies_to}
135
113
stack: ga 9.1
@@ -171,7 +149,7 @@ stack: ga 9.1
171
149
172
150
This will allow the yaml inside the `{applies_to}` directive to be fully highlighted.
173
151
174
-
## Inline Applies To
152
+
### Inline Applies To
175
153
176
154
Inline applies to can be placed anywhere using the following syntax
0 commit comments