Skip to content

Commit 1fef18a

Browse files
committed
Merge branch 'main' into feature/real_redirects
2 parents 69bc3c3 + f8d4641 commit 1fef18a

File tree

15 files changed

+507
-64
lines changed

15 files changed

+507
-64
lines changed

docs/_docset.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ toc:
3131
- file: on-the-web.md
3232
- file: move.md
3333
- file: redirects.md
34+
- file: add-repo.md
3435
- folder: migration
3536
children:
3637
- file: index.md

docs/contribute/add-repo.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Add a new repository to the docs
2+
3+
Elastic documentation is built from many assembled repositories using `docs-assembler`. Adding a new repository requires making the assembly process aware of its existence.
4+
5+
Follow these instructions to add a new docs repository.
6+
7+
## Prerequisites
8+
9+
The new docs repository needs to satisfy these requirements:
10+
11+
- The repository must have a `docs` folder in the root.
12+
- The `docs` folder must contain a valid [`docset.yml` file](../configure/content-set/navigation.md) and Markdown files.
13+
- Markdown files within the `docs` folder that follow the V3 format. Refer to [Syntax](../syntax/index.md).
14+
- The repository must be within the Elastic organization on `GitHub` and public.
15+
16+
## Add the repository
17+
18+
Follow these instructions to add a new repository to the docs.
19+
20+
:::::{stepper}
21+
22+
::::{step} Add the repo to docs-infra
23+
24+
Add the repo to the list of repositories that can upload to the Link index by editing the [repositories.yml](https://github.com/elastic/docs-infra/blob/main/modules/aws-github-actions-oidc-roles/repositories.yml) file.
25+
26+
For example, to add the fictitious `elastic/yadda-docs` repository:
27+
28+
```yaml
29+
repositories:
30+
- name: elastic/yadda-docs # Added for testing purposes
31+
```
32+
33+
::::
34+
35+
::::{step} Add the workflow actions to the repository
36+
37+
Add the following actions to the `.github/workflows` directory of your repo:
38+
39+
- https://github.com/elastic/docs-builder/blob/main/.github%2Fworkflows%2Fpreview-build.yml
40+
- https://github.com/elastic/docs-builder/blob/main/.github/workflows/preview-cleanup.yml
41+
42+
Then, successfully run a docs build on the `main` branch. This is a requirement. For example, you can merge a docs pull request to `main` after adding the workflow actions.
43+
44+
::::
45+
46+
::::{step} Add the repository to the assembler and navigation configs
47+
48+
Edit the [assembler.yml](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml) file to add the repository. Refer to [assembler.yml](../configure/site/content.md) for more information.
49+
50+
For example, to add the `elastic/yadda-docs` repository:
51+
52+
```yaml
53+
references:
54+
yadda-docs:
55+
```
56+
57+
Then, edit the [navigation.yml](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/navigation.yml) file to add the repository to the navigation.
58+
59+
For example, to add the `elastic/yadda-docs` repository under **Reference**:
60+
61+
```yaml
62+
#############
63+
# REFERENCE #
64+
#############
65+
- toc: reference
66+
path_prefix: reference
67+
children:
68+
# Yadda
69+
# ✅ https://github.com/elastic/yadda-docs/blob/main/docs/toc.yml
70+
- toc: yadda-docs://
71+
path_prefix: reference/yadda
72+
```
73+
74+
::::
75+
:::::
76+
77+
## Add .artifacts to .gitignore
78+
79+
For a more comfortable local `docs-builder` experience, add the following line to the `.gitignore` file of the repo:
80+
81+
```
82+
docs/.artifacts
83+
```

docs/syntax/applies.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ There are 3 typical scenarios to start from:
184184
stack: ga
185185
serverless: ga
186186
products:
187-
-id: kibana
188-
-id: elasticsearch
189-
-id: elastic-stack
187+
- id: kibana
188+
- id: elasticsearch
189+
- id: elastic-stack
190190
---
191191
```
192192
@@ -201,10 +201,10 @@ There are 3 typical scenarios to start from:
201201
ece: ga
202202
eck: ga
203203
products:
204-
-id: cloud-serverless
205-
-id: cloud-hosted
206-
-id: cloud-enterprise
207-
-id: cloud-kubernetes
204+
- id: cloud-serverless
205+
- id: cloud-hosted
206+
- id: cloud-enterprise
207+
- id: cloud-kubernetes
208208
---
209209
```
210210
@@ -215,7 +215,7 @@ There are 3 typical scenarios to start from:
215215
applies_to:
216216
product: ga
217217
products:
218-
-id: edot-collector
218+
- id: edot-collector
219219
---
220220
```
221221
@@ -363,4 +363,4 @@ applies_to:
363363
product:
364364
---
365365
```
366-
This allows you to annotate various facets as defined in [](../migration/versioning.md)
366+
This allows you to annotate various facets as defined in [](../migration/versioning.md)

docs/syntax/links.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,26 @@ It has two components:
1515

1616
### Internal links
1717

18-
Link between documentation files using either relative or absolute paths.
18+
Link between documentation pages in the same repository using the file’s relative or absolute path. The path must include the `.md` file extension. Optionally append an anchor to send readers to a specific section on a page. Never use a full URL for links between documentation pages.
1919

2020
#### Relative paths
21-
Navigate relative to the current file's location:
21+
22+
Use relative paths to link to other pages inside the same repository.
2223

2324
```markdown
24-
[Security documentation](../security/index.md)
25+
[Security docs](../security/index.md)
2526

26-
[Monitoring guide](monitor/index.md)
27+
[Install](monitor/index.md#installation)
2728
```
2829

2930
#### Absolute paths
3031

31-
You can also use absolute paths to link to pages within the same repository.
32-
Say you're working on a random page somewhere in the `docs-content` repo. You can link to a page in the `deploy-manage` section like this:
32+
Use absolute paths to link to other pages inside the same repository.
3333

3434
```markdown
35-
[API Keys](/deploy-manage/api-keys.md)
35+
[API keys](/deploy-manage/api-keys.md)
36+
37+
[Authentication](/deploy-manage/api-keys.md#authentication)
3638
```
3739

3840
Note the leading `/` before the path.
@@ -90,6 +92,8 @@ The syntax follows the format `<scheme>://<path>`, where:
9092
The `path` in cross-repo links must be relative to the `docset.yml` file and not the full path within the repo
9193
:::
9294

95+
Never use a full URL for links across documentation repositories.
96+
9397
### External links
9498

9599
Link to websites and resources outside the Elastic docs:

docs/testing/req.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
1+
---
2+
applies_to:
3+
stack: ga 9.1
4+
---
5+
16
# Requirements
27

8+
Current version: **9.0.0**
9+
10+
| `applies_to` | result |
11+
|--------------------------------------------|--------------------------------------|
12+
| `` {applies_to}`stack: preview` `` | {applies_to}`stack: preview` |
13+
| `` {applies_to}`stack: preview 8.18` `` | {applies_to}`stack: preview 8.18` |
14+
| `` {applies_to}`stack: preview 9.0` `` | {applies_to}`stack: preview 9.0` |
15+
| `` {applies_to}`stack: preview 9.1` `` | {applies_to}`stack: preview 9.1` |
16+
| `` {applies_to}`stack: ga` `` | {applies_to}`stack: ga` |
17+
| `` {applies_to}`stack: ga 8.18` `` | {applies_to}`stack: ga 8.18` |
18+
| `` {applies_to}`stack: ga 9.0` `` | {applies_to}`stack: ga 9.0` |
19+
| `` {applies_to}`stack: ga 9.1` `` | {applies_to}`stack: ga 9.1` |
20+
| `` {applies_to}`stack: beta` `` | {applies_to}`stack: beta` |
21+
| `` {applies_to}`stack: beta 8.18` `` | {applies_to}`stack: beta 8.18` |
22+
| `` {applies_to}`stack: beta 9.0` `` | {applies_to}`stack: beta 9.0` |
23+
| `` {applies_to}`stack: beta 9.1` `` | {applies_to}`stack: beta 9.1` |
24+
| `` {applies_to}`stack: deprecated` `` | {applies_to}`stack: deprecated` |
25+
| `` {applies_to}`stack: deprecated 8.18` `` | {applies_to}`stack: deprecated 8.18` |
26+
| `` {applies_to}`stack: deprecated 9.0` `` | {applies_to}`stack: deprecated 9.0` |
27+
| `` {applies_to}`stack: deprecated 9.1` `` | {applies_to}`stack: deprecated 9.1` |
28+
| `` {applies_to}`stack: removed` `` | {applies_to}`stack: removed` |
29+
| `` {applies_to}`stack: removed 8.18` `` | {applies_to}`stack: removed 8.18` |
30+
| `` {applies_to}`stack: removed 9.0` `` | {applies_to}`stack: removed 9.0` |
31+
| `` {applies_to}`stack: removed 9.1` `` | {applies_to}`stack: removed 9.1` |
32+
33+
{applies_to}`stack: deprecated 9.1, removed 9.4`
34+
35+
336
To follow this tutorial you will need to install the following components:
437

538
- An installation of Elasticsearch, based on our hosted [Elastic Cloud](https://www.elastic.co/cloud) service (which includes a free trial period), or a self-hosted service that you run on your own computer. See the Install Elasticsearch section above for installation instructions.
@@ -9,4 +42,4 @@ The tutorial assumes that you have no previous knowledge of Elasticsearch or gen
942

1043
- Python development
1144
- The [Flask](https://flask.palletsprojects.com/) web framework for Python.
12-
- The command prompt or terminal application in your operating system.
45+
- The command prompt or terminal application in your operating system.

src/Elastic.Documentation.Site/Assets/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'htmx-ext-head-support'
1111
import 'htmx-ext-preload'
1212
import 'htmx.org'
1313
import { $, $$ } from 'select-dom'
14+
import tippy from 'tippy.js'
1415
import { UAParser } from 'ua-parser-js'
1516

1617
const { getOS } = new UAParser()
@@ -24,6 +25,9 @@ document.addEventListener('htmx:load', function () {
2425
initSmoothScroll()
2526
openDetailsWithAnchor()
2627
initDismissibleBanner()
28+
tippy('[data-tippy-content]:not([data-tippy-content=""])', {
29+
delay: [400, 100],
30+
})
2731
})
2832

2933
// Don't remove style tags because they are used by the elastic global nav.

src/Elastic.Documentation.Site/Assets/styles.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
@import './archive.css';
1818
@import './markdown/stepper.css';
1919
@import './api-docs.css';
20+
@import 'tippy.js/dist/tippy.css';
2021

2122
:root {
2223
--outline-size: max(2px, 0.08em);
@@ -162,6 +163,7 @@
162163
}
163164

164165
.applicable-info {
166+
cursor: default;
165167
padding: calc(var(--spacing) * 0.5);
166168
padding-left: calc(var(--spacing) * 2);
167169
padding-right: calc(var(--spacing) * 2);
@@ -173,6 +175,9 @@
173175
background-color: var(--color-white);
174176
border: 1px solid var(--color-grey-20);
175177
font-weight: normal;
178+
&[data-tippy-content]:not([data-tippy-content='']) {
179+
cursor: help;
180+
}
176181
}
177182
.applicable-version {
178183
font-weight: bold;

src/Elastic.Documentation.Site/package-lock.json

Lines changed: 22 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Elastic.Documentation.Site/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"moment": "2.30.1",
4242
"parcel": "2.15.4",
4343
"postcss": "8.5.6",
44-
"postcss-import": "16.1.0",
44+
"postcss-import": "16.1.1",
4545
"prettier": "3.5.3",
4646
"prettier-plugin-tailwindcss": "0.6.13",
4747
"react": "18.3.1",
@@ -59,6 +59,7 @@
5959
"htmx.org": "2.0.5",
6060
"select-dom": "9.3.1",
6161
"tailwindcss": "4.1.10",
62+
"tippy.js": "6.3.7",
6263
"ua-parser-js": "2.0.3"
6364
}
6465
}

0 commit comments

Comments
 (0)