You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contribute/redirects.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,29 @@ For API redirects, consult with the documentation engineering team on Slack (#el
16
16
17
17
For elastic.co/guide redirects, open a [web team request](http://ela.st/web-request).
18
18
19
+
## Add a redirect
20
+
21
+
To successfully implement a redirect:
22
+
23
+
1. Locate and open the `redirects.yml` file to edit.
24
+
- Each docs repository powered by Docs V3 can have its own `redirects.yml` file. You must only edit the one in the repository that you're moving or removing files from.
25
+
- It is at the same location as the `docset.yml` file. Depending on the repository, this is generally at the root or within the `/docs` folder of the repository.
26
+
27
+
:::{note}
28
+
Some repositories might not yet have a `redirects.yml` file. In this case, create one next to the repo's `docset.yml` file. Refer to [](#file-location).
29
+
:::
30
+
31
+
2. Edit the file. Refer to [](#syntax) to get details on the expected syntax.
32
+
- All paths must be relative to the `redirects.yml` file.
33
+
- You may need to adjust the syntax based on how you'd like to treat anchors within redirected files. Find examples in [](#syntax).
34
+
35
+
3. Fix all existing links to the moved or removed file within the repository where you're adding the redirect, by updating them to the new correct target, or by removing them if necessary. This is a best practice to keep our content healthy, and mandatory for your PR to pass CI checks.
36
+
37
+
4. Create a PR with all of the changes made through the previous steps.
38
+
39
+
CI checks run to validate the newly added redirect and the docs build.
40
+
If you get validation errors about the redirect, double check that your changes follow all the steps in this procedure. If the errors persist after a writer reviewed the PR, ask @elastic/docs-engineering for assistance.
41
+
19
42
## Validation
20
43
21
44
Running `docs-builder diff validate` will give you feedback on whether all necessary redirect rules are in place after your changes. It will also run on pull requests.
Copy file name to clipboardExpand all lines: docs/syntax/code.md
+48-4Lines changed: 48 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,10 +267,6 @@ project:
267
267
268
268
### Console code blocks
269
269
270
-
:::{note}
271
-
This feature is still being developed.
272
-
:::
273
-
274
270
We document a lot of API endpoints at Elastic. For these endpoints, we support `console` as a language. The term console relates to the dev console in kibana which users can link to directly from these code snippets.
275
271
276
272
In a console code block, the first line is highlighted as a dev console string and the remainder as json:
@@ -309,6 +305,54 @@ GET /mydocuments/_search
309
305
310
306
::::
311
307
308
+
Console code blocks now support multiple API calls within a single code block. When you have multiple console commands, they are displayed as separate sections within the same block with proper visual separation:
309
+
310
+
::::{tab-set}
311
+
312
+
:::{tab-item} Output
313
+
314
+
```console
315
+
GET /mydocuments/_search
316
+
{
317
+
"from": 1,
318
+
"query": {
319
+
"match_all" {}
320
+
}
321
+
}
322
+
323
+
POST /mydocuments/_doc
324
+
{
325
+
"title": "New Document",
326
+
"content": "This is a sample document"
327
+
}
328
+
```
329
+
330
+
:::
331
+
332
+
:::{tab-item} Markdown
333
+
334
+
````markdown
335
+
```console
336
+
GET /mydocuments/_search
337
+
{
338
+
"from": 1,
339
+
"query": {
340
+
"match_all" {}
341
+
}
342
+
}
343
+
344
+
POST /mydocuments/_doc
345
+
{
346
+
"title": "New Document",
347
+
"content": "This is a sample document"
348
+
}
349
+
```
350
+
````
351
+
352
+
:::
353
+
354
+
::::
355
+
312
356
### Code block substitutions
313
357
314
358
You can use substitutions to insert reusable values into your code block examples.
Copy file name to clipboardExpand all lines: src/Elastic.Markdown/Layout/_LandingPage.cshtml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
For easy reference, changes in 9.1.0 are marked inline. For details, check <ahref="https://www.elastic.co/docs/get-started/versioning-availability"class="link">Understanding versioning and availability.</a></p>
0 commit comments