Skip to content

Add best practices for applies_to #1614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
279c443
initial outline
colleenmcginnis Jul 25, 2025
c3a53ce
fix links
colleenmcginnis Jul 25, 2025
c4f8eee
reorg
colleenmcginnis Jul 28, 2025
fd98d12
continue building out content
colleenmcginnis Jul 30, 2025
762be53
apply suggestions from code review
colleenmcginnis Aug 4, 2025
a32103b
Merge branch 'main' into applies_to-examples
colleenmcginnis Aug 6, 2025
9aa5287
Merge branch 'applies_to-examples' of github.com:elastic/docs-builder…
colleenmcginnis Aug 6, 2025
1f68530
address some feedback from @bmorelli's first round of review
colleenmcginnis Aug 6, 2025
ac54f24
fix link
colleenmcginnis Aug 6, 2025
dd02c04
reorg
colleenmcginnis Aug 8, 2025
66076ea
deduplicate
colleenmcginnis Aug 8, 2025
a673f32
finish building out badge placement page
colleenmcginnis Aug 8, 2025
abd55c8
clean up guidelines and examples
colleenmcginnis Aug 8, 2025
a534976
clarify
colleenmcginnis Aug 8, 2025
8e3878a
add more examples
colleenmcginnis Aug 11, 2025
e76e93b
add more examples
colleenmcginnis Aug 11, 2025
e4ba4ca
Merge branch 'main' into applies_to-examples
colleenmcginnis Aug 11, 2025
3560d44
add redirects
colleenmcginnis Aug 11, 2025
792b2ea
apply suggestions from code review
colleenmcginnis Aug 12, 2025
272fa91
clarify title
colleenmcginnis Aug 12, 2025
8a4f298
address badge placement feedback
colleenmcginnis Aug 12, 2025
2d32227
address some feedback on examples
colleenmcginnis Aug 12, 2025
8fd042d
remove branching strategy ref
colleenmcginnis Aug 13, 2025
4baa958
shain-ify the guidelines page
colleenmcginnis Aug 13, 2025
6b1632e
shain-ify the reference page
colleenmcginnis Aug 13, 2025
24071ba
shain-ify badge placement page
colleenmcginnis Aug 13, 2025
3219e3c
remove redirect
colleenmcginnis Aug 13, 2025
b3e56b4
try a different redirect
colleenmcginnis Aug 13, 2025
8795f4b
Update docs/contribute/cumulative-docs/guidelines.md
colleenmcginnis Aug 14, 2025
fb98c60
revert changes to docs/syntax/_snippets/page-level-applies-examples.md
colleenmcginnis Aug 14, 2025
a6b9310
clean up general guidelines section
colleenmcginnis Aug 14, 2025
a2c5e6e
clean up section on removed features
colleenmcginnis Aug 14, 2025
4a79db5
add information on badge usage
colleenmcginnis Aug 14, 2025
7381dd1
soften table guidelines
colleenmcginnis Aug 14, 2025
8494217
soften guideline on badges taking up space
colleenmcginnis Aug 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/_docset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ toc:
- file: on-the-web.md
- file: move.md
- file: redirects.md
- file: cumulative-docs.md
- folder: cumulative-docs
children:
- file: index.md
- file: guidelines.md
- file: badge-placement.md
- file: example-scenarios.md
- file: reference.md
- file: branching-strategy.md
- file: add-repo.md
- file: release-new-version.md
Expand Down Expand Up @@ -112,10 +118,6 @@ toc:
- file: tabs.md
- file: tagged_regions.md
- file: titles.md
- folder: versions
children:
- file: index.md
- file: content-patterns.md
# nested TOCs are only allowed from docset.yml by default
# to prevent them from being nested deeply arbitrarily
# use max_toc_depth to allow deeper nesting (Expert mode, consult with docs team)
Expand Down Expand Up @@ -146,7 +148,7 @@ toc:
- folder: deeply-nested
children:
- file: index.md
- file: foo.md
- file: foo.md
- file: bar.md
- folder: baz
children:
Expand Down
8 changes: 7 additions & 1 deletion docs/_redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ redirects:
"yy": "bb"
'testing/redirects/third-page.md':
anchors:
'removed-anchor':
'removed-anchor':
# Related to https://github.com/elastic/docs-builder/pull/1614
'docs/contribute/cumulative-docs.md': 'contribute/cumulative-docs/index.md'
'docs/versions/content-patterns.md': 'contribute/cumulative-docs/example-scenarios.md'
'docs/versions/index.md': 'contribute/cumulative-docs/index.md'
# I shouldn't need to do this should I?
'docs/versions/_snippets/content-patterns-list.md': 'contribute/cumulative-docs/index.md'
36 changes: 36 additions & 0 deletions docs/_snippets/applies_to-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
`applies_to` accepts the following keys in this structure:

