Skip to content

Commit 56cd86c

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/api-docs-multiple
2 parents 86998b6 + dac1a5d commit 56cd86c

Some content is hidden

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

59 files changed

+2987
-800
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
* @elastic/docs-engineering
22
/docs/ @elastic/docs
3+
/config/ @elastic/docs-tech-leads

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@
7070
</PackageVersion>
7171
<PackageVersion Include="xunit.v3" Version="2.0.2" />
7272
</ItemGroup>
73-
</Project>
73+
</Project>

config/assembler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ references:
7474
apm-agent-rum-js:
7575
apm-aws-lambda:
7676
apm-k8s-attacher:
77+
ecs:
78+
current: 9.0 # releases do not always align with the Stack version
79+
next: main
7780
ecs-dotnet:
7881
ecs-logging-go-logrus:
7982
ecs-logging-go-zap:
@@ -98,9 +101,6 @@ references:
98101
#stack aligned using gated deploys
99102
beats: *stack
100103
logstash: *stack
101-
ecs:
102-
<<: *stack
103-
next: main
104104

105105
# @elastic/admin-docs
106106
cloud-on-k8s:

config/legacy-url-mappings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
#############################################
2+
# This file defines the legacy URL mappings for the documentation site.
3+
# It maps current documentation pages to older versions to ensure users can find the content they need.
14
# TODO: Refactor the model, for now we just use the first element as current version
5+
#############################################
26

37
stack: &stack [ '9.0+', '8.18', '8.17', '8.16', '8.15', '8.14', '8.13', '8.12', '8.11', '8.10', '8.9', '8.8', '8.7', '8.6', '8.5', '8.4', '8.3', '8.2', '8.1', '8.0', '7.17' ]
48

config/navigation.yml

Lines changed: 62 additions & 65 deletions
Large diffs are not rendered by default.

config/versions.yml

Lines changed: 2 additions & 2 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.3
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

docs/_docset.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ toc:
3838
- file: cumulative-docs.md
3939
- file: branching-strategy.md
4040
- file: add-repo.md
41+
- file: release-new-version.md
4142
- folder: migration
4243
children:
4344
- file: index.md
@@ -65,8 +66,9 @@ toc:
6566
children:
6667
- file: index.md
6768
- file: content.md
68-
- file: landing-page.md
69-
- file: redirects.md
69+
- file: navigation.md
70+
- file: versions.md
71+
- file: legacy-url-mappings.md
7072
- folder: content-set
7173
children:
7274
- file: index.md
@@ -87,6 +89,7 @@ toc:
8789
- file: code.md
8890
- file: comments.md
8991
- file: conditionals.md
92+
- hidden: diagrams.md
9093
- file: dropdowns.md
9194
- file: definition-lists.md
9295
- file: example_blocks.md

docs/configure/content-sources.md

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,55 +23,28 @@ This allows you as an owner of a repository to choose two different branching st
2323

2424
The new documentation system supports 2 branching strategies.
2525

26-
Continuous deployment
27-
: This is the default where a repositories `main` or `master` branch is continuously deployed to production.
26+
### Continuous deployment
2827

29-
Tagged
30-
: Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production.
31-
Allowing you to control the timing of when new documentation should go live.
28+
This is the default where a repositories `main` or `master` branch is continuously deployed to production.
3229

30+
### Tagged
3331

34-
### Continuous deployment
35-
36-
This is the default. To get started, follow our [guide](/migration/guide/index.md) to set up the new docs folder structure and CI configuration.
37-
38-
Once setup ensure the repository is added to our [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) under `references`.
39-
40-
For example say you want to onboard `elastic/my-repository` into the production build:
41-
42-
```yaml
43-
references:
44-
my-repository:
45-
```
46-
47-
Is equivalent to specifying.
32+
Allows you to 'tag' a single git reference (typically a branch) as `current` which will be used to deploy to production. Allowing you to control the timing of when new documentation should go live.
4833

49-
```yaml
50-
references:
51-
my-repository:
52-
next: main
53-
current: main
54-
```
34+
### Add a new content set
5535

56-
% TODO we need navigation.yml docs
57-
Once the repository is added, its navigation still needs to be injected into to global site navigation.
36+
To get started:
5837

59-
### Tagged
38+
1. Follow our [guide](/migration/guide/index.md) to set up the new docs folder structure and CI configuration.
39+
1. Configure the repository source in `assembler.yml`. See [](./site/content.md) for details.
6040

