elastic / elastic/docs-builder
[Feature Request]: Allow including code samples across repos
- 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
Assessment
This issue has not been assessed yet.