Skip to content
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

Add tutorial page for creating a generic plugin #20527

Closed
pvdz opened this issue Jan 10, 2020 · 9 comments
Closed

Add tutorial page for creating a generic plugin #20527

pvdz opened this issue Jan 10, 2020 · 9 comments
Assignees
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation

Comments

@pvdz
Copy link
Contributor

pvdz commented Jan 10, 2020

Summary

I was starting myself to create a plugin and trying to find a tutorial on this and couldn't even find it on our own page. (Algolia search did not help).

We do have https://www.gatsbyjs.org/docs/creating-plugins/ which is very helpful and sufficient for me to get started. Yet it would be nice to have an actual tutorial on how to create a new Gatsby plugin.

Having a plugin tutorial in the actual tutorial tab also helps with discoverability of this topic.

Motivation

Improve discoverability of how to create a plugin

@gatsbot gatsbot bot added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Jan 10, 2020
@srs231198
Copy link

So do you need someone to create a simple plugin and document that process?

@pvdz
Copy link
Contributor Author

pvdz commented Jan 13, 2020

This was in response to an internal discussion on how the tutorial page on our website currently has no tutorial for making a generic plugin. And once you're stuck on the tutorial tab it's rather difficult to find the page, if you assume docs won't have the "tutorial" you're looking for.

I'm actually not sure what the best way is while preventing duplication. @laurieontech, thoughts on this?

@laurieontech
Copy link
Contributor

The idea is indeed to create a simple plugin and document the process! However, I think @Ekwuno has started on this? If you have Obinna, can you assign this to yourself? If not, let @srs231198 know so he can work on it :)

@marcysutton marcysutton changed the title Add tutorial page for creating a plugin Add tutorial page for creating a generic plugin Jan 22, 2020
@marcysutton
Copy link
Contributor

marcysutton commented Jan 22, 2020

Some things to add:

  • Some clarity on what you'd consider a good use case for a generic plugin would help. How does this differ from a source plugin? Why would someone want to create a generic plugin?
  • There are issues for source plugin learning materials already underway: Starter for creating source plugins #8697 and [docs][tutorial] building a source plugin tutorial #16095
  • We previously didn't publish plugin authoring in the tutorials section to provide a distinction between "building with" and "building for", as these are often different audiences. But I can also see that the Building a Theme tutorial blurs those boundaries a bit, so I wouldn't hold up additional tutorials from being added if that feels like the most appropriate format and place for it.
  • Refer to docs templates for format suggestions, i.e. what is a reference guide vs. a tutorial. We should be intentional about format as we fill in coverage of various topics: what is needed most? https://www.gatsbyjs.org/contributing/docs-templates/

@pvdz
Copy link
Contributor Author

pvdz commented Jan 27, 2020

The main thing I tried to surface was discoverability. If you end up on the tutorial tab before the docs tab then you're not likely to find what you want if you're looking to create a plugin. A "source plugin" is terminology that may not mean anything to somebody.

As for my case, I wasn't looking to create a plugin for sourcing (which I'd assume to have different API's, why else make the distinction at all) but for gathering stats by hooking into the build life cycle.

Search for "create plugin" on the tutorial page and you'll not find the page that is present in the docs section. Would have helped me at the time if it somehow popped up. I'm not sure what needs to be done to make that happen, if nothing else.

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Feb 17, 2020
@laurieontech laurieontech removed the stale? Issue that may be closed soon due to the original author not responding any more. label Feb 18, 2020
@Ekwuno Ekwuno self-assigned this Feb 18, 2020
@marcysutton
Copy link
Contributor

I'm so glad you surfaced this, @pvdz. I do think a new guide or tutorial on Creating a Generic Plugin would be useful, and your suggestion of hooking into lifecycle events seems like good material. But if you have other generic plugin ideas–especially super simple ones–let us know! @Ekwuno, let's discuss the format as either a guide or tutorial would work.

@pvdz
Copy link
Contributor Author

pvdz commented Mar 11, 2020

@marcysutton I had a call with @Ekwuno about this last week. I have no strong preference about the followup. And between when I reported it and now, I think something has changed / improved that partially-if-not-completely resolves my initial issue. I trust he'll do what's best here and this issue can be closed after that as far as I'm concerned.

@Ekwuno
Copy link
Contributor

Ekwuno commented Mar 13, 2020

I created the first draft of PR #21961 to close this issue. I still need to add more context as reviewed by Laurie. We should get this wrapped up soon. Thanks for the input @pvdz 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

No branches or pull requests

5 participants