This episode breaks down the Gatsby plugin and theme ecosystem: how plugins work and their types, the install and configuration process with options, building reusable themes, and best practices for plugin ordering and their impact on build performance.

One reason Gatsby is so productive is its vast ecosystem of plugins and themes. Instead of writing features from scratch, you install battle-tested packages and configure them to fit your needs.
Episode 7 breaks down how plugins work, the install-and-configure pattern with options, the concept of themes as reusable bundles of plugins, and why plugin ordering matters for your build output.
Gatsby plugins fall into three main categories:
gatsby-source-filesystem and gatsby-source-contentful.gatsby-transformer-remark and gatsby-transformer-sharp.gatsby-plugin-image, gatsby-plugin-sitemap, and gatsby-plugin-offline.Thousands of plugins are available in the official Gatsby Plugin Library. Before writing code yourself, always check whether the plugin you need already exists — this habit saves hours of work.
Installation is just like any regular npm package:
npm install gatsby-plugin-sitemap gatsby-plugin-robots-txtPlugins can be registered as a simple string or as an object with options:
module.exports = {
plugins: [
"gatsby-plugin-image",
{
resolve: "gatsby-plugin-sitemap",
options: {
query: `
{
allSitePage {
nodes {
path
}
}
}
`,
},
},
],
}The string form "gatsby-plugin-image" is equivalent to resolve without options. When a plugin needs settings, use an object with the resolve and options properties. The gatsby-plugin-sitemap above generates a sitemap.xml from the list of queried pages.
A theme is a bundle of plugins, components, and data wrapped into a single reusable package. You can build your own theme and then use it like a regular plugin:
gatsby new theme-blog-gatsby https://github.com/gatsbyjs/gatsby-starter-theme-workspaceThe theme-workspace starter provides two folders: the theme itself and an example site that uses it. This structure makes it easy to develop while seeing the results immediately.
A theme is activated through the plugins array, and its options can be customized per usage:
module.exports = {
plugins: [
{
resolve: "gatsby-theme-blog",
options: {
basePath: "/blog",
contentPath: "content/posts",
},
},
],
}basePath: "/blog" determines the URL where the theme's content appears, and contentPath determines the folder where you write content. Theme users don't need to know the internal details — just configure the options.
Themes let a team or organization share design and functionality across projects. You can shadow theme files (override specific components) without rewriting everything — flexibility that's rare in other frameworks.
The order of plugins in the plugins array can affect the result. Two common rules of thumb:
gatsby-plugin-manifest before gatsby-plugin-offline.If in doubt, follow each plugin's official install guide — the recommended order has been tested by the maintainers.
Every plugin adds work during the build. Don't pile up plugins you don't use. Plugins with a large runtime can slow down the build and bloat the bundle; audit regularly which plugins are actually being used. gatsby build --verbose can help you see which processes are running.
Episode 7 opened the door to the Gatsby ecosystem: plugin types, the install-and-configure pattern, creating and using themes, and best practices for plugin ordering.
Key takeaways:
basePath and contentPath.In the next episode, episode 8, we enter the workloads phase: configuration and environment — gatsby-config and gatsby-node, environment variables, source and transformer plugins, data schema customization, and managing secrets at build time.