FullSnippet
This component allows you to pull an entire file from a public Github repository to be displayed as code within a page.
It takes a source
attribute which must be from the raw.githubsercontent.com
API.
To use the component, the page must be in .mdx
format. Change the format from .md
to .mdx
if necessary. All your existing markdown will still be supported without issue.
Usage
Import the FullSnippet
component like so:
Use the <FullSnippet>
component within your content like so:
Working example
There’s no working example at the moment.
This component was created to pull in GitHub files before the ChunkedSnippet component existed. ChunkedSnippet negated the need for us to use this component for our particular use case; however, it still exists and can be used as needed.