Skip to content

[docs] Improve documentation for plugin authors #4266

@jlengstorf

Description

@jlengstorf

Currently, the documentation for plugin authors is pretty sparse. On the contributing page, there's a single paragraph, and the plugins section of the docs is super high-level.

What I'm proposing in the short term

The docs should be updated to:

  • Explain naming conventions for plugins (e.g. when should I use gatsby-plugin-* vs gatsby-transformer-*?)
  • Explicitly explain what files can be contained in a plugin, and which APIs are available to plugins
  • Create a boilerplate to create a consistent Gatsby plugin README experience

What I'm proposing in the medium term

  • Write tutorials for each of the plugin types to show real examples of using the plugin APIs
  • Add video tutorials to complement the written versions
  • Find a way to work plugin documentation into the new plugins page being created in Plugin Library build fixes #3906

What I'm proposing in the long term

  • Add a CLI tool that asks a few questions about the plugin you want to create and sets you up with the proper boilerplate
  • Add plugin validation to ensure that a plugin is compatible with your Gatsby install (e.g. no conflicts, versions are compatible)

Did I miss anything here? I can get started on the short-term updates right away — would love to get any feedback from other folks who've written plugins:

  • where did you get stuck?
  • what questions did you have trouble finding answers to?
  • how could Gatsby's docs make the plugin authoring experience more friendly?

This may need to be pulled into a project — "Improve the Plugin Discovery and Authoring Experience" — or maybe we can solve it all in a few issues.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: documentationAn issue or pull request for improving or updating Gatsby's documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions