-
Notifications
You must be signed in to change notification settings - Fork 21
Add add-repo doc #1443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add add-repo doc #1443
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Add a new repository to the docs | ||
|
||
Elastic documentation is built from many assembled repositories using `docs-assembler`. Adding a new repository requires making the assembly process aware of its existence. | ||
|
||
Follow these instructions to add a new docs repository. | ||
|
||
## Prerequisites | ||
|
||
The new docs repository needs to satisfy these requirements: | ||
|
||
- The repository must have a `docs` folder in the root. | ||
- The `docs` folder must contain a valid [`docset.yml` file](../configure/content-set/navigation.md) and Markdown files. | ||
- Markdown files within the `docs` folder that follow the V3 format. Refer to [Syntax](../syntax/index.md). | ||
- The repository must be within the Elastic organization on `GitHub` and public. | ||
|
||
## Add the repository | ||
|
||
Follow these instructions to add a new repository to the docs. | ||
|
||
:::::{stepper} | ||
|
||
::::{step} 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](https://github.com/elastic/docs-infra/blob/main/modules/aws-github-actions-oidc-roles/repositories.yml) file. | ||
|
||
For example, to add the fictitious `elastic/yadda-docs` repository: | ||
|
||
```yaml | ||
repositories: | ||
- name: elastic/yadda-docs # Added for testing purposes | ||
``` | ||
|
||
:::: | ||
|
||
::::{step} Add the workflow actions to the repository | ||
|
||
Add the following actions to the `.github/workflows` directory 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 `main` branch. This is a requirement. For example, you can merge a docs pull request to `main` after adding the workflow actions. | ||
|
||
:::: | ||
|
||
::::{step} Add the repository to the assembler and navigation configs | ||
|
||
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. | ||
|
||
For example, to add the `elastic/yadda-docs` repository: | ||
|
||
```yaml | ||
references: | ||
yadda-docs: | ||
``` | ||
|
||
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. | ||
|
||
For example, to add the `elastic/yadda-docs` repository under **Reference**: | ||
|
||
```yaml | ||
############# | ||
# 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 | ||
``` | ||
|
||
:::: | ||
::::: | ||
|
||
## Add .artifacts to .gitignore | ||
|
||
For a more comfortable local `docs-builder` experience, add the following line to the `.gitignore` file of the repo: | ||
theletterf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
docs/.artifacts | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.