61-
If you want to have more control over the timing of when your docs go live to production. Configure the repository
62-
in our [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) to have a fixed git reference (typically a branch) deploy the `current` content source to production.
63-
64-
```yaml
65-
references:
66-
my-other-repository:
67-
next: main
68-
current: 9.0
69-
```
41+
:::{note}
42+
The tagged branching strategy requires first following our [migration guide](/migration/guide/index.md) and configuring the documentation CI integration.
43+
Our CI integration checks will block until `current` is successfully configured.
44+
:::
7045

71-
:::{note}
72-
In order for `9.0` to be onboarded it needs to first follow our [migration guide](/migration/guide/index.md) and have our documentation CI integration setup.
73-
Our CI integration checks will block until `current` is successfully configured
74-
:::
46+
1. Inject the content set into the global navigation. See [](./site/navigation.md) for details.
47+
1. Optionally set up legacy URL mappings. See [](./site/legacy-url-mappings.md) for details.
7548

7649
#### CI configuration
7750

docs/configure/site/content.md

Lines changed: 86 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,100 @@
1+
---
2+
navigation_title: assembler.yml
3+
---
4+
15
# `assembler.yml`
26

3-
The global navigation is defined in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file. This file can roughly be thought of as the V3 equivalent of conf.yaml in the asciidoc build system. This file, which writers own, allows for arbitrary nesting of `docset.yml` and `toc.yml` references. This file will live in the `elastic/docs-content` repository, but will not build or have any influence over the `docs-builder` builds in that repo.
7+
The [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file defines the global documentation site:
48

5-
The global navigation that is defined in [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) can be composed of three main resources:
6-
1. Local TOC files: toc.yml files that live in the docs-content repository.
7-
2. External TOC files: A subset of a content set (represented by a toc.yml file) that is external to the docs-content repository.
8-
3. External content set declarations: An entire docset.yml file that is external to the docs-content repository.
9+
* `environments`
10+
* `shared_configuration`
11+
* narrative repository configuration
12+
* reference repository configurations
913

10-
The [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file might look something like this:
14+
## `environments`
1115

12-
```yaml
16+
This section defines different build environments for the documentation site.
17+
18+
Each environment specifies configuration details such as the site URI, content source, path prefix, Google Tag Manager settings, and feature flags.
19+
20+
Example:
21+
22+
```yml
23+
environments:
24+
prod:
25+
uri: https://www.elastic.co
26+
path_prefix: docs
27+
content_source: current
28+
allow_indexing: true
29+
google_tag_manager:
30+
enabled: true
31+
id: GTM-KNJMG2M
32+
```
33+
34+
## `shared_configuration`
1335

36+
This section defines YAML anchors for common settings shared among multiple repositories and deployment environments.
37+
38+
The following example sets a unique `stack` version for each of the three defined deployment environments:
39+
40+
```yml
41+
stack: &stack
42+
current: 9.0
43+
next: 9.1
44+
edge: main
1445
```
1546

16-
## Assembler constraints
47+
## `narrative`
1748

18-
To maintain each docset’s immutability and self-containment, resources in the global navigation (assembler.yml) must follow specific rules.
19-
1. A link resource can appear only once in the global navigation, and it must nest directly under another resource (not under individual pages from a different content set). In other words:
20-
1. Each docset.yml or toc.yml file can appear only once in the overall navigation.
21-
1. Any TOC declarations—whether in docset.yml or toc.yml—must be placed either at the top level or directly under another TOC entry, with no individual files in between.
22-
1. Nested resources must appear either before or after (default) the parent’s TOC, and they cannot be placed arbitrarily among the parent’s pages (e.g., between two files of the parent).
23-
1. If an external TOC is linked, all of its child TOCs must also be included in the global navigation.
49+
Configures the main `docs-content` repository.
2450

25-
## AsciiDoctor conf.yml
51+
Example:
52+
53+
```yml
54+
narrative:
55+
checkout_strategy: full
56+
```
2657

27-
In the AsciiDoctor-powered site, content configuration at the site level is done in the [`conf.yaml`](https://github.com/elastic/docs/blob/master/conf.yaml) file in the elastic/docs repo. In the `conf.yml` file, the configuration information for all books are listed in this one file. Here's the example of what it looks like to configure a single book:
58+
## `references`
59+
60+
Configures all other repositories whose docs content should be included or referenced in the build. Each can have custom settings for branch, checkout method, etc.
61+
62+
Example:
63+
64+
```yml
65+
references:
66+
apm-server:
67+
```
68+
69+
### Branching strategy
70+
71+
How you add a reference repository depends on its [branching strategy](../content-sources.md#branching-strategies).
72+
73+
#### Continuous deployment repository
74+
75+
To add a continuous deployment repository, define the name of the repository:
2876

2977
```yaml
30-
- title: Machine Learning
31-
prefix: en/machine-learning
32-
current: *stackcurrent
33-
index: docs/en/stack/ml/index.asciidoc
34-
branches: [ {main: master}, 8.9, 8.8, 8.7, 8.6, 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.17, 7.16, 7.15, 7.14, 7.13, 7.12, 7.11, 7.10, 7.9, 7.8, 7.7, 7.6, 7.5, 7.4, 7.3, 7.2, 7.1, 7.0, 6.8, 6.7, 6.6, 6.5, 6.4, 6.3 ]
35-
live: *stacklive
36-
chunk: 1
37-
tags: Elastic Stack/Machine Learning
38-
subject: Machine Learning
39-
sources:
40-
-
41-
repo: stack-docs
42-
path: docs/en/stack
43-
-
44-
repo: elasticsearch
45-
path: docs
46-
-
47-
repo: docs
48-
path: shared/versions/stack/{version}.asciidoc
49-
-
50-
repo: docs
51-
path: shared/attributes.asciidoc
52-
-
53-
repo: docs
54-
path: shared/settings.asciidoc
78+
references:
79+
my-repository:
5580
```
81+
82+
The above configuration is equivalent to specifying.
83+
84+
```yaml
85+
references:
86+
my-repository:
87+
next: main
88+
current: main
89+
```
90+
91+
### Tagged repository
92+
93+
To add a tagged repository, configure the repo to have a fixed git reference (typically a branch) deploy the `current` content source to production.
94+
95+
```yaml
96+
references:
97+
my-other-repository:
98+
next: main
99+
current: 9.0
100+
```

docs/configure/site/index.md

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,17 @@ navigation_title: Site-level
44

55
# Site-level configuration
66

7-
Start by understanding how the new V3 system works at the site level compared to how our custom AsciiDoctor system works. At the site-level, we have:
7+
Configure the documentation site in these files:
88

9-
| System property | Asciidoc | V3 |
10-
| -------------------- | -------------------- | -------------------- |
11-
| **Content sources** --> Collections of markup files containing doc content. These are split up across many docs repos. | _Books_ | _Content sets_ |
12-
| **Content configuration** --> A way to specify where to find those content sources, and in what order they should be added to the site. | Configuration file ([`conf.yml`](https://github.com/elastic/docs/blob/master/conf.yaml) in elastic/docs) | Config file `assembler.yml` |
13-
14-
Where these pieces live and what format they are in varies between the two systems, but they generally achieve the same goal.
15-
16-
## Content sources
17-
18-
TBD
19-
20-
## Content configuration
21-
22-
In both the AsciiDoctor- and V3-based system, there is site-wide configuration where you list all content sources, where to find those sources, and in what order they should be added to the site.
23-
24-
In the AsciiDoctor system, this all happens in one YAML file in the `/docs` repo. In the V3 system:
25-
* Content configuration happens in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file in `docs-builder`.
26-
* Navigation configuration happens in the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file in `docs-builder`.
27-
28-
[assembler.yml](./content.md)
29-
30-
## Landing page
31-
32-
See [landing page](./landing-page.md)
9+
- [](./content.md) - build environments and repository sources
10+
- [](./navigation.md) - global navigation index
11+
- [](./versions.md) - global versioning schemes
12+
- [](./legacy-url-mappings.md) - supported legacy version
3313

3414
## Redirects
3515

36-
Plan still needed
16+
Redirects are also configured at the site-level. See [](../../contribute/redirects.md) for more information.
3717

3818
## V3 site-level diagram
3919

40-
DIAGRAM NEEDED
41-
42-
## Asciidoc site-level diagram
43-
44-
![site-level config in the asciidoc system](./img/site-level-asciidoctor.png)
20+
*Coming soon*

0 commit comments

Comments
 (0)