Skip to content

Commit 0bfe134

Browse files
committed
First pass of claude over building blocks
1 parent 8ed7a3b commit 0bfe134

File tree

10 files changed

+658
-42
lines changed

10 files changed

+658
-42
lines changed

docs/_docset.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ toc:
4949
- folder: building-blocks
5050
children:
5151
- file: index.md
52+
- file: documentation-set.md
53+
- file: assembled-documentation.md
54+
- file: distributed-documentation.md
55+
- file: link-service.md
56+
- file: link-index.md
57+
- file: link-registry.md
58+
- file: outbound-crosslinks.md
59+
- file: inbound-crosslinks.md
5260
- folder: configure
5361
children:
5462
- file: index.md
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
navigation_title: Assembled Documentation
3+
---
4+
5+
# Assembled Documentation
6+
7+
**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.
8+
9+
## How it works
10+
11+
The assembler:
12+
13+
1. Clones multiple documentation repositories
14+
2. Builds each documentation set independently
15+
3. Combines them according to a global navigation configuration
16+
4. Produces a unified documentation website
17+
18+
## Benefits
19+
20+
By assembling multiple documentation sets together, you can:
21+
22+
* **Centralize navigation** - Present a unified experience across multiple repositories
23+
* **Cross-link content** - Link between different documentation sets seamlessly
24+
* **Version coordination** - Control which versions of different repositories appear together
25+
* **Product-level organization** - Organize documentation by product rather than repository
26+
27+
## Configuration
28+
29+
Assembled documentation is configured through the site configuration, which defines:
30+
31+
* Which repositories to include
32+
* What versions of each repository to build
33+
* How to organize the global navigation
34+
* URL structure and routing
35+
36+
See [Site Configuration](../configure/site/index.md) for complete details on configuring assembled documentation.
37+
38+
## Build process
39+
40+
The typical build process for assembled documentation:
41+
42+
1. **Clone** - Clone all configured repositories using `docs-builder assembler clone`
43+
2. **Build** - Build all documentation sets using `docs-builder assembler build`
44+
3. **Export** - Export the assembled site in various formats (HTML, Elasticsearch index, etc.)
45+
46+
## Related concepts
47+
48+
* [Documentation Set](documentation-set.md) - The individual units being assembled
49+
* [Distributed Documentation](distributed-documentation.md) - How documentation sets work independently
50+
* [Link Registry](link-registry.md) - How the assembler knows what to include
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
navigation_title: Distributed Documentation
3+
---
4+
5+
# Distributed Documentation
6+
7+
**Distributed documentation** is the architectural approach that allows documentation sets to be built independently while still enabling cross-repository linking and validation.
8+
9+
## Purpose
10+
11+
The separation between building individual documentation sets and assembling them enables distributed builds, where:
12+
13+
* Each repository builds its own documentation independently
14+
* Builds don't block each other
15+
* Teams maintain full autonomy over their documentation
16+
* Cross-repository links are validated without requiring synchronized builds
17+
18+
## How it works
19+
20+
### Link Index publication
21+
22+
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)).
23+
24+
This Link Index contains all the linkable resources in that repository at that specific commit.
25+
26+
### Example
27+
28+
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.
29+
30+
## Benefits
31+
32+
This distributed approach provides several key advantages:
33+
34+
### Link validation
35+
36+
* **Outbound links** - Validate links to other repositories ahead of time, even during local `docs-builder` builds
37+
* **Inbound links** - Know when changes to your documentation would break links from other repositories
38+
39+
### Resilient builds
40+
41+
* **Isolation** - Documentation errors in one repository won't affect builds of other repositories
42+
* **Fallback mechanism** - When a repository has build failures on its integration branch, the assembler falls back to the last known good commit
43+
* **Snapshot builds** - Assembled builds only use commits that successfully produced a Link Index
44+
45+
### Independent iteration
46+
47+
* Teams can iterate on their documentation independently
48+
* No coordination required for routine updates
49+
* Faster feedback loops for documentation changes
50+
51+
## Architecture components
52+
53+
The distributed documentation system relies on several key components:
54+
55+
* [Link Index](link-index.md) - Per-repository file of linkable resources
56+
* [Link Service](link-service.md) - Central storage for Link Index files
57+
* [Link Registry](link-registry.md) - Catalog of all available Link Index files
58+
* [Outbound Crosslinks](outbound-crosslinks.md) - Links from one repository to another
59+
* [Inbound Crosslinks](inbound-crosslinks.md) - Links from other repositories to yours
60+
61+
## Local development
62+
63+
Even during local development, `docs-builder` can access the Link Service to validate cross-repository links without requiring you to clone and build all related repositories.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
navigation_title: Documentation Set
3+
---
4+
5+
# Documentation Set
6+
7+
A **documentation set** is a single folder containing the documentation of a single repository. This is the fundamental unit of documentation in the docs-builder system.
8+
9+
## Minimum requirements
10+
11+
At a minimum, a documentation set folder must contain:
12+
13+
* `docset.yml` - The configuration file that defines the structure and metadata of the documentation set
14+
* `index.md` - The entry point or landing page for the documentation set
15+
16+
## Purpose
17+
18+
Documentation sets allow each repository to maintain its own documentation independently. Each set can be:
19+
20+
* Built independently
21+
* Versioned separately
22+
* Maintained by different teams
23+
* Published to its own schedule
24+
25+
## Structure
26+
27+
A typical documentation set might look like:
28+
29+
```
30+
my-repo/
31+
└── docs/
32+
├── docset.yml
33+
├── index.md
34+
├── getting-started.md
35+
├── configuration/
36+
│ ├── index.md
37+
│ └── advanced.md
38+
└── reference/
39+
└── api.md
40+
```
41+
42+
## Configuration
43+
44+
The `docset.yml` file controls how the documentation set is structured and built. See [Content Set Configuration](../configure/content-set/index.md) for complete configuration details.
45+
46+
## Related concepts
47+
48+
* [Assembled Documentation](assembled-documentation.md) - How multiple documentation sets are combined
49+
* [Link Index](link-index.md) - How documentation sets publish their linkable resources
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
navigation_title: Inbound Crosslinks
3+
---
4+
5+
# Inbound Crosslinks
6+
7+
**Inbound crosslinks** are links from other documentation sets to yours. Understanding and validating inbound crosslinks helps prevent breaking links in other repositories when you make changes.
8+
9+
## Purpose
10+
11+
Inbound crosslink validation allows you to:
12+
13+
* **Detect breaking changes** - Know when renaming or deleting a file will break links from other repositories
14+
* **Prevent regressions** - Avoid publishing changes that break documentation elsewhere
15+
* **Coordinate changes** - Understand dependencies before making structural changes
16+
17+
## How it works
18+
19+
When you build your documentation, `docs-builder` can validate inbound crosslinks by:
20+
21+
1. **Fetching your published Link Index** - Gets your repository's [Link Index](link-index.md) from the [Link Service](link-service.md)
22+
2. **Comparing with local changes** - Compares your current local state with the published Link Index
23+
3. **Detecting differences** - Identifies files that have been moved, renamed, or deleted
24+
4. **Checking references** - Queries the Link Service to see if other repositories link to the changed files
25+
5. **Reporting warnings** - Alerts you to potential breaking changes
26+
27+
## Validation commands
28+
29+
### Validate all inbound links
30+
31+
Check all inbound crosslinks for your repository:
32+
33+
```bash
34+
docs-builder inbound-links validate-all
35+
```
36+
37+
### Validate specific link reference
38+
39+
Validate a locally built `links.json` against all published Link Index files:
40+
41+
```bash
42+
docs-builder inbound-links validate-link-reference --file .artifacts/docs/html/links.json
43+
```
44+
45+
### Validate with filters
46+
47+
Check inbound links from specific repositories or to specific resources:
48+
49+
```bash
50+
docs-builder inbound-links validate --from elasticsearch --to kibana
51+
```
52+
53+
## Common scenarios
54+
55+
### Moving a file
56+
57+
If you move a file that other repositories link to:
58+
59+
1. Create a redirect from the old path to the new path
60+
2. Update your documentation's redirect configuration
61+
3. Run inbound link validation to ensure the redirect works
62+
4. Notify teams that maintain repositories with inbound links
63+
64+
### Deleting a file
65+
66+
Before deleting a file:
67+
68+
1. Run inbound link validation to see if other repositories link to it
69+
2. If there are inbound links, coordinate with those teams first
70+
3. Consider leaving a redirect to related content
71+
4. Update the other repositories to remove or update their links
72+
73+
### Renaming headings
74+
75+
Heading anchors are part of the Link Index. If other repositories link to specific headings in your documentation:
76+
77+
1. Validate inbound links before renaming
78+
2. Consider keeping old heading anchors if heavily linked
79+
3. Document the change if coordination is needed
80+
81+
## Integration with CI/CD
82+
83+
You can integrate inbound link validation into your CI/CD pipeline:
84+
85+
```yaml
86+
- name: Validate inbound links
87+
run: |
88+
docs-builder inbound-links validate-link-reference \
89+
--file .artifacts/docs/html/links.json
90+
```
91+
92+
This will fail the build if you're about to break links from other repositories.
93+
94+
## Best practices
95+
96+
### Set up redirects
97+
98+
When moving or renaming files, always set up redirects:
99+
100+
```yaml
101+
# In your documentation's configuration
102+
redirects:
103+
- from: /old-path/file.html
104+
to: /new-path/file.html
105+
```
106+
107+
### Communicate changes
108+
109+
If you need to make a breaking change:
110+
111+
1. Run inbound link validation to identify affected repositories
112+
2. File issues or notify maintainers of affected repositories
113+
3. Coordinate the change timing
114+
4. Provide redirect mappings or alternative URLs
115+
116+
### Validate before merging
117+
118+
Make inbound link validation part of your review process:
119+
120+
* Run validation locally before creating a PR
121+
* Include validation in CI checks
122+
* Review validation results before merging
123+
124+
## Related concepts
125+
126+
* [Outbound Crosslinks](outbound-crosslinks.md) - Links from your documentation to others
127+
* [Link Index](link-index.md) - How your linkable resources are tracked
128+
* [Link Service](link-service.md) - Where inbound link information is stored
129+
* [Distributed Documentation](distributed-documentation.md) - The architecture enabling this validation

0 commit comments

Comments
 (0)