Link catalog
The Link Catalog is a single JSON file that serves as a catalog of all available Link Index files across all repositories.
The Link Catalog provides:
- Discovery: A single file to query for all available documentation across all repositories and branches.
- Efficiency: Avoid scanning the entire Link Service to find available Link Index files.
- Assembler coordination: The assembler uses this to determine which repositories and versions are available to build.
The Link Catalog is available at:
https://elastic-docs-link-index.s3.us-east-2.amazonaws.com/link-index.json
The Link Catalog contains:
- List of all organizations (e.g.,
elastic
). - Repositories within each organization (e.g.,
elasticsearch
,kibana
). - Branches for each repository (e.g.,
main
,8.x
,7.17
). - Metadata about each Link Index:
- Last updated timestamp.
- Commit SHA that produced the Link Index.
- ETAG of the Link Index file.
- URL to the Link Index file.
The Link Catalog is automatically maintained:
- A repository's CI/CD pipeline publishes a new
links.json
to the Link Service - The S3 bucket triggers an SQS message
- An AWS Lambda function listens to these SQS messages
- The Lambda function updates the Link Catalog to include or update the entry for the new Link Index
This process ensures the catalog stays in sync with published Link Index files without manual intervention.
When running docs-builder assembler clone
or docs-builder assembler build
:
- The assembler fetches the Link Catalog
- It determines which repositories and versions to clone/build based on the site configuration
- It uses the commit SHAs from the catalog to clone specific versions
During a documentation build:
docs-builder
fetches the Link Catalog- It determines which Link Index files to download for cross-repository validation
- It validates all cross-links against the appropriate Link Index files
- Single source of truth: One file to check for all available documentation.
- Performance: Fast lookup without scanning the entire Link Service.
- Automation: Maintained automatically via Lambda functions.
- Resilience: Represents only successful builds with valid Link Indexes.
- Link Service - Where the Link Catalog is stored.
- Link Index - The files cataloged by the Link Catalog.
- Assembled Documentation - Uses the Link Catalog to coordinate builds.