You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import Code Snippets support is great, but from what I have seen in the docs and related issues fetching the snippet file from external sources is not supported. It would be great if this could be extended to import code snippets from files within other repos (or if I have missed something update the docs with an example of this).
What problem does this feature solve?
If I have a docs sites at orgname/docs-site-repo and examples at orgname/examples-repo I could then import snippets from my examples repo into the docs-site repo and not need to maintain two sets of the same code.
This would also allow reusing existing code samples.
What does the proposed API look like?
# local files
<<< @/filepath{highlightLines}
# external files
<<< https://url/file.extension{highlightLines}
How should this be implemented in your opinion?
The existing API would need to support the import string starting with https and a Promise return value so it can fetch.
Are you willing to work on this yourself?
I could certainly help, but am unsure where to start given the number of open issues wanting to change this functionality.
Feature request
Import Code Snippets support is great, but from what I have seen in the docs and related issues fetching the snippet file from external sources is not supported. It would be great if this could be extended to import code snippets from files within other repos (or if I have missed something update the docs with an example of this).
What problem does this feature solve?
If I have a docs sites at
orgname/docs-site-repo
and examples atorgname/examples-repo
I could then import snippets from my examples repo into the docs-site repo and not need to maintain two sets of the same code.This would also allow reusing existing code samples.
What does the proposed API look like?
How should this be implemented in your opinion?
The existing API would need to support the import string starting with
https
and a Promise return value so it can fetch.Are you willing to work on this yourself?
I could certainly help, but am unsure where to start given the number of open issues wanting to change this functionality.
related:
additionally
I believe #750 is adding support for code-fencing, which is highly desired 👍
The text was updated successfully, but these errors were encountered: