From 0de0505a739e25cf339a19555eee48211dd6da93 Mon Sep 17 00:00:00 2001 From: Shusaku Uesugi Date: Thu, 11 Jun 2020 11:19:35 -0700 Subject: [PATCH] Remove NEXT_EXAMPLE_CMS_ from prismic locale variable --- examples/cms-prismic/.env.local.example | 2 +- examples/cms-prismic/README.md | 4 ++-- examples/cms-prismic/lib/api.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/cms-prismic/.env.local.example b/examples/cms-prismic/.env.local.example index 43eed166f454a..3e1376e5da4d6 100644 --- a/examples/cms-prismic/.env.local.example +++ b/examples/cms-prismic/.env.local.example @@ -1,3 +1,3 @@ PRISMIC_API_TOKEN= PRISMIC_REPOSITORY_NAME= -NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_LOCALE="en-us" \ No newline at end of file +PRISMIC_REPOSITORY_LOCALE="en-us" \ No newline at end of file diff --git a/examples/cms-prismic/README.md b/examples/cms-prismic/README.md index a976d957fa965..7c0f015e23b89 100644 --- a/examples/cms-prismic/README.md +++ b/examples/cms-prismic/README.md @@ -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. diff --git a/examples/cms-prismic/lib/api.js b/examples/cms-prismic/lib/api.js index 440c398e58ca6..bf4504585ef1a 100644 --- a/examples/cms-prismic/lib/api.js +++ b/examples/cms-prismic/lib/api.js @@ -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,