Add a new repository to the docs
Elastic documentation is built from many assembled repositories using docs-builder assemble. Adding a new repository requires making the assembly process aware of its existence.
Follow these instructions to add a new docs repository.
The new docs repository needs to satisfy these requirements:
- The repository must have a
docsfolder in the root. - The
docsfolder must contain a validdocset.ymlfile and Markdown files. - Markdown files within the
docsfolder that follow the V3 format. Refer to Syntax. - The repository must be within the Elastic organization on
GitHuband public.
Follow these instructions to add a new repository to the docs.
-
Add the repo to docs-infra
Add the repo to the list of repositories that can upload to the Link index by editing the repositories.yml file.
For example, to add the fictitious
elastic/yadda-docsrepository:repositories: - name: elastic/yadda-docs- Added for testing purposes
-
Add the workflow actions to the repository
Add the following actions to the
.github/workflowsdirectory of your repo:- https://github.com/elastic/docs-builder/blob/main/.github%2Fworkflows%2Fpreview-build.yml
- https://github.com/elastic/docs-builder/blob/main/.github/workflows/preview-cleanup.yml
Then, successfully run a docs build on the
mainbranch. This is a requirement. For example, you can merge a docs pull request tomainafter adding the workflow actions. -
Add the repository to the assembler and navigation configs
Edit the
assembler.ymlfile to add the repository. Refer to assembler.yml for more information.For example, to add the
elastic/yadda-docsrepository:references: yadda-docs:TipIn this file, you can optionally specify custom branches to deploy docs from, depending on your preferred branching strategy. You might want to change your branching strategy so you can have more control over when content added for a specific release is published.
Then, edit the
navigation.ymlfile to add the repository to the navigation. Refer to navigation.yml for more information.For example, to add the
elastic/yadda-docsrepository under Reference:############# # REFERENCE # ############# - toc: reference path_prefix: reference children: # Yadda # ✅ https://github.com/elastic/yadda-docs/blob/main/docs/toc.yml - toc: yadda-docs:// path_prefix: reference/yadda -
(Optional) Add a new version scheme
If you're adding a product with a new versioning scheme, edit the
versions.ymlfile to add the versioning scheme to the build. Refer to navigation.yml for more information.For example, to add version 13.5 of yadda-docs:
yadda-docs: base: 13.0 current: 13.5
For a more comfortable local docs-builder experience, add the following line to the .gitignore file of the repo:
docs/.artifacts