|
| 1 | +--- |
| 2 | +navigation_title: Building Blocks |
| 3 | +--- |
| 4 | + |
| 5 | +# Building Blocks |
| 6 | + |
| 7 | +This section explains all the building blocks that are used to build the documentation. |
| 8 | + |
| 9 | +## Documentation Set |
| 10 | + |
| 11 | +A single folder containing the documentation of a single repository. At a minimum, this folder should contain: |
| 12 | + |
| 13 | +* `docset.yml` file |
| 14 | +* `index.md` file |
| 15 | + |
| 16 | +See [docset.yml](../configure/content-set/index.md) for more configuration details. |
| 17 | + |
| 18 | +## Assembled Documentation |
| 19 | + |
| 20 | +The product of building many documentation sets and weaving them in to a global navigation producing the fully assembled documentation site. |
| 21 | + |
| 22 | +See [site configuration](../configure/site/index.md) for more details on the actual configuration. |
| 23 | + |
| 24 | +## Distributed documentation |
| 25 | + |
| 26 | +The purpose of separating building documentation sets and assembling them is to allow for distributed builds. |
| 27 | + |
| 28 | +Each build of documentation set produces a `links.json` (Link Index) file that contains all the linkable resources in the repository. |
| 29 | +This `links.json` file is then published to a central location (Link Service) everytime a repository successfully builds on its respective default integration branch. |
| 30 | + |
| 31 | +For example, [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. |
| 32 | + |
| 33 | +This allows us to: |
| 34 | + |
| 35 | +* Validate outbound and inbound links ahead of time, even during local `docs-builder` builds. |
| 36 | +* Snapshot assembled builds: only building commits that produced a `links.json` |
| 37 | + * Documentation errors in one repository won't affect all the others. |
| 38 | + * Resilient to repositories having build failures on their integration branches, we fall back to the last known good commit. |
| 39 | + |
| 40 | +## Link Service |
| 41 | + |
| 42 | +The central location where all the Link Index files are published. This is a simple S3 bucket fronted by CloudFront. |
| 43 | + |
| 44 | +## Link Index |
| 45 | + |
| 46 | +Each repository's branch will get in individual Link Index file in the `Link Serve` representing all linkable resources of that repository's branch. |
| 47 | +See, for example: [Elasticsearch's links.json](https://elastic-docs-link-index.s3.us-east-2.amazonaws.com/elastic/elasticsearch/main/links.json). |
| 48 | +This file is used to resolve [Outbound Crosslinks](#outbound-crosslinks) and [Inbound Crosslinks](#inbound-crosslinks). |
| 49 | + |
| 50 | +## Link Registry |
| 51 | + |
| 52 | +A [single file](https://elastic-docs-link-index.s3.us-east-2.amazonaws.com/link-index.json) that contains all the [Link Index files](#link-index) for all the repositories. |
| 53 | +This is file is published everytime [Link Index](#link-index) files are published to the Link Service. The update is handled by an AWS Lambda function that listens to SQS triggers by S3 events. |
| 54 | + |
| 55 | +## Outbound Crosslinks |
| 56 | + |
| 57 | +Outbound crosslinks are links from the documentation set that's being built to others. If both repositories publish to the same `Link Service`, they can link to each other using the `<repository>://<path_to_md>` syntax. |
| 58 | + |
| 59 | +Read more about general link syntax in the [](../syntax/links.md) section. |
| 60 | + |
| 61 | +## Inbound Crosslinks |
| 62 | + |
| 63 | +Inbound crosslinks are links from other documentation sets to the one that's being built. |
| 64 | + |
| 65 | +If both repositories publish to the same `Link Service`, they can link to each other using the `<repository>://<path_to_md>` syntax. |
| 66 | + |
| 67 | +Read more about general link syntax in the [](../syntax/links.md) section. |
| 68 | + |
| 69 | +Using our [Link Service](#link-service), we can validate if deletions or renames of files in the documentation set break other repositories ahead of time. |
0 commit comments