elastic / elastic/docs-builder

[Feature Request]: Allow including code samples across repos

Open
#712 1 comment 0 reactions 0 assignees View on GitHub
ai-triaged ai:eng-question ai:writer-question enhancement
Dominant language
C#
Stars
24
Forks
44
Avg merge
1d 7h
Merged PRs (30d)
146

Description

### Prerequisites

- [x] I have searched existing issues to ensure this feature hasn't already been requested
- [x] I have tested using the latest version of docs-builder

### What problem are you trying to solve?

This might be a unique use case, but in the past the APM docs we stored some sample code in the elastic/apm-server repo where engineers generate and maintain the files ([example](https://github.com/elastic/apm-server/blob/main/docs/data/elasticsearch/generated/spans.json)) and included them in the narrative content ([example](https://www.elastic.co/guide/en/observability/current/apm-data-model-spans.html#_example_span_document)).

### Proposed Solution

There are a few ways we could address this (some within docs-builder and others outside it):

* Allow cross-repo [file inclusion](https://elastic.github.io/docs-builder/syntax/file_inclusion/).
* Use GitHub actions to sync the apm-server files with copies of the files in docs-content.
* Remove the snippets from the docs in these cases and just add a link to the GitHub page.

### Examples and Research

_No response_

### Alternative Solutions

_No response_

### Additional Context

_No response_

### How important is this feature to you?

Nice to have

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.