Skip to content

Commit 925de8d

Browse files
Merge branch 'main' into cmcg-ecs
2 parents 99466be + 8eb4417 commit 925de8d

File tree

31 files changed

+1143
-198
lines changed

31 files changed

+1143
-198
lines changed

config/versions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
versioning_systems:
22
stack: &stack
33
base: 9.0
4-
current: 9.0
4+
current: 9.0.4
55

66
# Using an unlikely high version
77
# So that our logic that would display "planned" doesn't trigger
@@ -16,7 +16,7 @@ versioning_systems:
1616
ech: *all
1717
eck:
1818
base: 3.0
19-
current: 3.2
19+
current: 3.0
2020
ess: *all
2121
self: *stack
2222

@@ -91,4 +91,4 @@ versioning_systems:
9191
edot_cf_aws:
9292
base: 0.1
9393
current: 0.1.6
94-
94+

docs/_docset.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ toc:
8686
- file: code.md
8787
- file: comments.md
8888
- file: conditionals.md
89+
- hidden: diagrams.md
8990
- file: dropdowns.md
9091
- file: definition-lists.md
9192
- file: example_blocks.md
@@ -124,6 +125,10 @@ toc:
124125
- file: custom-highlighters.md
125126
- hidden: archive.md
126127
- hidden: landing-page.md
128+
- file: nest-under-index/index.md
129+
children:
130+
- file: nest-under-index/nested-page-1.md
131+
- file: nest-under-index/nested-page-2.md
127132
- folder: mover
128133
children:
129134
- file: first-page.md

