Plugins and Themes

Gatsby has a rich ecosystem of drop-in functionality, from CMS integrations to image optimizations.

This section has three parts. First, it covers how to use plugins, which is by far the most common use case. Second, it has documentation on themes, which enable you to modularize and re-use site sections between multiple sites. Third, it provides guides for creating and contributing a plugin to the ecosystem.

 Main Guides 5

How to add a plugin to your site

Like other Node packages, you can install Gatsby plugins using npm or yarn. Then, add it to your `gatsby-config.js` along with values for any options it takes.

How to start a new site with a theme

The quickest way to get started using a Gatsby theme is to use a starter that’s configured to use the theme.

How to use a theme in an existing site

Want to add a theme to an existing Gatsby site? No problem! Themes can be installed and configured like other plugins.

How to create a generic plugin

This guide explains the structure of a Gatsby plugin and the files you need to create one.

How to create a source plugin

There are currently over 500 source plugins -- basically, integrations between third-party sources (like CMSs) and Gatsby. If you need to integrate with a data source that isn't covered, or improve an existing integration, this guide will help.

 Additional Guides 10

  • Naming a Plugin
  • Creating a Transformer Plugin
  • Configuring Usage with Plugin Options
  • Submit to Plugin Library
  • Maintaining a Plugin
  • Create a theme
  • Converting a starter to a theme
  • Shadowing components in a Gatsby theme
  • Theme Composition
  • Theme Conventions