-
Notifications
You must be signed in to change notification settings - Fork 32
Add more documentation for docs-builder CLI and its basic building blocks
#1978
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
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
2c197f7
Add CLI command documentation drafts
Mpdreamz 771b84b
organize cli command documentation
Mpdreamz f72e837
Merge remote-tracking branch 'origin/main' into feature/cli-documenta…
Mpdreamz 335d7a6
stage changes
Mpdreamz 9b65802
Finish documenting cli commands
Mpdreamz 69bf2d2
Cleanup migration
Mpdreamz 1daf6c8
touchups
Mpdreamz a030f85
stage
Mpdreamz 8ed7a3b
stage
Mpdreamz 0bfe134
First pass of claude over building blocks
Mpdreamz 7887ee2
Expanded building blocks
Mpdreamz 6d7f430
update building blocks
Mpdreamz 9a9f20b
update building blocks
Mpdreamz 0c617c5
Include navigation building blocks
Mpdreamz e593ff0
Small touchups
Mpdreamz 2e0cfd4
update redirects
Mpdreamz ea39746
Apply suggestions from code review
Mpdreamz b3b5309
Sentence case
Mpdreamz eb5f50d
fix links
Mpdreamz 73d827f
List items full stop
Mpdreamz 9a0d94d
colons in list not dashes
Mpdreamz d552c73
fix test
Mpdreamz 50ab5f0
Merge branch 'main' into feature/cli-documentation
reakaleek 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
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,50 @@ | ||
| --- | ||
| navigation_title: Assembled Documentation | ||
| --- | ||
|
|
||
| # Assembled Documentation | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Assembled documentation** is the product of building many [documentation sets](documentation-set.md) and weaving them into a global navigation to produce the fully assembled documentation site. | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## How it works | ||
|
|
||
| The assembler: | ||
|
|
||
| 1. Clones multiple documentation repositories | ||
| 2. Reads its [configuration files](../configure/site/index.md) and builds [a global navigation](../configure/site/navigation.md) | ||
| 3. Builds each documentation set independently using the global configuration and navigation to inform path prefixes | ||
| 4. Produces a unified documentation website | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Configuration | ||
|
|
||
| Assembled documentation is configured through the site configuration, which defines: | ||
|
|
||
| * [assembler.yml](../configure/site/index.md) Which repositories to include and [their branching strategy](../contribute/branching-strategy.md) | ||
| * [navigation.yml](../configure/site/index.md) Navigation and url prefixes for TOC's. | ||
| * [versions.yml](../configure/site/versions.md) Defines the various versioning schemes of products/solutions being documented | ||
| * [products.yml](../configure/site/products.md) Defines the product catalog (id, name) and ties it to a specific versioning scheme | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| See [Site Configuration](../configure/site/index.md) for complete details on configuring assembled documentation. | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Important to note that `docs-builder` makes no assumptions about how repositories, products, solutions and versions tie into each other. | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Build process | ||
|
|
||
| The typical build process for assembled documentation: | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. **Clone** - Clone all configured repositories using `docs-builder assembler clone` | ||
| 2. **Build** - Build all documentation sets using `docs-builder assembler build` | ||
| 3. **Serve** - Serve the documentation on http://localhost:4000 using `docs-builder assembler serve` | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This uses the embedded configuration files inside the `docs-builder` binary. To build a specific configuration: | ||
|
|
||
| 1. **Init Config** - Fetch the latest config to `$(pwd)/config` `docs-builder assembler config init --local` | ||
| 2. **Clone** - Clone all configured repositories using `docs-builder assembler clone --local` | ||
| 3. **Build** - Build all documentation sets using `docs-builder assembler build --local` | ||
| 4. **Serve** - Serve the documentation on http://localhost:4000 using `docs-builder assembler serve` | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Related concepts | ||
|
|
||
| * [Documentation Set](documentation-set.md) - The individual units being assembled | ||
| * [Distributed Documentation](distributed-documentation.md) - How documentation sets work independently | ||
| * [Link Catalog](link-catalog.md) - How the assembler knows what to include | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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,63 @@ | ||
| --- | ||
| navigation_title: Distributed Documentation | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | ||
|
|
||
| # Distributed Documentation | ||
|
|
||
| **Distributed documentation** is the architectural approach that allows repositories to build their own documentation independently. | ||
|
|
||
| ## Purpose | ||
|
|
||
| The separation between building individual documentation sets and assembling them enables distributed builds, where: | ||
|
|
||
| * Each repository builds its own documentation independently | ||
| * Builds don't block each other | ||
| * Teams maintain full autonomy over their documentation | ||
| * Cross-repository links are validated without requiring synchronized builds | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## How it works | ||
|
|
||
| ### Link Index publication | ||
|
|
||
| Each time a documentation set is built successfully on its default integration branch, it produces and publishes a `links.json` file ([Link Index](link-index.md)) to a central location ([Link Service](link-service.md)). | ||
|
|
||
| This Link Index contains all the linkable resources in that repository at that specific commit. | ||
|
|
||
| ### Example | ||
|
|
||
| For instance, [Elasticsearch's links.json](https://elastic-docs-link-index.s3.us-east-2.amazonaws.com/elastic/elasticsearch/main/links.json) represents all linkable resources in the Elasticsearch repository's main branch. | ||
|
|
||
| ## Benefits | ||
|
|
||
| This distributed approach provides several key advantages: | ||
|
|
||
| ### Link validation | ||
|
|
||
| * **Outbound links** - Validate links to other repositories ahead of time, even during local `docs-builder` builds | ||
| * **Inbound links** - Know when changes to your documentation would break links from other repositories | ||
|
|
||
| ### Resilient builds | ||
|
|
||
| * **Isolation** - Documentation errors in one repository won't affect builds of other repositories | ||
Mpdreamz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| * **Fallback mechanism** - When a repository has build failures on its integration branch, the assembler falls back to the last known good commit | ||
| * **Snapshot builds** - Assembled builds only use commits that successfully produced a Link Index | ||
|
|
||
| ### Independent iteration | ||
|
|
||
| * Teams can iterate on their documentation independently | ||
| * No coordination required for routine updates | ||
| * Faster feedback loops for documentation changes | ||
|
|
||
| ## Architecture components | ||
|
|
||
| The distributed documentation system relies on several key components: | ||
|
|
||
| * [Link Index](link-index.md) - Per-repository file of linkable resources | ||
| * [Link Service](link-service.md) - Central storage for Link Index files | ||
| * [Link Catalog](link-catalog.md) - Catalog of all available Link Index files | ||
| * [Outbound Crosslinks](outbound-crosslinks.md) - Links from one repository to another | ||
| * [Inbound Crosslinks](inbound-crosslinks.md) - Links from other repositories to yours | ||
|
|
||
| ## Local development | ||
|
|
||
| Even during local development, `docs-builder` can access the [Link Service](link-service.md) to validate cross-repository links without requiring you to clone and build all related repositories. | ||
Oops, something went wrong.
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.