Skip to content

Commit 8e3878a

Browse files
add more examples
1 parent a534976 commit 8e3878a

File tree

4 files changed

+59
-26
lines changed

4 files changed

+59
-26
lines changed

docs/contribute/cumulative-docs/badge-placement.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ For example, in the [Semantic text field type](https://www.elastic.co/docs/refer
3737
:alt: Correct use of applies_to with headings
3838
::::
3939

40+
% FOR THE REVIEWER: IS THIS TRUE?
41+
% What do you think of allowing inline applies_to in headings as long as there is only one badge?
4042
:::{warning}
4143
Do **not** use [inline annotations](/syntax/applies.md#inline-annotations) with headings, which will cause rendering issues in _On this page_.
4244

@@ -96,6 +98,9 @@ For example, the [Alerting and action settings in Kibana](https://www.elastic.co
9698
:alt:
9799
::::
98100

101+
% FOR THE REVIEWER: THOUGHTS?
102+
% This is what I'm seeing in the currently published docs,
103+
% but I'm not sure if this is what we want to recommend.
99104
#### If the list just happens to have one or more items that are only relevant to a specific situation, put the badge at the end of the list item [list-other]
100105

101106
Placing the badge at the end of the list item maintains the flow of the list without distracting the reader with badges while still making it clear that the content in that list item is only applicable to the specified situation.

docs/contribute/cumulative-docs/example-scenarios.md

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,36 @@ the Serverless UI, add both the `stack` and `serverless` keys to the `applies_to
2020

2121
% ## Content on orchestrating, deploying, or configuring an installation
2222

23-
## Only one section applies [one-section]
23+
## Section applicability differs from page applicability [page-section-varies]
2424

25-
The whole page is generally applicable to all deployment types, but one specific paragraph
26-
only applies to Elastic Cloud Hosted and Serverless, and another paragraph only applies to
27-
Elastic Cloud Enterprise:
25+
When only one section has different applicability than the applicability indicated at the
26+
page level in the frontmatter, use section-level `applies_to` badges.
2827

28+
### If a section applies [one-section]
29+
30+
For example, the content on the [Security](https://www.elastic.co/docs/deploy-manage/security) page is generally applicable to all deployment types, but the first section only applies to Elastic Cloud Hosted and Serverless:
31+
32+
* In the frontmatter, specify that the content on the page applies to all deployment types unless otherwise specified.
33+
* In a section-level annotation, specify that the content only applies to `ech` and `serverless`.
34+
35+
:::{warning}
36+
**Don’t overload with exclusions unless it is necessary.**
37+
38+
% FOR THE REVIEWER: IS THIS TRUE?
39+
In this example, we expect the reader to understand that in sections where only some deployment types are listed,
40+
the content is only applicable to the deployment types listed in the section-level annotation
41+
(and is _not_ applicable to the deployment types that are listed at the page level,
42+
but are omitted from section-level annotation).
43+
:::
44+
45+
:::::{tab-set}
46+
::::{tab-item} Image
47+
:::{image} ./images/example-one-section.png
48+
:screenshot:
49+
:alt:
50+
:::
51+
::::
52+
::::{tab-item} Code
2953
````
3054
---
3155
applies_to:
@@ -36,41 +60,46 @@ applies_to:
3660
3761
[...]
3862
39-
## Cloud organization level security [cloud-organization-level]
63+
## Managed security in Elastic Cloud
4064
4165
```{applies_to}
4266
deployment:
43-
ess: ga
67+
ech: ga
4468
serverless: ga
4569
```
4670
47-
[...]
48-
49-
## Orchestrator level security [orchestrator-level]
50-
51-
```{applies_to}
52-
deployment:
53-
ece: ga
54-
```
55-
5671
[...]
5772
````
58-
59-
% TO DO: Add real example
60-
% <image>
73+
::::
74+
:::::
6175

6276
:::{tip}
6377
Likewise, when the difference is specific to just one paragraph or list item, the same rules apply.
64-
Just the syntax slightly differs so that it stays inline: `` {applies_to}`ess: ga` {applies_to}`serverless: ga` ``.
65-
66-
78+
Just the syntax slightly differs so that it stays inline: `` {applies_to}`ech: ga` {applies_to}`serverless: ga` ``.
6779
:::
6880

69-
## Only one section does _not_ apply [not-one-section]
81+
### If one section does _not_ apply [not-one-section]
7082

7183
A whole page is generally applicable to Elastic Stack 9.0.0 and to Serverless,
7284
but one specific section isn’t applicable to Serverless.
7385

86+
For example, the content on the [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) page is generally applicable to both Serverless and stateful, but one section only applies stateful:
87+
88+
* In the frontmatter, specify that the content on the page applies to both unless otherwise specified.
89+
90+
% FOR THE REVIEWER: WHICH IS CORRECT?
91+
% The existing docs and the "real" example in the wild use different strategies.
92+
% Do we include `stack: ga` in the section annotation or not?
93+
* In a section-level annotation, specify that the content is `ga` in `stack` and is `unavailable` in `serverless`.
94+
95+
:::::{tab-set}
96+
::::{tab-item} Image
97+
:::{image} ./images/example-not-one-section.png
98+
:screenshot:
99+
:alt:
100+
:::
101+
::::
102+
::::{tab-item} Code
74103
````
75104
---
76105
applies_to:
@@ -85,17 +114,16 @@ applies_to:
85114
## Configure a space-level landing page [space-landing-page]
86115
87116
```{applies_to}
117+
stack: ga
88118
serverless: unavailable
89119
```
90120
````
121+
::::
122+
:::::
91123

92124
% TO DO: Add real example
93125
% <image>
94126

95-
:::{warning}
96-
Don’t overload with exclusions unless it is necessary.
97-
:::
98-
99127
:::{tip}
100128
Likewise, when the difference is specific to just one paragraph or list item, the same rules apply.
101129
Just the syntax slightly differs so that it stays inline: `` {applies_to}`serverless: unavailable` ``.
286 KB
Loading
381 KB
Loading

0 commit comments

Comments
 (0)