Sourcing Content and Data
A core feature of Gatsby is its ability to load data from anywhere. This is part of what makes Gatsby more powerful than static site generators that are limited to only loading content from Markdown files.
A core benefit of this “data from anywhere” approach is that it allows teams to manage their content in nearly any backend they prefer.
Gatsby uses source plugins to pull in data. Numerous source plugins already exist for pulling in data from other APIs, CMSs, and databases. Each plugin fetches data from their source, meaning the filesystem source plugin knows how to fetch data from the file system, the WordPress plugin knows how to fetch data from the WordPress API, etc. By including multiple source plugins, you can fetch data and combine it all in one data layer.
Bonus: read about Gatsby themes and distributed docs working well together on the Gatsby blog.
(If there isn’t a plugin yet for your favorite option, consider contributing one!)
In this section:
- Using Gatsby Without GraphQL
- Sourcing from the Filesystem
- Sourcing from Databases
- Sourcing from Hosted Services
- Sourcing from Private APIs
- Sourcing from (Headless) CMSs
- Sourcing Content from JSON or YAML
- Refreshing Content