Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(gatsby-source-contentful): add locale filter #12939

Merged
merged 10 commits into from
Apr 16, 2019
6 changes: 6 additions & 0 deletions packages/gatsby-source-contentful/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ Downloads and caches `ContentfulAsset`'s to the local filesystem. Allows you to

You can pass in any other options available in the [contentful.js SDK](https://github.com/contentful/contentful.js#configuration).

**`localeFilter`** [function][optional] [default: `() => true`]

Possibility to limit how many locales/nodes are created in graphQL. This can limit the memory usage by reducing the amout of nodes created. Useful if you have a large space in contentful and only want to get the data from one selected locale.

For example, to filter locales on only germany `localeFilter: locale => locale.code === 'de-DE'`

## Notes on Contentful Content Models

There are currently some things to keep in mind when building your content models at Contentful.
Expand Down
Loading