docs/syntax/diagrams.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Diagrams
2+
3+
The `diagram` directive allows you to render various types of diagrams using the [Kroki](https://kroki.io/) service. Kroki supports many diagram types including Mermaid, D2, Graphviz, PlantUML, and more.
4+
5+
## Basic usage
6+
7+
The basic syntax for the diagram directive is:
8+
9+
```markdown
10+
::::{diagram} [diagram-type]
11+
<diagram content>
12+
::::
13+
```
14+
15+
If no diagram type is specified, it defaults to `mermaid`.
16+
17+
## Supported diagram types
18+
19+
The diagram directive supports the following diagram types:
20+
21+
- `mermaid` - Mermaid diagrams (default)
22+
- `d2` - D2 diagrams
23+
- `graphviz` - Graphviz/DOT diagrams
24+
- `plantuml` - PlantUML diagrams
25+
- `ditaa` - Ditaa diagrams
26+
- `erd` - Entity Relationship diagrams
27+
- `excalidraw` - Excalidraw diagrams
28+
- `nomnoml` - Nomnoml diagrams
29+
- `pikchr` - Pikchr diagrams
30+
- `structurizr` - Structurizr diagrams
31+
- `svgbob` - Svgbob diagrams
32+
- `vega` - Vega diagrams
33+
- `vegalite` - Vega-Lite diagrams
34+
- `wavedrom` - WaveDrom diagrams
35+
36+
## Examples
37+
38+
### Mermaid flowchart (default)
39+
40+
::::::{tab-set}
41+
42+
:::::{tab-item} Source
43+
```markdown
44+
::::{diagram}
45+
flowchart LR
46+
A[Start] --> B{Decision}
47+
B -->|Yes| C[Action 1]
48+
B -->|No| D[Action 2]
49+
C --> E[End]
50+
D --> E
51+
::::
52+
```
53+
:::::
54+
55+
:::::{tab-item} Rendered
56+
::::{diagram}
57+
flowchart LR
58+
A[Start] --> B{Decision}
59+
B -->|Yes| C[Action 1]
60+
B -->|No| D[Action 2]
61+
C --> E[End]
62+
D --> E
63+
::::
64+
:::::
65+
66+
::::::
67+
68+
### Mermaid sequence diagram
69+
70+
::::::{tab-set}
71+
72+
:::::{tab-item} Source
73+
```markdown
74+
::::{diagram} mermaid
75+
sequenceDiagram
76+
participant A as Alice
77+
participant B as Bob
78+
A->>B: Hello Bob, how are you?
79+
B-->>A: Great!
80+
::::
81+
```
82+
:::::
83+
84+
:::::{tab-item} Rendered
85+
::::{diagram} mermaid
86+
sequenceDiagram
87+
participant A as Alice
88+
participant B as Bob
89+
A->>B: Hello Bob, how are you?
90+
B-->>A: Great!
91+
::::
92+
:::::
93+
94+
::::::
95+
96+
### D2 diagram
97+
98+
::::::{tab-set}
99+
100+
:::::{tab-item} Source
101+
```markdown
102+
::::{diagram} d2
103+
x -> y: hello world
104+
y -> z: nice to meet you
105+
::::
106+
```
107+
:::::
108+
109+
:::::{tab-item} Rendered
110+
::::{diagram} d2
111+
x -> y: hello world
112+
y -> z: nice to meet you
113+
::::
114+
:::::
115+
116+
::::::
117+
118+
### Graphviz diagram
119+
120+
::::::{tab-set}
121+
122+
:::::{tab-item} Source
123+
```markdown
124+
::::{diagram} graphviz
125+
digraph G {
126+
rankdir=LR;
127+
A -> B -> C;
128+
A -> C;
129+
}
130+
::::
131+
```
132+
:::::
133+
134+
:::::{tab-item} Rendered
135+
::::{diagram} graphviz
136+
digraph G {
137+
rankdir=LR;
138+
A -> B -> C;
139+
A -> C;
140+
}
141+
::::
142+
:::::
143+
144+
::::::
145+
146+
## Error handling
147+
148+
If the diagram content is empty or the encoding fails, an error message will be displayed instead of the diagram.

docs/syntax/stepper.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Stepper
22

3-
Steppers provide a visual representation of sequential steps, commonly used in tutorials or guides
4-
to break down processes into manageable stages.
3+
Steppers provide a visual representation of sequential steps, commonly used in tutorials or guides to break down processes into manageable stages. For example, you can usee steppers instead of numbered
4+
section headings when documenting a supertask or a complex procedure. An example is the [Observability Get Started](https://www.elastic.co/docs/solutions/observability/get-started).
55

6-
By default every step title is a link with a generated anchor.
7-
But you can override the default anchor by adding the `:anchor:` option to the step.
6+
By default every step title is a link with a generated anchor. You can override the default anchor by adding the `:anchor:` option to the step.
87

98
## Basic stepper
109

docs/syntax/version-variables.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,54 @@ can be printed in any kind of ways.
2626
| `{{version.stack | M+1 | M }}` | {{version.stack | M+1 | M }} |
2727
| `{{version.stack.base | M.M+1 }}` | {{version.stack.base | M.M+1 }} |
2828

29-
## Available versioning schemes.
29+
## Mutation Operators in Links and Code Blocks
30+
31+
Mutation operators also work correctly in links and code blocks, making them versatile for various documentation contexts.
32+
33+
### In Links
34+
35+
Mutation operators can be used in both link URLs and link text:
36+
37+
```markdown subs=false
38+
[Download version {{version.stack | M.M}}](https://download.elastic.co/{{version.stack | M.M}}/elasticsearch.tar.gz)
39+
[Latest major version](https://elastic.co/guide/en/elasticsearch/reference/{{version.stack | M}}/index.html)
40+
```
41+
42+
Which renders as:
43+
44+
[Download version {{version.stack | M.M}}](https://download.elastic.co/{{version.stack | M.M}}/elasticsearch.tar.gz)
45+
[Latest major version](https://elastic.co/guide/en/elasticsearch/reference/{{version.stack | M}}/index.html)
46+
47+
### In Code Blocks
48+
49+
Mutation operators work in enhanced code blocks when `subs=true` is specified:
50+
51+
````markdown subs=false
52+
```bash subs=true
53+
curl -X GET "localhost:9200/_cluster/health?v&pretty"
54+
echo "Elasticsearch {{version.stack | M.M}} is running"
55+
```
56+
````
57+
58+
Which renders as:
59+
60+
```bash subs=true
61+
curl -X GET "localhost:9200/_cluster/health?v&pretty"
62+
echo "Elasticsearch {{version.stack | M.M}} is running"
63+
```
64+
65+
### Whitespace Handling
66+
67+
Mutation operators are robust and handle whitespace around the pipe character correctly:
68+
69+
| Syntax | Result | Notes |
70+
|--------|--------| ----- |
71+
| `{{version.stack|M.M}}` | {{version.stack|M.M}} | No spaces |
72+
| `{{version.stack | M.M}}` | {{version.stack | M.M}} | Spaces around pipe |
73+
| `{{version.stack |M.M}}` | {{version.stack |M.M}} | Space before pipe |
74+
| `{{version.stack| M.M}}` | {{version.stack| M.M}} | Space after pipe |
75+
76+
## Available versioning schemes
3077

3178
This is dictated by the [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml) configuration file
3279

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Test nesting files under index
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Nested Page 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Nested Page 2

0 commit comments

Comments
 (0)