Skip to content

Commit 05e9176

Browse files
Restructure content
1 parent b4c261c commit 05e9176

File tree

1 file changed

+65
-64
lines changed

1 file changed

+65
-64
lines changed

docs/syntax/applies.md

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,34 @@
22

33
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.
44

5-
## When to use `applies_to`
5+
## Syntax
66

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+
```
810

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.
1312

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
1814

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):
2018

2119
```
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
2324
```
25+
Unversioned products use `lifecycle` tags without a version:
2426

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+
```
2633

2734
### Combined states
2835
You can specify multiple lifecycle states for the same product, separated by commas. For example:
@@ -33,7 +40,7 @@ applies_to:
3340
```
3441
This shows that the feature was introduced in version 9.1 as a preview and became generally available in 9.4.
3542

36-
#### Life cycle
43+
### Life cycle
3744

3845
`applies_to` accepts the following lifecycle states:
3946

@@ -46,60 +53,31 @@ This shows that the feature was introduced in version 9.1 as a preview and becam
4653

4754
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.
4855

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`
6257

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).
6960

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.
7162

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.
7765

78-
## Structured model
66+
### When to use `applies_to`
7967

80-
![Applies To Model](images/applies.png)
68+
Every page must include a [page-level `applies_to`](#page-annotations) tag to clearly define its scope and availability.
8169

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)
8374

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
10179

102-
## Page annotations
80+
### Page annotations
10381

10482
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.
10583

@@ -129,7 +107,7 @@ applies_to:
129107
---
130108
```
131109

132-
## Section annotation [#sections]
110+
### Section annotations
133111

134112
```yaml {applies_to}
135113
stack: ga 9.1
@@ -171,7 +149,7 @@ stack: ga 9.1
171149

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

174-
## Inline Applies To
152+
### Inline Applies To
175153

176154
Inline applies to can be placed anywhere using the following syntax
177155

@@ -198,14 +176,37 @@ Property {preview}`<version>`
198176
: definition body
199177
```
200178

179+
## Structured model
180+
181+
![Applies To Model](images/applies.png)
182+
183+
The above model is projected to the following structured yaml.
184+
185+
```yaml
186+
---
187+
applies_to:
188+
stack:
189+
deployment:
190+
eck:
191+
ess:
192+
ece:
193+
self:
194+
serverless:
195+
security:
196+
elasticsearch:
197+
observability:
198+
product:
199+
---
200+
```
201+
This allows you to annotate various facets as defined in [](../migration/versioning.md)
202+
201203
## Examples
202204

203205
#### Stack only
204206
```yaml {applies_to}
205207
stack: ga 9.1
206208
```
207209
208-
209210
#### Stack with deployment
210211
```yaml {applies_to}
211212
stack: ga 9.1
@@ -239,4 +240,4 @@ serverless:
239240
#### Stack with product
240241
```yaml {applies_to}
241242
stack: ga 9.1
242-
```
243+
```

0 commit comments

Comments
 (0)