-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snippet templates example #57
base: main
Are you sure you want to change the base?
Conversation
|
||
experimental: | ||
mdx-components: | ||
- ./docs/snippets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is required at the moment for ESM imports to discover these files
|
||
Below are 2 code snippets that are templated using the `code-template` mdx-based component. | ||
|
||
<Template title="Example 1" components={props.components}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the moment there's a bug where components={props.components}
need to be passed in explicitly. We'll need to fix this on our side so it's handled automatically.
This PR demonstrates the capability of MDX-based templates inside of Fern Docs.
View preview here: https://plantstore-preview-4060c464-0483-462b-8ff9-fb872582f36a.docs.buildwithfern.com/get-started/snippet-templates
This example should be cleaned up a bit before merging.