-
Notifications
You must be signed in to change notification settings - Fork 394
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
Move docs node generation to a local plugin #3113
Conversation
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.
Looks great @rogermparent! Just one small question :)
gatsby-config.js
Outdated
{ | ||
resolve: 'gatsby-theme-iterative-docs', | ||
options: { | ||
docComponent: require.resolve('./src/templates/doc.tsx'), |
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.
Where is the docComponent
being used in the theme? I'm not seeing it being used anywhere 🤔
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.
Whoops! I renamed this to defaultTemplate
in createPages
but didn't end up updating it here.
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.
Everything looks good @rogermparent .
* Move docs node generation to a local plugin * Use pluginOptionsSchema API for defaults * Remove unused import
This PR is a first step in porting our docs engine into a reusable Gatsby theme. It moves all the files from our docs Gatsby Model to a new local plugin at
plugins/gatsby-theme-iterative-docs
.From here, we can continue to move more parts of our docs engine (sidebar, components) to this plugin directory. Once we have everything moved and ensure it still works, we can turn the local plugin folder into its own node module and start work on reintegrating it with the other sites.