Skip to content

Commit e5030ec

Browse files
committed
update config locations in our docs
1 parent 6cf2032 commit e5030ec

File tree

12 files changed

+36
-31
lines changed

12 files changed

+36
-31
lines changed

docs/configure/content-sources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Tagged
3535

3636
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.
3737

38-
Once setup ensure the repository is added to our `assembler.yml` under `references`.
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`.
3939

4040
For example say you want to onboard `elastic/my-repository` into the production build:
4141

@@ -59,7 +59,7 @@ Once the repository is added, its navigation still needs to be injected into to
5959
### Tagged
6060
6161
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` to have a fixed git reference (typically a branch) deploy the `current` content source to production.
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.
6363

6464
```yaml
6565
references:
@@ -101,4 +101,4 @@ jobs:
101101
pull-requests: write
102102
```
103103

104-
1. Ensure version branches are built and publish their links ahead of time.
104+
1. Ensure version branches are built and publish their links ahead of time.

docs/configure/site/content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# `assembler.yml`
22

3-
The global navigation is defined in the `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.
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.
44

5-
The global navigation that is defined in `assembler.yml` can be composed of three main resources:
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:
66
1. Local TOC files: toc.yml files that live in the docs-content repository.
77
2. External TOC files: A subset of a content set (represented by a toc.yml file) that is external to the docs-content repository.
88
3. External content set declarations: An entire docset.yml file that is external to the docs-content repository.
99

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

1212
```yaml
1313

docs/configure/site/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ TBD
2222
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.
2323

2424
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/src/tooling/docs-assembler/assembler.yml) file in `docs-builder`.
26-
* Navigation configuration happens in the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/navigation.yml) file in `docs-builder`.
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`.
2727

2828
[assembler.yml](./content.md)
2929

docs/contribute/_snippets/tag-processing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ Specifically for versioned products, badges will display differently when the `a
1212

1313
Example: {applies_to}`stack: removed 99.99`
1414

15-
This is computed at build time (there is a docs build every 30 minutes). The documentation team tracks and maintains released versions for these products centrally in [versions.yml](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation.Configuration/versions.yml).
16-
15+
This is computed at build time (there is a docs build every 30 minutes). The documentation team tracks and maintains released versions for these products centrally in [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml).
1716
When multiple lifecycle statuses and versions are specified in the sources, several badges are shown.
1817

1918
:::{note}
2019
Visuals and wording in the output documentation are subject to changes and optimizations.
21-
:::
20+
:::

