Skip to content

Commit dd02c04

Browse files
reorg
1 parent ac54f24 commit dd02c04

File tree

4 files changed

+259
-134
lines changed

4 files changed

+259
-134
lines changed

docs/_docset.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ toc:
3939
- folder: cumulative-docs
4040
children:
4141
- file: index.md
42-
- file: reference.md
4342
- file: best-practices.md
43+
- file: reference.md
4444
- file: content-patterns.md
4545
- file: branching-strategy.md
4646
- file: add-repo.md

docs/contribute/cumulative-docs/best-practices.md

Lines changed: 173 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
11
---
2-
navigation_title: Best practices
2+
navigation_title: Guidelines
33
---
44

5-
# Best practices for using `applies_to`
5+
# Cumulative docs guidelines
66

7-
Depending on what you're trying to communicate, you can use the following patterns to represent version and deployment type differences in your docs.
7+
Start by asking yourself:
8+
9+
* Does this content vary between products, versions, or deployment types?
10+
* Is this a feature lifecycle change or just content improvement?
11+
* Will users benefit from knowing this information?
12+
13+
If the answer to at least one of these questions is _yes_, follow these guidelines to write cumulative documentation.
14+
15+
## Dimensions of applicability
16+
17+
### Type
18+
19+
In cumulative documentation, you can use `applies_to` to communicate:
20+
21+
* **Product- or deployment-specific availability**: When content applies to or functions differently between products or deployment types (for example, Elastic Cloud Serverless or Elastic Cloud Hosted). Read more in [Product and deployment model tags](#products-and-deployment-models).
22+
* **Feature lifecycle and version-related functionality**: When features are introduced, modified, or removed in specific versions including lifecycle changes (for example, going from Beta to GA). Read more in [Tagging version-related changes](#versions).
23+
24+
Both types of applicability are added as part of the same `applies_to` tagging logic.
25+
The type of applicability is the [keys](/contribute/cumulative-docs/reference.md#key)
26+
and the [feature lifecycle](/contribute/cumulative-docs/reference.md#lifecycle)
27+
and [version](/contribute/cumulative-docs/reference.md#version) are make up the value.
28+
29+
```
30+
<key>: <lifecycle> <version>
31+
```
32+
33+
### Level
34+
35+
For each type of applicability information, you can add `applies_to` metadata at different levels:
36+
37+
* **Page-level** metadata is **mandatory** and must be included in the frontmatter.
38+
This defines the overall applicability of the page across products, deployments, and environments.
39+
* **Section-level** annotations allow you to specify different applicability for individual sections
40+
when only part of a page varies between products or versions.
41+
% * **Element-level** annotations allow tagging block-level elements like tabs, dropdowns, and admonitions.
42+
% This is useful for ...
43+
* **Inline** annotations allow fine-grained annotations within paragraphs or definition lists.
44+
This is useful for highlighting the applicability of specific phrases, sentences,
45+
or properties without disrupting the surrounding content.
846

947
## General guidelines
1048

@@ -18,20 +56,20 @@ Depending on what you're trying to communicate, you can use the following patter
1856
* Avoid using version numbers in prose adjacent to `applies_to` badge to prevent
1957
confusion when the badge is rended with `Planned` ahead of a release.
2058

21-
% Reference: https://github.com/elastic/kibana/pull/229485/files#r2231850710
22-
* Create hierarchy of versioned information??
23-
2459
% Reference: https://elastic.github.io/docs-builder/versions/#defaults-and-hierarchy
2560
* Do not assume a default deployment type, stack flavor, product version, or project type.
2661
Treat all flavors and deployment types equally. Don't treat one as the "base" and the other as the "exception".
2762

28-
## Order of items
63+
% Reference: https://github.com/elastic/kibana/pull/229485/files#r2231850710
64+
% * Create hierarchy of versioned information??
2965

3066
% TO DO: Open an issue to force the order in the code.
67+
## Order of items
3168

3269
**Versions.** Always put the newest version first when listing multiple versions. As a result, the lifecycles should be in reverse order of product development progression, too.
3370

34-
<image>
71+
% TO DO: Add example / image
72+
% <image>
3573

3674
% Reference: https://elastic.github.io/docs-builder/versions/#defaults-and-hierarchy
3775
% Needs work...
@@ -40,7 +78,133 @@ Depending on what you're trying to communicate, you can use the following patter
4078
* **Deployment types**: Elastic Cloud Serverless, Elastic Cloud Hosted, Elastic Cloud on Kubernetes, Elastic Cloud Enterprise, Self-managed
4179
* **Monitoring for Java applications**: Elastic Distribution of OpenTelemetry (EDOT) Java, APM Java agent
4280

43-
<image>
81+
% TO DO: Add example / image
82+
% <image>
83+
84+
## Product and deployment model tags [products-and-deployment-models]
85+
86+
For the full list of supported `applies_to` keys, refer to [](/contribute/cumulative-docs/reference.md#key).
87+
88+
### Guidelines [products-and-deployment-models-guidelines]
89+
90+
* **Always include page-level product and deployment model applicability information**.
91+
This is _mandatory_ for all pages.
92+
* **Determine if section or inline applicability information is necessary.**
93+
This _depends on the situation_.
94+
* For example, if a portion of a page is applicable to a different context than what was specified at the page level,
95+
clarify in what context it applies using section or inline `applies_to` badges.
96+
97+
### Example scenarios [products-and-deployment-models-examples]
98+
99+
* Content is primarily about both Elastic Stack components and the Serverless UI ([example](/contribute/cumulative-docs/content-patterns.md#stateful-serverless)).
100+
* Content is primarily about orchestrating, deploying or configuring an installation ([example](/contribute/cumulative-docs/content-patterns.md#stateful-serverless)).
101+
* Content is primarily about a product following its own versioning schema ([example]()).
102+
* A whole page is generally applicable to Elastic Stack 9.0 and to Serverless,
103+
but one specific section isn’t applicable to Serverless ([example]()).
104+
* The whole page is generally applicable to all deployment types,
105+
but one specific paragraph only applies to Elastic Cloud Hosted and Serverless,
106+
and another paragraph only applies to Elastic Cloud Enterprise ([example]()).
107+
* Likewise, when the difference is specific to just one paragraph or list item, the same rules apply.
108+
Just the syntax slightly differs so that it stays inline ([example]()).
109+
110+
% :::{include} /syntax/_snippets/page-level-applies-examples.md
111+
% :::
112+
113+
% :::{tip}
114+
% Docs V3 frontmatter also supports a `products` attribute. This attribute is not surfaced to users on docs pages. Instead, it's used by the elastic.co search to let users filter their docs search results.
115+
% :::
116+
117+
% Use `applies_to` in the YAML frontmatter to indicate each deployment target's availability and lifecycle status.
118+
% The `applies_to` attribute is used to display contextual badges on each page.
119+
% For the full list of supported keys and values, refer to [](/contribute/cumulative-docs/reference.md#key).
120+
121+
% :::{include} /syntax/_snippets/section-level-applies-examples.md
122+
% :::
123+
%
124+
% * Likewise, when the difference is specific to just one paragraph or list item, the same rules apply. Just the syntax slightly differs so that it stays inline:
125+
%
126+
% :::{include} /syntax/_snippets/line-level-applies-example.md
127+
% :::
128+
129+
## Version-related changes [versions]
130+
131+
### Guidelines [versions-guidelines]
132+
133+
* **Ensure your change is related to a specific version.**
134+
Even though a change is made when a specific version is the latest version,
135+
it does not mean the added or updated content only applies to that version.
136+
* For example, you should not use version tagging when fixing typos,
137+
improving styling, or adding a long-forgotten setting.
138+
139+
### Examples [versions-examples]
140+
141+
* **A new feature is added to {{serverless-short}} or {{ecloud}}. How do I tag it?**
142+
Cumulative documentation is not meant to replace release notes. If a feature becomes available in {{serverless-short}} and doesn’t have a particular lifecycle state to call out (preview, beta, deprecated…), it does not need specific tagging.
143+
144+
However, in this scenario, it is important to consider carefully [when the change is going to be published](/contribute/branching-strategy.md).
145+
146+
We do not do date-based tagging for unversioned products.
147+
148+
% ### For unversioned products (typically {{serverless-short}} and {{ech}})
149+
%
150+
% :::{include} /syntax/_snippets/unversioned-lifecycle.md
151+
% :::
152+
%
153+
% ### For versioned products
154+
%
155+
% :::{include} /syntax/_snippets/versioned-lifecycle.md
156+
% :::
157+
%
158+
% ### Document features shared between serverless and {{stack}}
159+
%
160+
% :::{include} /syntax/_snippets/stack-serverless-lifecycle-example.md
161+
% :::
162+
%
163+
% ### Identify multiple states for the same content
164+
%
165+
% :::{include} /syntax/_snippets/multiple-lifecycle-states.md
166+
% :::
167+
168+
## When to indicate something is NOT applicable
169+
170+
By default, we communicate that content does not apply to a certain context by simply **not specifying it**.
171+
For example, a page describing how to create an {{ech}} deployment just requires identifying "{{ech}}" as context. No need to overload the context with additional `serverless: unavailable` indicators.
172+
173+
This is true for most situations. However, it can still be useful to call it out in a few specific scenarios:
174+
175+
* When there is a high risk of confusion for users. This may be subjective, but let’s imagine a scenario where a feature is available in 2 out of 3 serverless project types. It may make sense to clarify and be explicit about the feature being “unavailable” for the 3rd type. For example:
176+
177+
```yml
178+
---
179+
applies_to:
180+
stack: ga
181+
serverless:
182+
elasticsearch: ga
183+
security: ga
184+
observability: unavailable
185+
---
186+
```
187+
188+
189+
* When 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:
190+
191+
````md
192+
---
193+
applies_to:
194+
stack: ga
195+
serverless: ga
196+
—--
197+
198+
# Spaces
199+
200+
[...]
201+
202+
## Configure a space-level landing page [space-landing-page]
203+
```{applies_to}
204+
serverless: unavailable
205+
```
206+
````
207+
% I think we wanted to not specify stack here
44208

45209
## Placement of badges
46210

docs/contribute/cumulative-docs/content-patterns.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,65 @@ navigation_title: "Example scenarios"
44

55
# Example scenarios
66

7+
## Page applies to both stateful and serverless [stateful-serverless]
8+
9+
If an entire page is primarily about using or interacting with Elastic Stack components or the Serverless UI,
10+
add the `stack` and `serverless` keys to the `applies_to` in the frontmatter.
11+
12+
```yml
13+
---
14+
applies_to:
15+
stack: ga
16+
serverless: ga
17+
---
18+
```
19+
20+
For example...
21+
22+
<image>
23+
24+
% ## Content on orchestrating, deploying, or configuring an installation
25+
26+
## Only one section applies
27+
28+
If the content of an entire page is generally available to Elastic Stack 9.0.0
29+
and the content in one section only applies to Elastic Stack 9.1.0 and later,
30+
add a section-level annotation to the relevant heading.
31+
32+
````
33+
---
34+
applies_to:
35+
stack: ga 9.0.0
36+
---
37+
38+
# Spaces
39+
40+
## Configure a space-level landing page [space-landing-page]
41+
42+
```{applies_to}
43+
stack: ga 9.1.0
44+
```
45+
````
46+
47+
For example...
48+
49+
<image>
50+
51+
## Only one section does _not_ apply
52+
53+
A whole page is generally applicable to Elastic Stack 9.0.0 and to Serverless,
54+
but one specific section isn’t applicable to Serverless.
55+
56+
### Solution [not-one-section-solution]
57+
58+
## Only one paragraph applies
59+
60+
### Solution [one-paragraph-solution]
61+
62+
## Only one paragraph does _not_ apply
63+
64+
### Solution [not-one-paragraph-solution]
65+
766
## Code block content varies [code-block]
867

968
Often the content in a code block will vary between situations (versions, deployment types, etc).

0 commit comments

Comments
 (0)