-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
docs: add new guide and example site on plugin options #21708
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.
Awesome work as always Kyle! Some suggestions/questions below. Let me know what you think.
Co-Authored-By: LB <[email protected]>
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.
Ran this locally and works great! Had a suggestion for clarifying the README and what is happening in this example. Let me know what you think.
Co-Authored-By: LB <[email protected]>
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.
Just realized something! Is it worth adding a section that explains how a plugin with available options unconfigured (i.e. using only the defaults) can be installed as `gatsby-whatever-plugin`, where as using those defaults makes it the object version with the options array?
Wondering if showing that comparison will help people realize that the use of options is what dictates how the plugin is configured rather than the plugin itself.
Does that make sense?
@laurieontech not sure I understand entirely 🤔 Do you mean showing how plugins are installed like this doc: https://www.gatsbyjs.org/docs/using-a-plugin-in-your-site/ ?? Or do you mean showing something in the plugin's code about how defaults are used? |
🤦🏻♀️nevermind, just remembered this is geared towards authors and not users. Ignore me! Going to merge now. |
Description
These changes go along with the workflow improvements in #20232 for updating docs on authoring plugins. There wasn't any sort of guide that was geared towards using plugin options (this was pointed out to me by plugin authors I asked about writing their first plugins).
This adds a new page to the plugin section of the reference guides for configuring plugin usage with plugin options and adds an example site demonstrating the code in the guide.
Screenshot
View Screenshot
Related Issues
Related to #20232