* `serverless`: Applies to [Elastic Cloud Serverless](https://www.elastic.co/docs/deploy-manage/deploy/elastic-cloud/serverless).
* `security`: Applies to Serverless [security projects](https://www.elastic.co/docs/solutions/security/get-started/create-security-project).
* `elasticsearch`: Applies to Serverless [search projects](https://www.elastic.co/docs/solutions/search/serverless-elasticsearch-get-started).
* `observability`: Applies to Serverless [observability projects](https://www.elastic.co/docs/solutions/observability/get-started).
* `stack`: Applies to the [Elastic Stack](https://www.elastic.co/docs/get-started/the-stack) including any Elastic Stack components.
* `deployment`: Applies to some deployment type(s).
* `ece`: Applies to [Elastic Cloud Enterprise](https://www.elastic.co/docs/deploy-manage/deploy/cloud-enterprise) deployments.
* `eck`: Applies to [Elastic Cloud on Kubernetes](https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s) deployments.
* `self`: Applies to [self-managed](https://www.elastic.co/docs/deploy-manage/deploy/self-managed) deployments.
* `ess`: Applies to [Elastic Cloud Hosted](https://www.elastic.co/docs/deploy-manage/deploy/elastic-cloud/cloud-hosted) deployments.
* `product`: Applies to a specific product that uses a unique versioning scheme (e.g. not `stack`, `ece`, `eck`).
* `apm_agent_dotnet`: Applies to the [Elastic APM .NET agent](https://www.elastic.co/docs/reference/apm/agents/dotnet).
* `apm_agent_go`: Applies to the [Elastic APM Go agent](https://www.elastic.co/docs/reference/apm/agents/go).
* `apm_agent_java`: Applies to the [Elastic APM Java agent](https://www.elastic.co/docs/reference/apm/agents/java).
* `apm_agent_node`: Applies to the [Elastic APM Node.js agent](https://www.elastic.co/docs/reference/apm/agents/nodejs).
* `apm_agent_php`: Applies to the [Elastic APM PHP agent](https://www.elastic.co/docs/reference/apm/agents/php).
* `apm_agent_python`: Applies to the [Elastic APM Python agent](https://www.elastic.co/docs/reference/apm/agents/python).
* `apm_agent_ruby`: Applies to the [Elastic APM Ruby agent](https://www.elastic.co/docs/reference/apm/agents/ruby).
* `apm_agent_rum`: Applies to the [APM RUM JavaScript agent](https://www.elastic.co/docs/reference/apm/agents/rum-js).
* `curator`: Applies to [Elasticsearch Curator](https://www.elastic.co/docs/reference/elasticsearch/curator) (Curator).
* `ecctl`: Applies to [Elastic cloud control](https://www.elastic.co/docs/reference/ecctl) (ECCTL).
* `edot_android`: Applies to the [Elastic Distribution of OpenTelemetry Android](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android/) (EDOT Android).
* `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).
* `edot_collector`: Applies to the [Elastic Distribution of OpenTelemetry Collector](https://www.elastic.co/docs/reference/opentelemetry/edot-collector/) (EDOT Collector).
* `edot_dotnet`: Applies to the [Elastic Distribution of OpenTelemetry .NET](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/dotnet/) (EDOT .NET).
* `edot_ios`: Applies to the [Elastic Distribution of OpenTelemetry iOS](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/ios/) (EDOT iOS).
* `edot_java`: Applies to the [Elastic Distribution of OpenTelemetry Java](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/java/) (EDOT Java).
* `edot_node`: Applies to the [Elastic Distribution of OpenTelemetry Node.js](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/nodejs/) (EDOT Node.js).
* `edot_php`: Applies to the [Elastic Distribution of OpenTelemetry PHP](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/php/) (EDOT PHP).
* `edot_python`: Applies to the [Elastic Distribution of OpenTelemetry Python](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/python/) (EDOT Python).

:::{note}
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.
:::
8 changes: 8 additions & 0 deletions docs/_snippets/applies_to-lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
`applies_to` accepts the following lifecycle states:

* `preview`
* `beta`
* `ga`
* `deprecated`
* `removed`
* `unavailable`
9 changes: 9 additions & 0 deletions docs/_snippets/applies_to-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
`applies_to` accepts the following version formats:

* `Major.Minor`
* `Major.Minor.Patch`

:::{note}
Regardless of the version format used in the source file,
the version number will always be rendered in the `Major.Minor.Patch` format.
:::
2 changes: 1 addition & 1 deletion docs/configure/site/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Versions set in this file are surfaced to the user via `applies_to` tags.
:::{include} /contribute/_snippets/tag-processing.md
:::

See [](../../contribute/cumulative-docs.md) for more information.
See [](/contribute/cumulative-docs/index.md) for more information.
2 changes: 1 addition & 1 deletion docs/contribute/_snippets/docs-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ elastic.co/docs uses our new build system, also known as "Docs V3", which uses a

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.

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).
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).
6 changes: 3 additions & 3 deletions docs/contribute/add-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The new docs repository needs to satisfy these requirements:

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

:::::{stepper}
:::::{stepper}

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

Expand Down Expand Up @@ -55,7 +55,7 @@ references:
```

:::{tip}
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.
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.
:::

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.
Expand Down Expand Up @@ -98,5 +98,5 @@ For example, to add version 13.5 of yadda-docs:
For a more comfortable local `docs-builder` experience, add the following line to the `.gitignore` file of the repo:

```
docs/.artifacts
docs/.artifacts
```
Loading
Loading