Skip to content

Commit

Permalink
Merge pull request #204 from schabibi1/master
Browse files Browse the repository at this point in the history
docs: add cn region param in README
  • Loading branch information
schabibi1 authored Mar 31, 2023
2 parents b960ab9 + 8f20b7b commit 4002327
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ npm install gatsby-source-storyblok

### Initialization

Register the plugin on your application and add the [access token](https://www.storyblok.com/docs/api/content-delivery#topics/authentication?utm_source=github.com&utm_medium=readme&utm_campaign=gatsby-source-storyblok) of your Storyblok space. You can also add the `apiPlugin` in case that you want to use the Storyblok API Client: For Spaces created under US region, you should pass the region like { apiOptions: { region: 'us' } }. If your space is under EU, no further configuration is required.
Register the plugin on your application and add the [access token](https://www.storyblok.com/docs/api/content-delivery#topics/authentication?utm_source=github.com&utm_medium=readme&utm_campaign=gatsby-source-storyblok) of your Storyblok space. You can also add the `apiPlugin` in case that you want to use the Storyblok API Client.

> You need to declare the plugin use and its options in `gatsby-config.js`
Expand Down Expand Up @@ -97,6 +97,24 @@ That's it! All the features are enabled for you: the _Api Client_ for interactin

> You can enable/disable some of these features if you don't need them, so you save some KB. Please read the "Features and API" section
#### Region parameter

Possible values:
- `eu` (default): For spaces created in EU
- `us` : For spaces created in the US
- `cn` : For spaces created in China

Full example for a space created in the US:

```javascript
storyblokInit({
accessToken: "<your-access-token>",
apiOptions: {
region: 'us'
},
});
```

### Getting Started

`gatsby-source-storyblok` does three actions when you initialize it:
Expand Down Expand Up @@ -668,6 +686,10 @@ allStoryblokLinkEntry {
}
```

## The Storyblok JavaScript SDK Ecosystem

![A visual representation of the Storyblok JavaScript SDK Ecosystem](https://a.storyblok.com/f/88751/2400x1350/be4a4a4180/sdk-ecosystem.png/m/1200x0)

## 🔗 Related Links

- **[Storyblok Gatsby.js Technology Hub](https://www.storyblok.com/tc/gatsbyjs)**: Learn how to develop your own Gatsby.js applications that use Storyblok APIs to retrieve and manage content.
Expand Down

0 comments on commit 4002327

Please sign in to comment.