Skip to content

Commit 10374c2

Browse files
authored
Merge branch 'main' into georgewallace-patch-8
2 parents 0c195c1 + 50624e6 commit 10374c2

File tree

402 files changed

+5611
-2211
lines changed

Some content is hidden

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

402 files changed

+5611
-2211
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
Thank you for contributing to the Elastic Docs! 🎉
3+
Use this template to help us efficiently review your contribution.
4+
-->
5+
6+
## Summary
7+
<!--
8+
Describe what your PR changes or improves.
9+
If your PR fixes an issue, link it here. If your PR does not fix an issue, describe the reason you are making the change.
10+
-->
11+
12+
## Generative AI disclosure
13+
<!--
14+
To help us ensure compliance with the Elastic open source and documentation guidelines, please answer the following:
15+
-->
16+
1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
17+
- [ ] Yes
18+
- [ ] No
19+
<!--
20+
2. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).
21+
22+
Tool(s) and model(s) used:
23+
-->
24+

.github/workflows/vale-linting.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Vale Documentation Linting
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.md'
7+
- '**.adoc'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
vale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Run Vale Linter
22+
uses: elastic/vale-rules/lint@main
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Vale Report
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Vale Documentation Linting"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
pull-requests: read
11+
12+
jobs:
13+
report:
14+
runs-on: ubuntu-latest
15+
if: github.event.workflow_run.event == 'pull_request'
16+
permissions:
17+
pull-requests: write
18+
19+
steps:
20+
- name: Post Vale Results
21+
uses: elastic/vale-rules/report@main
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ AGENTS.md
1212
.github/instructions/**.instructions.md
1313
CLAUDE.md
1414
GEMINI.md
15-
.cursor
15+
.cursor
16+
17+
# VS code settings
18+
.vscode

contribute-docs/_snippets/applies_to-key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
`applies_to` accepts the following keys in this structure.
22

33
* `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).
4+
* `security`: Applies to Serverless [security projects](https://www.elastic.co/docs/solutions/security/get-started#create-sec-serverless-project).
55
* `elasticsearch`: Applies to Serverless [search projects](https://www.elastic.co/docs/solutions/search/serverless-elasticsearch-get-started).
66
* `observability`: Applies to Serverless [observability projects](https://www.elastic.co/docs/solutions/observability/get-started).
77
* `stack`: Applies to the [Elastic Stack](https://www.elastic.co/docs/get-started/the-stack) including any Elastic Stack components.

contribute-docs/api-docs/kibana-api-docs-quickstart.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ responses:
202202
:sync: code-generated
203203
204204
:::{note}
205-
**This step is optional.** CI will automatically capture the snapshot when you push your `.ts` changes. Running this locally is useful for validating changes before pushing or debugging issues. See [`capture_oas_snapshot.sh`](https://github.com/elastic/kibana/blob/main/.buildkite/scripts/steps/checks/capture_oas_snapshot.sh) for the full list of paths captured in CI.
205+
**This step is optional.** CI will automatically capture the snapshot when you push your `.ts` changes. Running this locally is useful for validating changes before pushing or debugging issues.
206206
:::
207207
208208
This step captures the OpenAPI specification that {{kib}} generates at runtime from your route definitions. It spins up a local {{es}} and {{kib}} cluster with your code changes. This generates the following output files in the `oas_docs` directory:
@@ -214,13 +214,27 @@ This step captures the OpenAPI specification that {{kib}} generates at runtime f
214214
- [Docker](https://docs.docker.com/get-docker/) must be running
215215
- If you're an Elastician, ensure you're logged into Docker with your Elastic account
216216
217-
**Capture all API paths** (recommended):
217+
To capture all the documented API paths, copy the command from [`capture_oas_snapshot.sh`](https://github.com/elastic/kibana/blob/main/.buildkite/scripts/steps/checks/capture_oas_snapshot.sh). For example:
218218
219219
```bash
220-
node scripts/capture_oas_snapshot --update
220+
node scripts/capture_oas_snapshot \
221+
--include-path /api/status \
222+
--include-path /api/alerting/rule/ \
223+
--include-path /api/alerting/rules \
224+
--include-path /api/actions \
225+
--include-path /api/security/role \
226+
--include-path /api/spaces \
227+
--include-path /api/streams \
228+
--include-path /api/fleet \
229+
--include-path /api/saved_objects/_import \
230+
--include-path /api/saved_objects/_export \
231+
--include-path /api/maintenance_window \
232+
--include-path /api/agent_builder
233+
--update
221234
```
222235
223-
**For faster iteration**, capture the specific paths you're working on:
236+
For faster iteration, you can capture the specific paths you're working on, though this minimized output should not be included in your pull request.
237+
For example:
224238

225239
```bash
226240
node scripts/capture_oas_snapshot --update --include-path /api/your/specific/path

contribute-docs/on-the-web.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Learn how to make documentation updates directly in your browser without setting up a local development environment.
44

55
:::{tip}
6-
If you're working in [GitHub Codespaces](https://github.com/features/codespaces) or [github.dev](https://github.dev), you can install the [VS Code extension](tools.md#vs-code-extension) to simplify the authoring experience.
6+
If you're working in [GitHub Codespaces](https://github.com/features/codespaces) or [github.dev](https://github.dev), you can install the [Elastic Docs Utilities extension](vscode-extension.md) to simplify the authoring experience.
77
:::
88

99
## Suggesting quick edits

contribute-docs/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ toc:
1414
- file: example-scenarios.md
1515
- file: reference.md
1616
- file: tools.md
17+
children:
18+
- file: vscode-extension.md
19+
- file: vale-linter.md
1720
- folder: api-docs
1821
children:
1922
- file: index.md

contribute-docs/tools.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,10 @@ navigation_title: Tools
66

77
These tools help you write documentation more efficiently, reduce context-switching, and catch errors before you commit.
88

9-
## VS Code extension
9+
## Elastic Docs Utilities extension
1010

11-
The [Elastic Docs Utilities extension](https://marketplace.visualstudio.com/items?itemName=Elastic.elastic-docs-v3-utilities) simplifies authoring with autocompletion, catches syntax errors with real-time validation, and enables you to preview variables inline.
11+
The [Elastic Docs Utilities extension](vscode-extension.md) for Visual Studio Code and compatible IDEs provides autocompletion for directives, frontmatter, and inline roles, along with real-time validation and variable previews. It works in the Visual Studio Code desktop application and browser-based editors.
1212

13-
:::{image} images/elastic-docs-vscode.gif
14-
:screenshot:
15-
:alt: Elastic Docs VS Code extension demo
16-
:width: 800px
17-
:::
13+
## Vale linter
1814

19-
### Availability
20-
21-
The extension is available in VS Code whether you're:
22-
23-
- Working [locally](locally.md) in the VS Code desktop application
24-
- Working [in the browser](on-the-web.md) in VS Code web editors ([GitHub Codespaces](https://github.com/features/codespaces), [github.dev](https://github.dev))
25-
26-
### Key capabilities
27-
28-
- Autocompletion for directives, frontmatter, and inline roles
29-
- Real-time validation of syntax and structure
30-
- Variable previews and substitution support
31-
32-
### Installation
33-
34-
You can install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Elastic.elastic-docs-v3-utilities).
35-
36-
% TODO: Add Vale and LLM sections when ready.
15+
The [Vale ruleset](vale-linter.md) allows the Vale linter to check your documentation against Elastic style guide rules. It integrates with your editor and CI/CD pipeline to catch style issues before they reach production.

contribute-docs/vale-linter.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
---
2+
navigation_title: Vale linter
3+
---
4+
5+
# Elastic style guide for Vale
6+
7+
[Vale](https://github.com/errata-ai/vale) is an open source prose linter that checks the content of documents in several formats against style guide rules. The goal of a prose linter is automating style guide checks in docs-as-code environments, so that style issues are detected before deploy or while editing documentation in a code editor.
8+
9+
The Elastic Vale package contains a set of linting rules based on the Elastic style guide and recommendations.
10+
11+
## Get started
12+
13+
Run these commands to install the Elastic style guide locally:
14+
15+
::::{tab-set}
16+
17+
:::{tab-item} macOS
18+
19+
```bash
20+
curl -fsSL https://raw.githubusercontent.com/elastic/vale-rules/main/install-macos.sh | bash
21+
```
22+
23+
:::
24+
25+
:::{tab-item} Linux
26+
27+
```bash
28+
curl -fsSL https://raw.githubusercontent.com/elastic/vale-rules/main/install-linux.sh | bash
29+
```
30+
31+
:::
32+
33+
:::{tab-item} Windows
34+
35+
```powershell
36+
Invoke-WebRequest -Uri https://raw.githubusercontent.com/elastic/vale-rules/main/install-windows.ps1 -OutFile install-windows.ps1
37+
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1
38+
```
39+
40+
:::
41+
::::
42+
43+
:::{warning}
44+
The installation script might overwrite your existing global Vale configuration. Install the style manually if you're using styles other than Elastic.
45+
:::
46+
47+
### Install the Visual Studio Code extension
48+
49+
Install the [Vale VSCode](https://marketplace.visualstudio.com/items?itemName=ChrisChinchilla.vale-vscode) extension to view Vale checks when saving a document. The extension is also available for other editors that support the Open VSX Registry.
50+
51+
## Add the Vale action to your repo
52+
53+
Add the Elastic Vale linter to your repository's CI/CD pipeline using a two-workflow setup that supports fork PRs:
54+
55+
```yaml
56+
# .github/workflows/vale-lint.yml
57+
name: Vale Documentation Linting
58+
59+
on:
60+
pull_request:
61+
paths:
62+
- '**.md'
63+
- '**.adoc'
64+
65+
permissions:
66+
contents: read
67+
68+
jobs:
69+
vale:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v5
74+
with:
75+
fetch-depth: 0
76+
77+
- name: Run Vale Linter
78+
uses: elastic/vale-rules/lint@main
79+
```
80+
81+
```yaml
82+
# .github/workflows/vale-report.yml
83+
name: Vale Report
84+
85+
on:
86+
workflow_run:
87+
workflows: ["Vale Documentation Linting"]
88+
types:
89+
- completed
90+
91+
permissions:
92+
pull-requests: read
93+
94+
jobs:
95+
report:
96+
runs-on: ubuntu-latest
97+
if: github.event.workflow_run.event == 'pull_request'
98+
permissions:
99+
pull-requests: write
100+
101+
steps:
102+
- name: Post Vale Results
103+
uses: elastic/vale-rules/report@main
104+
with:
105+
github_token: ${{ secrets.GITHUB_TOKEN }}
106+
```
107+
108+
For detailed documentation and examples, refer to [ACTION_USAGE.md](https://github.com/elastic/vale-rules/blob/main/ACTION_USAGE.md).
109+
110+
## Exclude content from linting
111+
112+
You can use HTML comments in your Markdown files to control Vale's behavior for specific sections of content. This is useful when you need to temporarily turn off checks or exclude certain content from linting.
113+
114+
### Turn off all Vale checks
115+
116+
To exclude a section of content from linting, wrap it with `vale off` and `vale on` comments:
117+
118+
```markdown
119+
<!-- vale off -->
120+
121+
This entire section will be ignored by Vale.
122+
123+
<!-- vale on -->
124+
```
125+
126+
### Turn off a specific rule
127+
128+
To turn off a specific Elastic style rule for a section, use the rule name with `= NO` and `= YES` to turn it back on:
129+
130+
```markdown
131+
<!-- vale Elastic.RuleName = NO -->
132+
133+
This content will ignore only the specified rule.
134+
135+
<!-- vale Elastic.RuleName = YES -->
136+
```
137+
138+
For example, to turn off the `Elastic.WordChoice` rule:
139+
140+
```markdown
141+
<!-- vale Elastic.WordChoice = NO -->
142+
143+
This section can contain mispellings without triggering warnings.
144+
145+
<!-- vale Elastic.WordChoice = YES -->
146+
```
147+
148+
:::{tip}
149+
You can find the exact rule names in the [Elastic Vale rules repository](https://github.com/elastic/vale-rules/tree/main/styles/Elastic). Each rule is defined in a separate `.yml` file, and the filename (without the extension) is the rule name you use in comments.
150+
:::
151+
152+
For more information about comment-based configuration, refer to the [Vale Markdown documentation](https://vale.sh/docs/formats/markdown#comments).
153+
154+
## Update the style guide
155+
156+
To update the Elastic style guide to the latest rules, rerun the installation script.
157+
158+
## Resources
159+
160+
- [Vale's official documentation](https://vale.sh/docs/vale-cli/overview/)
161+
- [Elastic Vale rules repository](https://github.com/elastic/vale-rules)
162+

0 commit comments

Comments
 (0)