docs/contribute/_snippets/tagged-warning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Some repositories use a [tagged branching strategy](/contribute/branching-strate
33

44
For detailed backporting guidance, refer to the example in [Choose the docs branching strategy for a repository](/contribute/branching-strategy.md#workflow-2-tagged).
55

6-
To determine the published branches for a repository, find the repository in [assembler.yml](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml).
6+
To determine the published branches for a repository, find the repository in [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml).
77
:::

docs/contribute/add-repo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Then, successfully run a docs build on the `main` branch. This is a requirement.
4545

4646
::::{step} Add the repository to the assembler and navigation configs
4747

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.
48+
Edit the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) file to add the repository. Refer to [assembler.yml](../configure/site/content.md) for more information.
4949

5050
For example, to add the `elastic/yadda-docs` repository:
5151

@@ -58,7 +58,7 @@ references:
5858
In this file, you can optionally specify custom branches to deploy docs from, depending on your preferred [branching strategy](branching-strategy.md). You might want to change your branching strategy so you can have more control over when content added for a specific release is published.
5959
:::
6060

61-
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.
61+
Then, edit the [`navigation.yml`](https://github.com/elastic/docs-builder/blob/main/config/navigation.yml) file to add the repository to the navigation.
6262

6363
For example, to add the `elastic/yadda-docs` repository under **Reference**:
6464

docs/contribute/branching-strategy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ After it has been established that a repository should publish from a version br
3939

4040
1. [Add new triggers to the `docs-build` CI integration](/configure/content-sources.md#ci-configuration). Merge these changes to `main` or `master` and the intended version branches.
4141
2. Open a PR to trigger the CI integration and confirm that the docs build.
42-
3. Open a PR updating the [docs assembler file](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml):
42+
3. Open a PR updating the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml):
4343
* Specify which is the `current` branch for the repository. This branch is the branch from which docs are deployed to production at [elastic.co/docs](http://elastic.co/docs).
4444
* Specify which is the `next` branch for the repository. The branch defined as `next` publishes docs internally to [staging-website.elastic.co/docs](http://staging-website.elastic.co/docs)
4545
* Setting this branch to the next version branch in line is a good practice to preview docs change for an upcoming version.
@@ -60,10 +60,10 @@ When you publish from specific version branches, you need to bump the version br
6060

6161
Add an action as part of that repo’s release process for the release manager to update this same assembler file and bump the `current` branch with each release, as appropriate. The `next` branch also needs to be bumped if it is not set to `main`.
6262

63-
When these releases happen, create a PR against the [assembler file](https://github.com/elastic/docs-builder/blob/main/src/tooling/docs-assembler/assembler.yml) that defines the new `current` branch, to merge on release day.
63+
When these releases happen, create a PR against the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) that defines the new `current` branch, to merge on release day.
6464

6565
:::{tip}
66-
Regardless of the branching strategy, you also need to update the current version in [versions.yml](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation.Configuration/versions.yml) as part of your release process. This version number is used in documentation variables and drives our [dynamic version badge logic](/contribute/cumulative-docs.md#how-do-these-tags-behave-in-the-output).
66+
Regardless of the branching strategy, you also need to update the current version in [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml) as part of your release process. This version number is used in documentation variables and drives our [dynamic version badge logic](/contribute/cumulative-docs.md#how-do-these-tags-behave-in-the-output).
6767
:::
6868

6969

@@ -123,7 +123,7 @@ The changes must then be backported to their relevant version branches, and no f
123123

124124
For example, in a situation where 9.0, 9.1, and 9.2 are already released, and the 9.3 branch has already been cut:
125125

126-
* The branch set as `current` in the [docs assembler](https://github.com/elastic/docs-builder/blob/625e75b35841be938a8df76a62deeee811ba52d4/src/tooling/docs-assembler/assembler.yml#L70) is 9.2.
126+
* The branch set as `current` in the [`assembler.yml`](https://github.com/elastic/docs-builder/blob/main/config/assembler.yml) is 9.2.
127127
* The branch set as `next` (where the content development first happens), is `main`.
128128
* 9.4 changes are only done on the `main` branch.
129129
* 9.3 changes are done on the `main` branch and backported to the 9.3 branch.

docs/contribute/cumulative-docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This tagging system is mandatory for all of the public-facing documentation. We
3131

3232
## How version awareness works in Docs V3
3333

34-
Docs V3 uses a central version config called [versions.yml](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation.Configuration/versions.yml), which tracks the latest released versions of our products. It also tracks the earliest version of each product documented in the Docs V3 system (the earliest available on elastic.co/docs).
34+
Docs V3 uses a central version config called [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml), which tracks the latest released versions of our products. It also tracks the earliest version of each product documented in the Docs V3 system (the earliest available on elastic.co/docs).
3535

3636
This central version config is used in certain inline version variables, and drives our [dynamic rendering logic](#how-do-these-tags-behave-in-the-output). This logic allows us to label documentation related to unreleased versions as `planned`, continuously release documentation, and document our Serverless and {{stack}} offerings in one place.
3737

@@ -142,4 +142,4 @@ We do not do date-based tagging for unversioned products.
142142
## How do these tags behave in the output?
143143

144144
:::{include} /contribute/_snippets/tag-processing.md
145-
:::
145+
:::

docs/syntax/version-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ can be printed in any kind of ways.
2828

2929
## Available versioning schemes.
3030

31-
This is dictated by the [versions.yml](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation.Configuration/versions.yml) configuration file
31+
This is dictated by the [`versions.yml`](https://github.com/elastic/docs-builder/blob/main/config/versions.yml) configuration file
3232

3333
* `stack`
3434
* `ece`

src/Elastic.Documentation.Configuration/ConfigurationFileProvider.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public ConfigurationFileProvider(IFileSystem fileSystem)
3434

3535
private IFileInfo CreateTemporaryConfigurationFile(EmbeddedResource resource)
3636
{
37-
var fileName = resource.GetResourceName().Split('_').Last();
37+
var fileName = string.Join(".", resource.GetResourceName().Split('.')[^2..]);
3838
using var stream = GetLocalOrEmbedded(resource);
3939
var context = stream.ReadToEnd();
4040
var fi = _fileSystem.FileInfo.New(Path.Combine(TemporaryDirectory.FullName, fileName));
@@ -44,12 +44,11 @@ private IFileInfo CreateTemporaryConfigurationFile(EmbeddedResource resource)
4444

4545
private StreamReader GetLocalOrEmbedded(EmbeddedResource resource)
4646
{
47-
var fileName = resource.GetResourceName().Split('_').Last();
47+
var fileName = string.Join(".", resource.GetResourceName().Split('.')[^2..]);
4848
var configPath = GetLocalPath(fileName);
4949
if (!_fileSystem.File.Exists(configPath))
5050
return GetEmbeddedStream(resource);
51-
var stream = resource.GetStream();
52-
var reader = new StreamReader(stream, leaveOpen: false);
51+
var reader = _fileSystem.File.OpenText(configPath);
5352
return reader;
5453
}
5554

0 commit comments

Comments
 (0)