Skip to content

Commit b767a42

Browse files
colleenmcginnisbmorelli25florent-leborgneleemthomposhainaraskas
authored
Add best practices for applies_to (#1614)
* initial outline * fix links * reorg * continue building out content * apply suggestions from code review Co-authored-by: Brandon Morelli <[email protected]> * address some feedback from @bmorelli's first round of review * fix link * reorg * deduplicate * finish building out badge placement page * clean up guidelines and examples * clarify * add more examples * add more examples * add redirects * apply suggestions from code review Co-authored-by: florent-leborgne <[email protected]> * clarify title * address badge placement feedback * address some feedback on examples * remove branching strategy ref Co-authored-by: Liam Thompson <[email protected]> * shain-ify the guidelines page Co-authored-by: shainaraskas <[email protected]> * shain-ify the reference page Co-authored-by: shainaraskas <[email protected]> * shain-ify badge placement page * remove redirect * try a different redirect * Update docs/contribute/cumulative-docs/guidelines.md Co-authored-by: shainaraskas <[email protected]> * revert changes to docs/syntax/_snippets/page-level-applies-examples.md * clean up general guidelines section * clean up section on removed features * add information on badge usage * soften table guidelines * soften guideline on badges taking up space --------- Co-authored-by: Brandon Morelli <[email protected]> Co-authored-by: florent-leborgne <[email protected]> Co-authored-by: Liam Thompson <[email protected]> Co-authored-by: shainaraskas <[email protected]>
1 parent 99f92e5 commit b767a42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1297
-726
lines changed

docs/_docset.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ toc:
3636
- file: on-the-web.md
3737
- file: move.md
3838
- file: redirects.md
39-
- file: cumulative-docs.md
39+
- folder: cumulative-docs
40+
children:
41+
- file: index.md
42+
- file: guidelines.md
43+
- file: badge-placement.md
44+
- file: example-scenarios.md
45+
- file: reference.md
4046
- file: branching-strategy.md
4147
- file: add-repo.md
4248
- file: release-new-version.md
@@ -112,10 +118,6 @@ toc:
112118
- file: tabs.md
113119
- file: tagged_regions.md
114120
- file: titles.md
115-
- folder: versions
116-
children:
117-
- file: index.md
118-
- file: content-patterns.md
119121
# nested TOCs are only allowed from docset.yml by default
120122
# to prevent them from being nested deeply arbitrarily
121123
# use max_toc_depth to allow deeper nesting (Expert mode, consult with docs team)
@@ -146,7 +148,7 @@ toc:
146148
- folder: deeply-nested
147149
children:
148150
- file: index.md
149-
- file: foo.md
151+
- file: foo.md
150152
- file: bar.md
151153
- folder: baz
152154
children:

docs/_redirects.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@ redirects:
2121
"yy": "bb"
2222
'testing/redirects/third-page.md':
2323
anchors:
24-
'removed-anchor':
24+
'removed-anchor':
25+
# Related to https://github.com/elastic/docs-builder/pull/1614
26+
'docs/contribute/cumulative-docs.md': 'contribute/cumulative-docs/index.md'
27+
'docs/versions/content-patterns.md': 'contribute/cumulative-docs/example-scenarios.md'
28+
'docs/versions/index.md': 'contribute/cumulative-docs/index.md'
29+
# I shouldn't need to do this should I?
30+
'docs/versions/_snippets/content-patterns-list.md': 'contribute/cumulative-docs/index.md'

docs/_snippets/applies_to-key.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
`applies_to` accepts the following keys in this structure:
2+
3+
* `serverless`: Applies to [Elastic Cloud Serverless](https://www.elastic.co/docs/deploy-manage/deploy/elastic-cloud/serverless).
4+
* `security`: Applies to Serverless [security projects](https://www.elastic.co/docs/solutions/security/get-started/create-security-project).
5+
* `elasticsearch`: Applies to Serverless [search projects](https://www.elastic.co/docs/solutions/search/serverless-elasticsearch-get-started).
6+
* `observability`: Applies to Serverless [observability projects](https://www.elastic.co/docs/solutions/observability/get-started).
7+
* `stack`: Applies to the [Elastic Stack](https://www.elastic.co/docs/get-started/the-stack) including any Elastic Stack components.
8+
* `deployment`: Applies to some deployment type(s).
9+
* `ece`: Applies to [Elastic Cloud Enterprise](https://www.elastic.co/docs/deploy-manage/deploy/cloud-enterprise) deployments.
10+
* `eck`: Applies to [Elastic Cloud on Kubernetes](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s) deployments.
11+
* `self`: Applies to [self-managed](https://www.elastic.co/docs/deploy-manage/deploy/self-managed) deployments.
12+
* `ess`: Applies to [Elastic Cloud Hosted](https://www.elastic.co/docs/deploy-manage/deploy/elastic-cloud/cloud-hosted) deployments.
13+
* `product`: Applies to a specific product that uses a unique versioning scheme (e.g. not `stack`, `ece`, `eck`).
14+
* `apm_agent_dotnet`: Applies to the [Elastic APM .NET agent](https://www.elastic.co/docs/reference/apm/agents/dotnet).
15+
* `apm_agent_go`: Applies to the [Elastic APM Go agent](https://www.elastic.co/docs/reference/apm/agents/go).
16+
* `apm_agent_java`: Applies to the [Elastic APM Java agent](https://www.elastic.co/docs/reference/apm/agents/java).
17+
* `apm_agent_node`: Applies to the [Elastic APM Node.js agent](https://www.elastic.co/docs/reference/apm/agents/nodejs).
18+
* `apm_agent_php`: Applies to the [Elastic APM PHP agent](https://www.elastic.co/docs/reference/apm/agents/php).
19+
* `apm_agent_python`: Applies to the [Elastic APM Python agent](https://www.elastic.co/docs/reference/apm/agents/python).
20+
* `apm_agent_ruby`: Applies to the [Elastic APM Ruby agent](https://www.elastic.co/docs/reference/apm/agents/ruby).
21+
* `apm_agent_rum`: Applies to the [APM RUM JavaScript agent](https://www.elastic.co/docs/reference/apm/agents/rum-js).
22+
* `curator`: Applies to [Elasticsearch Curator](https://www.elastic.co/docs/reference/elasticsearch/curator) (Curator).
23+
* `ecctl`: Applies to [Elastic cloud control](https://www.elastic.co/docs/reference/ecctl) (ECCTL).
24+
* `edot_android`: Applies to the [Elastic Distribution of OpenTelemetry Android](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android/) (EDOT Android).
25+
* `edot_cf_aws`: Applies to the [Elastic Distribution of OpenTelemetry Cloud Forwarder](https://www.elastic.co/docs/reference/opentelemetry/edot-cloud-forwarder/) (EDOT Cloud Forwarder).
26+
* `edot_collector`: Applies to the [Elastic Distribution of OpenTelemetry Collector](https://www.elastic.co/docs/reference/opentelemetry/edot-collector/) (EDOT Collector).
27+
* `edot_dotnet`: Applies to the [Elastic Distribution of OpenTelemetry .NET](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/dotnet/) (EDOT .NET).
28+
* `edot_ios`: Applies to the [Elastic Distribution of OpenTelemetry iOS](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/ios/) (EDOT iOS).
29+
* `edot_java`: Applies to the [Elastic Distribution of OpenTelemetry Java](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/) (EDOT Java).
30+
* `edot_node`: Applies to the [Elastic Distribution of OpenTelemetry Node.js](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/nodejs/) (EDOT Node.js).
31+
* `edot_php`: Applies to the [Elastic Distribution of OpenTelemetry PHP](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/php/) (EDOT PHP).
32+
* `edot_python`: Applies to the [Elastic Distribution of OpenTelemetry Python](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/python/) (EDOT Python).
33+
34+
:::{note}
35+
The `products` key and its subkeys are used to indicate feature availability and applicability. The similarly named [`products` frontmatter field](/syntax/frontmatter.md#products) is used to drive elastic.co search filters.
36+
:::
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
`applies_to` accepts the following lifecycle states:
2+
3+
* `preview`
4+
* `beta`
5+
* `ga`
6+
* `deprecated`
7+
* `removed`
8+
* `unavailable`

docs/_snippets/applies_to-version.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
`applies_to` accepts the following version formats:
2+
3+
* `Major.Minor`
4+
* `Major.Minor.Patch`
5+
6+
:::{note}
7+
Regardless of the version format used in the source file,
8+
the version number will always be rendered in the `Major.Minor.Patch` format.
9+
:::

docs/configure/site/versions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Versions set in this file are surfaced to the user via `applies_to` tags.
1616
:::{include} /contribute/_snippets/tag-processing.md
1717
:::
1818

19-
See [](../../contribute/cumulative-docs.md) for more information.
19+
See [](/contribute/cumulative-docs/index.md) for more information.

docs/contribute/_snippets/docs-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ elastic.co/docs uses our new build system, also known as "Docs V3", which uses a
22

33
Docs for {{stack}} 9.x, {{ece}} 4.x, and {{eck}} 3.x can all be found on this site. All unversioned products, such as {{ech}} and {{serverless-full}}, are also documented on elastic.co/docs.
44

5-
This documentation is **cumulative**. This means that a new set of docs is not published for every minor release. Instead, each page stays valid over time and incorporates version-specific changes directly within the content. [Learn how to write cumulative documentation](/contribute/cumulative-docs.md).
5+
This documentation is **cumulative**. This means that a new set of docs is not published for every minor release. Instead, each page stays valid over time and incorporates version-specific changes directly within the content. [Learn how to write cumulative documentation](/contribute/cumulative-docs/index.md).

docs/contribute/add-repo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The new docs repository needs to satisfy these requirements:
1717

1818
Follow these instructions to add a new repository to the docs.
1919

20-
:::::{stepper}
20+
:::::{stepper}
2121

2222
::::{step} Add the repo to docs-infra
2323

@@ -55,7 +55,7 @@ references:
5555
```
5656

5757
:::{tip}
58-
In this file, you can optionally specify custom branches to deploy docs from, depending on your preferred [branching strategy](branching-strategy.md). You might want to change your branching strategy so you can have more control over when content added for a specific release is published.
58+
In this file, you can optionally specify custom branches to deploy docs from, depending on your preferred [branching strategy](/contribute/branching-strategy.md). You might want to change your branching strategy so you can have more control over when content added for a specific release is published.
5959
:::
6060

6161
Then, edit the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file to add the repository to the navigation. Refer to [navigation.yml](../configure/site/navigation.md) for more information.
@@ -98,5 +98,5 @@ For example, to add version 13.5 of yadda-docs:
9898
For a more comfortable local `docs-builder` experience, add the following line to the `.gitignore` file of the repo:
9999

100100
```
101-
docs/.artifacts
101+
docs/.artifacts
102102
```

0 commit comments

Comments
 (0)