Skip to content

Commit 8616bf6

Browse files
authored
Merge branch 'main' into fix/image_scope_emit_level
2 parents 85ad051 + a74045c commit 8616bf6

37 files changed

+888
-331
lines changed

.github/workflows/preview-build.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ jobs:
7474
ref: ${{ github.event.pull_request.head.sha || github.ref }}
7575
persist-credentials: false
7676

77-
- name: Free Disk Space
78-
if: contains(fromJSON('["elastic/security-docs"]'), github.repository)
79-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
80-
with:
81-
tool-cache: false
82-
8377
- name: Create Deployment
8478
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) || (steps.check-files.outputs.any_modified == 'true' && startsWith(github.event_name, 'pull_request'))
8579
uses: actions/github-script@v7
@@ -138,7 +132,7 @@ jobs:
138132
139133
- name: Bootstrap Action Workspace
140134
if: github.repository == 'elastic/docs-builder' && steps.deployment.outputs.result
141-
uses: ./.github/actions/bootstrap
135+
uses: elastic/docs-builder/.github/actions/bootstrap@main
142136

143137
# we run our artifact directly please use the prebuild
144138
# elastic/docs-builder@main GitHub Action for all other repositories!

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PackageVersion Include="Amazon.Lambda.RuntimeSupport" Version="1.13.0"/>
1212
<PackageVersion Include="Amazon.Lambda.Core" Version="2.5.1"/>
1313
<PackageVersion Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.4"/>
14-
<PackageVersion Include="AWSSDK.S3" Version="3.7.414.5"/>
14+
<PackageVersion Include="AWSSDK.S3" Version="3.7.416.9"/>
1515
</ItemGroup>
1616

1717
<!-- Build -->
@@ -21,7 +21,7 @@
2121
<PackageVersion Include="Proc.Fs" Version="0.9.1" />
2222
<PackageVersion Include="Fake.Tools.Git" Version="6.1.3" />
2323
<PackageVersion Include="Fake.IO.Zip" Version="6.1.3" />
24-
<PackageVersion Include="FSharp.Core" Version="9.0.201" />
24+
<PackageVersion Include="FSharp.Core" Version="9.0.202" />
2525
</ItemGroup>
2626

2727
<ItemGroup>
@@ -32,8 +32,8 @@
3232
<PackageVersion Include="Errata" Version="0.13.0" />
3333
<PackageVersion Include="Github.Actions.Core" Version="9.0.0"/>
3434
<PackageVersion Include="Markdig" Version="0.40.0" />
35-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.3"/>
36-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.3"/>
35+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.4"/>
36+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.4"/>
3737
<PackageVersion Include="NetEscapades.EnumGenerators" Version="1.0.0-beta12" PrivateAssets="all" ExcludeAssets="runtime" />
3838
<PackageVersion Include="Proc" Version="0.9.1" />
3939
<PackageVersion Include="RazorSlices" Version="0.8.1" />

docs/_docset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ toc:
8989
- file: links.md
9090
- file: passthrough.md
9191
- file: sidebars.md
92+
- file: stepper.md
9293
- file: substitutions.md
9394
- file: sundries.md
9495
- file: tables.md

