Skip to content

Commit

Permalink
Remove NEXT_EXAMPLE_CMS_ from prismic locale variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chibicode committed Jun 11, 2020
1 parent 862441f commit 0de0505
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/cms-prismic/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PRISMIC_API_TOKEN=
PRISMIC_REPOSITORY_NAME=
NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_LOCALE="en-us"
PRISMIC_REPOSITORY_LOCALE="en-us"
4 changes: 2 additions & 2 deletions examples/cms-prismic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ Then set each variable on `.env.local`:

- `PRISMIC_API_TOKEN` should be the **Permanent access token** you just created
- `PRISMIC_REPOSITORY_NAME` is the name of your repository (the one in the URL)
- `NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_LOCALE` is the locale of your repository. Defaults to `en-us`
- `PRISMIC_REPOSITORY_LOCALE` is the locale of your repository. Defaults to `en-us`

Your `.env.local` file should look like this:

```bash
PRISMIC_API_TOKEN=...
PRISMIC_REPOSITORY_NAME=...
NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_LOCALE=...
PRISMIC_REPOSITORY_LOCALE=...
```

Make sure the locale matches your settings in the Prismic dashboard.
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-prismic/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const REF_API_URL = `https://${REPOSITORY}.prismic.io/api/v2`
const GRAPHQL_API_URL = `https://${REPOSITORY}.prismic.io/graphql`
// export const API_URL = 'https://your-repo-name.cdn.prismic.io/api/v2'
export const API_TOKEN = process.env.PRISMIC_API_TOKEN
export const API_LOCALE = process.env.NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_LOCALE
export const API_LOCALE = process.env.PRISMIC_REPOSITORY_LOCALE

export const PrismicClient = Prismic.client(REF_API_URL, {
accessToken: API_TOKEN,
Expand Down

0 comments on commit 0de0505

Please sign in to comment.