docs/syntax/stepper.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# Stepper
2+
3+
Steppers provide a visual representation of sequential steps, commonly used in tutorials or guides
4+
to break down processes into manageable stages.
5+
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.
8+
9+
## Basic Stepper
10+
11+
:::::::{tab-set}
12+
::::::{tab-item} Output
13+
:::::{stepper}
14+
15+
:::::{stepper}
16+
17+
::::{step} Install
18+
First install the dependencies.
19+
```shell
20+
npm install
21+
```
22+
::::
23+
24+
::::{step} Build
25+
Then build the project.
26+
```shell
27+
npm run build
28+
```
29+
::::
30+
31+
::::{step} Test
32+
Finally run the tests.
33+
```shell
34+
npm run test
35+
```
36+
::::
37+
38+
::::{step} Done
39+
::::
40+
41+
:::::
42+
43+
:::::
44+
::::::
45+
46+
::::::{tab-item} Markdown
47+
````markdown
48+
:::::{stepper}
49+
50+
::::{step} Install
51+
First install the dependencies.
52+
```shell
53+
npm install
54+
```
55+
::::
56+
57+
::::{step} Build
58+
Then build the project.
59+
```shell
60+
npm run build
61+
```
62+
::::
63+
64+
::::{step} Test
65+
Finally run the tests.
66+
```shell
67+
npm run test
68+
```
69+
::::
70+
71+
::::{step} Done
72+
::::
73+
74+
:::::
75+
````
76+
::::::
77+
78+
:::::::
79+
80+
## Advanced Example
81+
82+
:::::::{tab-set}
83+
84+
::::::{tab-item} Output
85+
86+
:::::{stepper}
87+
88+
::::{step} Create an index
89+
90+
Create a new index named `books`:
91+
92+
```console
93+
PUT /books
94+
```
95+
96+
The following response indicates the index was created successfully.
97+
98+
:::{dropdown} Example response
99+
```console-result
100+
{
101+
"acknowledged": true,
102+
"shards_acknowledged": true,
103+
"index": "books"
104+
}
105+
```
106+
:::
107+
108+
::::
109+
110+
::::{step} Add data to your index
111+
:anchor: add-data
112+
113+
:::{tip}
114+
This tutorial uses Elasticsearch APIs, but there are many other ways to [add data to Elasticsearch](#).
115+
:::
116+
117+
You add data to Elasticsearch as JSON objects called documents. Elasticsearch stores these documents in searchable indices.
118+
::::
119+
120+
::::{step} Define mappings and data types
121+
122+
When using dynamic mapping, Elasticsearch automatically creates mappings for new fields by default.
123+
The documents we’ve added so far have used dynamic mapping, because we didn’t specify a mapping when creating the index.
124+
125+
To see how dynamic mapping works, add a new document to the `books` index with a field that doesn’t appear in the existing documents.
126+
127+
```console
128+
POST /books/_doc
129+
{
130+
"name": "The Great Gatsby",
131+
"author": "F. Scott Fitzgerald",
132+
"release_date": "1925-04-10",
133+
"page_count": 180,
134+
"language": "EN" <1>
135+
}
136+
```
137+
1. The new field.
138+
::::
139+
140+
:::::
141+
142+
::::::
143+
144+
::::::{tab-item} Markdown
145+
146+
````markdown
147+
:::::{stepper}
148+
149+
::::{step} Create an index
150+
151+
Create a new index named `books`:
152+
153+
```console
154+
PUT /books
155+
```
156+
157+
The following response indicates the index was created successfully.
158+
159+
:::{dropdown} Example response
160+
```console-result
161+
{
162+
"acknowledged": true,
163+
"shards_acknowledged": true,
164+
"index": "books"
165+
}
166+
```
167+
:::
168+
169+
::::
170+
171+
::::{step} Add data to your index
172+
:anchor: add-data
173+
174+
:::{tip}
175+
This tutorial uses Elasticsearch APIs, but there are many other ways to [add data to Elasticsearch](#).
176+
:::
177+
178+
You add data to Elasticsearch as JSON objects called documents. Elasticsearch stores these documents in searchable indices.
179+
::::
180+
181+
::::{step} Define mappings and data types
182+
183+
When using dynamic mapping, Elasticsearch automatically creates mappings for new fields by default.
184+
The documents we’ve added so far have used dynamic mapping, because we didn’t specify a mapping when creating the index.
185+
186+
To see how dynamic mapping works, add a new document to the `books` index with a field that doesn’t appear in the existing documents.
187+
188+
```console
189+
POST /books/_doc
190+
{
191+
"name": "The Great Gatsby",
192+
"author": "F. Scott Fitzgerald",
193+
"release_date": "1925-04-10",
194+
"page_count": 180,
195+
"language": "EN" <1>
196+
}
197+
```
198+
1. The new field.
199+
::::
200+
201+
:::::
202+
`````
203+
::::::
204+
205+
:::::::

docs/testing/archive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: archive
3-
description: Browse the archived documentation for older Elastic product releases. Archived documentation is unmaintained and may be out-of-date.
3+
description: Browse the archive for legacy Elastic products and documentation. Archive documentation is unmaintained and may be out-of-date.
44
---
55

66
# Archive
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.markdown-content {
2+
.stepper {
3+
.step {
4+
@apply not-first:mt-8;
5+
}
6+
7+
.title {
8+
@apply font-sans text-2xl font-semibold text-black no-underline hover:text-black;
9+
}
10+
11+
& > ol {
12+
@apply ml-0;
13+
counter-reset: stepper;
14+
15+
ol {
16+
list-style-type: decimal;
17+
}
18+
ol > li > ol {
19+
list-style-type: lower-alpha;
20+
}
21+
ol > li > ol > li > ol {
22+
list-style-type: lower-roman;
23+
}
24+
ol > li > ol > li > ol > li > ol {
25+
list-style-type: decimal;
26+
}
27+
ol > li > ol > li > ol > li > ol > li > ol {
28+
list-style-type: lower-alpha;
29+
}
30+
ol > li > ol > li > ol > li > ol > li > ol > li > ol {
31+
list-style-type: lower-roman;
32+
}
33+
}
34+
& > ol > li {
35+
@apply relative list-none pl-12;
36+
counter-increment: stepper;
37+
position: relative;
38+
&::before {
39+
@apply bg-grey-20 absolute top-8 -bottom-10 block w-[1px];
40+
content: '';
41+
left: calc(var(--spacing) * 4 - 1px);
42+
}
43+
&:last-child::before {
44+
@apply bottom-0;
45+
}
46+
&::after {
47+
@apply border-grey-20 bg-grey-10 absolute top-0 left-0 flex size-8 items-center justify-center rounded-full border-1 text-sm text-black;
48+
content: counter(stepper);
49+
}
50+
}
51+
}
52+
}

src/Elastic.Markdown/Assets/markdown/typography.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,10 @@
5050

5151
a {
5252
@apply font-body text-blue-elastic hover:text-blue-elastic-100 underline;
53+
54+
&[target='_blank']::after {
55+
@apply ml-0.5;
56+
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='grey' height='16'><path d='M6.22 8.72a.75.75 0 0 0 1.06 1.06l5.22-5.22v1.69a.75.75 0 0 0 1.5 0v-3.5a.75.75 0 0 0-.75-.75h-3.5a.75.75 0 0 0 0 1.5h1.69L6.22 8.72Z' /><path d='M3.5 6.75c0-.69.56-1.25 1.25-1.25H7A.75.75 0 0 0 7 4H4.75A2.75 2.75 0 0 0 2 6.75v4.5A2.75 2.75 0 0 0 4.75 14h4.5A2.75 2.75 0 0 0 12 11.25V9a.75.75 0 0 0-1.5 0v2.25c0 .69-.56 1.25-1.25 1.25h-4.5c-.69 0-1.25-.56-1.25-1.25v-4.5Z' /></svg>");
57+
}
5358
}
5459
}

src/Elastic.Markdown/Assets/pages-nav.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,32 @@ function isElementInViewport(parent: HTMLElement, child: HTMLElement): boolean {
4242
)
4343
}
4444

45+
function setDropdown(dropdown: HTMLElement) {
46+
if (dropdown) {
47+
const anchors = $$('a', dropdown)
48+
anchors.forEach((a) => {
49+
a.addEventListener('mousedown', (e) => {
50+
e.preventDefault()
51+
})
52+
a.addEventListener('mouseup', () => {
53+
if (document.activeElement instanceof HTMLElement) {
54+
document.activeElement.blur()
55+
}
56+
})
57+
})
58+
}
59+
}
60+
4561
export function initNav() {
4662
const pagesNav = $('#pages-nav')
4763
if (!pagesNav) {
4864
return
4965
}
5066

5167
const pagesDropdown = $('#pages-dropdown')
52-
if (pagesDropdown) {
53-
const activeAnchor = $('a.pages-dropdown_active', pagesDropdown)
54-
activeAnchor?.addEventListener('mousedown', (e) => {
55-
e.preventDefault()
56-
})
57-
}
58-
59-
const allNavItems = $$('a', pagesNav)
60-
allNavItems.forEach((link) => {
61-
link.addEventListener('click', () => {
62-
link.closest('details').removeAttribute('open')
63-
})
64-
})
68+
const pageVersionDropdown = $('#page-version-dropdown')
69+
setDropdown(pagesDropdown)
70+
setDropdown(pageVersionDropdown)
6571

6672
const navItems = $$(
6773
'a[href="' +

src/Elastic.Markdown/Assets/styles.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
@import './markdown/images.css';
1414
@import './modal.css';
1515
@import './archive.css';
16+
@import './markdown/stepper.css';
1617

1718
:root {
1819
--outline-size: max(2px, 0.08em);
@@ -92,6 +93,7 @@
9293

9394
.sidebar-link {
9495
@apply text-ink-light inline-block leading-[1.2em] text-pretty hover:text-black md:text-sm;
96+
word-break: break-word;
9597
}
9698
}
9799

0 commit comments

Comments
 (0)