language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | vercel | next.js | 42c309ad3771a4c77acb4a2dca539d8935eff51f.json | fix csp errors in with-strict-csp-app example (#14262)
Added proper content security policies in the dev environment
fixes: #14221 | examples/with-strict-csp/pages/_document.js | @@ -6,12 +6,16 @@ const cspHashOf = (text) => {
hash.update(text)
return `'sha256-${hash.digest('base64')}'`
}
-
export default class MyDocument extends Document {
render() {
- const csp = `default-src 'self'; script-src 'self' ${cspHashOf(
+ let csp = `default-src 'self'; script-src 'self' ${cspHashOf... | false |
Other | vercel | next.js | e87b739f335dad7b6f032c95a61f9aaa21ec667d.json | fix typo in fast refresh documentation (#14296) | docs/basic-features/fast-refresh.md | @@ -6,7 +6,7 @@ description:
# Fast Refresh
-Fast Refresh is a Next.js feature that that gives you instantaneous feedback on
+Fast Refresh is a Next.js feature that gives you instantaneous feedback on
edits made to your React components. Fast Refresh is enabled by default in all
Next.js applications on **9.4 or ... | false |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | packages/next/build/index.ts | @@ -289,7 +289,7 @@ export default async function build(dir: string, conf = null): Promise<void> {
const routesManifestPath = path.join(distDir, ROUTES_MANIFEST)
const routesManifest: any = {
- version: 1,
+ version: 3,
pages404: true,
basePath: config.experimental.basePath,
redirects: redi... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | packages/next/next-server/lib/router/utils/route-regex.ts | @@ -9,6 +9,7 @@ export function getRouteRegex(
): {
re: RegExp
namedRegex?: string
+ routeKeys?: { [named: string]: string }
groups: {
[groupName: string]: { pos: number; repeat: boolean; optional: boolean }
}
@@ -47,6 +48,8 @@ export function getRouteRegex(
// dead code eliminate for browser sinc... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | packages/next/next-server/lib/router/utils/sorted-routes.ts | @@ -127,11 +127,19 @@ class UrlNode {
}
}
- if (slugNames.indexOf(nextSlug) !== -1) {
- throw new Error(
- `You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`
- )
- }
+ slugNames.forEach((slug) => {
+ if ... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/integration/custom-routes/test/index.test.js | @@ -491,7 +491,7 @@ const runTests = (isDev = false) => {
}
expect(manifest).toEqual({
- version: 1,
+ version: 3,
pages404: true,
basePath: '',
redirects: [
@@ -872,19 +872,25 @@ const runTests = (isDev = false) => {
namedRegex: '^/another/(?<id>[^/... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/integration/dynamic-routing/pages/catchall-dash/[...hello-world].js | @@ -0,0 +1 @@
+export default () => 'hi' | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/integration/dynamic-routing/pages/dash/[hello-world].js | @@ -0,0 +1 @@
+export default () => 'hi' | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/integration/dynamic-routing/test/index.test.js | @@ -515,14 +515,22 @@ function runTests(dev) {
for (const route of manifest.dynamicRoutes) {
route.regex = normalizeRegEx(route.regex)
+
+ // ensure regexes are valid
+ new RegExp(route.regex)
+ new RegExp(route.namedRegex)
}
for (const route of manifest.dataRoutes... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/integration/getserversideprops/test/index.test.js | @@ -55,7 +55,9 @@ const expectedManifestRoutes = () => [
`^\\/_next\\/data\\/${escapeRegex(buildId)}\\/blog\\/([^\\/]+?)\\.json$`
),
page: '/blog/[post]',
- routeKeys: ['post'],
+ routeKeys: {
+ post: 'post',
+ },
},
{
namedDataRouteRegex: `^/_next/data/${escapeRegex(
@@ -67,7 ... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/integration/prerender/test/index.test.js | @@ -860,7 +860,9 @@ const runTests = (dev = false, isEmulatedServerless = false) => {
)}\\/blog\\/([^\\/]+?)\\.json$`
),
page: '/blog/[post]',
- routeKeys: ['post'],
+ routeKeys: {
+ post: 'post',
+ },
},
{
namedDataRo... | true |
Other | vercel | next.js | 08d7755e68ceda8f599a8f1a799aeab2fd8f7e86.json | Update routeKeys to handle non-word characters (#12801)
This updates the named regexes output in the `routes-manifest` and the associated `routeKeys` to not use any non-word characters as this breaks the named regexes e.g. `"Invalid regular expression: "^/(?<data\-provider\-id>[^/]+?)(?:/)?$"`
x-ref: https://github.c... | test/unit/page-route-sorter.test.js | @@ -204,4 +204,13 @@ describe('getSortedRoutes', () => {
`"You cannot define a route with the same specificity as a optional catch-all route (\\"/sub\\" and \\"/sub[[...all]]\\")."`
)
})
+
+ it('catches param names differing only by non-word characters', () => {
+ expect(() =>
+ getSortedRoutes(... | true |
Other | vercel | next.js | 725376a9d759608f95749026bb0a473af0709eff.json | Fix GraphQL Hooks Example Safari bug (#14205)
Fixes #14187, where the [GraphQL Hooks Example](https://github.com/vercel/next.js/tree/canary/examples/with-graphql-hooks), when opened in Safari, doesn't respond to events in production and doesn't load at all in the dev server.
This is caused by [a bug in graphql-hooks-... | examples/with-graphql-hooks/package.json | @@ -9,7 +9,7 @@
"license": "ISC",
"dependencies": {
"graphql-hooks": "^4.4.4",
- "graphql-hooks-memcache": "^1.3.2",
+ "graphql-hooks-memcache": "1.3.1 || ^1.3.3",
"next": "latest",
"prop-types": "^15.7.2",
"react": "^16.8.2", | false |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/build/index.ts | @@ -73,7 +73,7 @@ import {
import getBaseWebpackConfig from './webpack-config'
import { PagesManifest } from './webpack/plugins/pages-manifest-plugin'
import { writeBuildId } from './write-build-id'
-
+import { getPagePath } from '../next-server/server/require'
const staticCheckWorker = require.resolve('./utils')
... | true |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/build/utils.ts | @@ -50,7 +50,6 @@ export interface PageInfo {
isSsg: boolean
ssgPageRoutes: string[] | null
hasSsgFallback: boolean
- serverBundle: string
}
export async function printTreeView( | true |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/export/index.ts | @@ -388,7 +388,6 @@ export default async function exportApp(
path,
pathMap: exportPathMap[path],
distDir,
- buildId,
outDir,
pagesDataDir,
renderOpts, | true |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/export/worker.ts | @@ -33,11 +33,10 @@ interface PathMap {
query?: { [key: string]: string | string[] }
}
-interface ExortPageInput {
+interface ExportPageInput {
path: string
pathMap: PathMap
distDir: string
- buildId: string
outDir: string
pagesDataDir: string
renderOpts: RenderOpts
@@ -72,15 +71,14 @@ export d... | true |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/next-server/server/load-components.ts | @@ -1,9 +1,4 @@
-import {
- BUILD_MANIFEST,
- CLIENT_STATIC_FILES_PATH,
- REACT_LOADABLE_MANIFEST,
- SERVER_DIRECTORY,
-} from '../lib/constants'
+import { BUILD_MANIFEST, REACT_LOADABLE_MANIFEST } from '../lib/constants'
import { join } from 'path'
import { requirePage } from './require'
import { BuildManifest ... | true |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/next-server/server/next-server.ts | @@ -865,7 +865,6 @@ export default class Server {
try {
const components = await loadComponents(
this.distDir,
- this.buildId,
pagePath!,
!this.renderOpts.dev && this._isLikeServerless
)
@@ -909,7 +908,6 @@ export default class Server {
const __g... | true |
Other | vercel | next.js | ea6b8dac4028ae950ee2d913802662101cc56205.json | use requirePage for /_document and /_app (#14176) | packages/next/server/static-paths-worker.ts | @@ -9,7 +9,6 @@ let workerWasUsed = false
// during a production build
export async function loadStaticPaths(
distDir: string,
- buildId: string,
pathname: string,
serverless: boolean
) {
@@ -19,12 +18,7 @@ export async function loadStaticPaths(
process.exit(1)
}
- const components = await loadC... | true |
Other | vercel | next.js | 66778c7ab0683ee5e7686a5067c4eff1825e3540.json | chore: add retry method to loadable types (#14152) | packages/next/next-server/lib/dynamic.tsx | @@ -25,6 +25,7 @@ export type LoadableBaseOptions<P = {}> = LoadableGeneratedOptions & {
error?: Error | null
isLoading?: boolean
pastDelay?: boolean
+ retry?: () => void
timedOut?: boolean
}) => JSX.Element | null
loader?: Loader<P> | LoaderMap | false |
Other | vercel | next.js | eef40c5948acf84ef3432016a9948fb1331500d5.json | update AMP Optimizer to v2.5.3 (#14173) | packages/next/package.json | @@ -58,7 +58,7 @@
]
},
"dependencies": {
- "@ampproject/toolbox-optimizer": "2.5.2",
+ "@ampproject/toolbox-optimizer": "2.5.3",
"@babel/code-frame": "7.8.3",
"@babel/core": "7.7.7",
"@babel/plugin-proposal-class-properties": "7.8.3", | true |
Other | vercel | next.js | eef40c5948acf84ef3432016a9948fb1331500d5.json | update AMP Optimizer to v2.5.3 (#14173) | yarn.lock | @@ -10,10 +10,10 @@
cross-fetch "3.0.4"
lru-cache "5.1.1"
-"@ampproject/toolbox-optimizer@2.5.2":
- version "2.5.2"
- resolved "https://registry.yarnpkg.com/@ampproject/toolbox-optimizer/-/toolbox-optimizer-2.5.2.tgz#17085463255d96a81606803c4bf5d1f1414cfc17"
- integrity sha512-hDvDgAMTHUnye2Y7WhoF+6MtgOl... | true |
Other | vercel | next.js | 05f61b22adb4d7d636bbaad531cb6eb2ff5fc391.json | Fix broken link (#14158) | examples/ssr-caching/README.md | @@ -3,7 +3,7 @@
React Server Side rendering is very costly and takes a lot of server's CPU power for that. One of the best solutions for this problem is cache already rendered pages.
That's what this example demonstrate.
-This app uses Next's [custom server and routing](https://github.com/vercel/next.js#custom-serv... | false |
Other | vercel | next.js | 10fda8a9b9cb40ecec52ea9180fd1c78e52eeaad.json | Update stats action for running locally (#14143)
Noticed a few things that could be updated to make running the stats locally better e.g. if the folder name didn't match the name of the repo in the `stats-config.js` file it would fail to run and the `yarn` cache could break diffing from a cached package being used ins... | .github/actions/next-stats-action/src/constants.js | @@ -8,6 +8,9 @@ const mainRepoDir = path.join(workDir, mainRepoName)
const diffRepoDir = path.join(workDir, diffRepoName)
const statsAppDir = path.join(workDir, 'stats-app')
const diffingDir = path.join(workDir, 'diff')
+const yarnEnvValues = {
+ YARN_CACHE_FOLDER: path.join(workDir, 'yarn-cache'),
+}
const allowe... | true |
Other | vercel | next.js | 10fda8a9b9cb40ecec52ea9180fd1c78e52eeaad.json | Update stats action for running locally (#14143)
Noticed a few things that could be updated to make running the stats locally better e.g. if the folder name didn't match the name of the repo in the `stats-config.js` file it would fail to run and the `yarn` cache could break diffing from a cached package being used ins... | .github/actions/next-stats-action/src/index.js | @@ -46,6 +46,12 @@ if (!allowedActions.has(actionInfo.actionName) && !actionInfo.isRelease) {
)
}
+ if (actionInfo.isLocal) {
+ // make sure to use local repo location instead of the
+ // one provided in statsConfig
+ statsConfig.mainRepo = actionInfo.prRepo
+ }
+
// clone main r... | true |
Other | vercel | next.js | 10fda8a9b9cb40ecec52ea9180fd1c78e52eeaad.json | Update stats action for running locally (#14143)
Noticed a few things that could be updated to make running the stats locally better e.g. if the folder name didn't match the name of the repo in the `stats-config.js` file it would fail to run and the `yarn` cache could break diffing from a cached package being used ins... | .github/actions/next-stats-action/src/run/index.js | @@ -6,7 +6,7 @@ const logger = require('../util/logger')
const getDirSize = require('./get-dir-size')
const collectStats = require('./collect-stats')
const collectDiffs = require('./collect-diffs')
-const { statsAppDir, diffRepoDir, mainRepoDir } = require('../constants')
+const { statsAppDir, diffRepoDir, yarnEnvVa... | true |
Other | vercel | next.js | 10fda8a9b9cb40ecec52ea9180fd1c78e52eeaad.json | Update stats action for running locally (#14143)
Noticed a few things that could be updated to make running the stats locally better e.g. if the folder name didn't match the name of the repo in the `stats-config.js` file it would fail to run and the `yarn` cache could break diffing from a cached package being used ins... | .github/actions/next-stats-action/src/util/exec.js | @@ -9,9 +9,13 @@ const env = {
PR_STATS_COMMENT_TOKEN: '',
}
-function exec(command, noLog = false) {
+function exec(command, noLog = false, opts = {}) {
if (!noLog) logger(`exec: ${command}`)
- return execP(command, { env, timeout: 180 * 1000 })
+ return execP(command, {
+ timeout: 180 * 1000,
+ ...op... | true |
Other | vercel | next.js | 0a02efbfcc1ff5a8e0be780efee4f3c4ce0c5c85.json | Add test for title and routeChangeComplete (#14132)
This adds a test case for the `document.title` not being updated by the time `routeChangeComplete` is fired. This should have been made consistent with https://github.com/vercel/next.js/pull/13287 so should be able to be closed now
Closes: https://github.com/vercel/... | test/integration/production/pages/with-title.js | @@ -0,0 +1,10 @@
+import Head from 'next/head'
+
+export default () => (
+ <>
+ <Head>
+ <title>hello from title</title>
+ </Head>
+ <p id="with-title">hi</p>
+ </>
+) | true |
Other | vercel | next.js | 0a02efbfcc1ff5a8e0be780efee4f3c4ce0c5c85.json | Add test for title and routeChangeComplete (#14132)
This adds a test case for the `document.title` not being updated by the time `routeChangeComplete` is fired. This should have been made consistent with https://github.com/vercel/next.js/pull/13287 so should be able to be closed now
Closes: https://github.com/vercel/... | test/integration/production/test/index.test.js | @@ -321,6 +321,25 @@ describe('Production Usage', () => {
expect(text).toBe('Hello World')
await browser.close()
})
+
+ it('should set title by routeChangeComplete event', async () => {
+ const browser = await webdriver(appPort, '/')
+ await browser.eval(function setup() {
+ windo... | true |
Other | vercel | next.js | 3f5737eccd801f3f76fc42582d270900f82c05dc.json | Use the expected import (#14111) | examples/api-routes-apollo-server-and-client-auth/lib/user.js | @@ -1,5 +1,5 @@
import crypto from 'crypto'
-import uuidv4 from 'uuid/v4'
+import { v4 as uuidv4 } from 'uuid'
/**
* User methods. The example doesn't contain a DB, but for real applications you must use a | false |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/blog-starter-typescript/README.md | @@ -10,6 +10,12 @@ To create the blog posts we use [`remark`](https://github.com/remarkjs/remark) a
## How to use
+## Deploy your own
+
+Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
+
+[](https:/... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/blog-starter-typescript/package.json | @@ -24,7 +24,6 @@
"@types/node": "^14.0.1",
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
- "dotenv": "8.2.0",
"postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.4.0"
} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/blog-starter/README.md | @@ -10,6 +10,12 @@ To create the blog posts we use [`remark`](https://github.com/remarkjs/remark) a
[https://next-blog-starter.now.sh/](https://next-blog-starter.now.sh/)
+## Deploy your own
+
+Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
+
+[... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/blog-starter/package.json | @@ -17,7 +17,6 @@
"remark-html": "10.0.0"
},
"devDependencies": {
- "dotenv": "8.2.0",
"postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.4.0"
} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-agilitycms/.env.local.example | @@ -1,4 +1,4 @@
-NEXT_EXAMPLE_CMS_AGILITY_GUID=
-NEXT_EXAMPLE_CMS_AGILITY_API_FETCH_KEY=
-NEXT_EXAMPLE_CMS_AGILITY_API_PREVIEW_KEY=
-NEXT_EXAMPLE_CMS_AGILITY_SECURITY_KEY=
\ No newline at end of file
+AGILITY_CMS_GUID=
+AGILITY_CMS_API_FETCH_KEY=
+AGILITY_CMS_API_PREVIEW_KEY=
+AGILITY_CMS_SECURITY_KEY=
\ No newline at ... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-agilitycms/README.md | @@ -9,6 +9,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
- **Live**: [https://next-blog-agilitycms.now.sh/](https://next-blog-agilitycms.now.sh/)
- **Preview Mode**: [https://next-blog-agilitycms.now.sh/?agilitypreviewkey=...](https://next-blog-agilitycms.now.sh/?agilityprevie... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-agilitycms/lib/api.js | @@ -7,14 +7,14 @@ import { requireComponentDependancyByName } from './dependancies'
// Our LIVE API client
const liveClient = agility.getApi({
- guid: process.env.NEXT_EXAMPLE_CMS_AGILITY_GUID,
- apiKey: process.env.NEXT_EXAMPLE_CMS_AGILITY_API_FETCH_KEY,
+ guid: process.env.AGILITY_CMS_GUID,
+ apiKey: process.... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-agilitycms/lib/preview.js | @@ -98,7 +98,7 @@ export async function validateSlugForPreview({ slug, contentID }) {
//Generates a preview key to compare agains
export function generatePreviewKey() {
//the string we want to encode
- const str = `-1_${process.env.NEXT_EXAMPLE_CMS_AGILITY_SECURITY_KEY}_Preview`
+ const str = `-1_${process.env.A... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-agilitycms/vercel.json | @@ -1,16 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_AGILITY_GUID": "@next_example_cms_agility_guid",
- "NEXT_EXAMPLE_CMS_AGILITY_API_FETCH_KEY": "@next_example_cms_agility_api_fetch_key",
- "NEXT_EXAMPLE_CMS_AGILITY_API_PREVIEW_KEY": "@next_example_cms_agility_api_preview_key",
- "NEXT_EXAMPLE_CMS_AGILITY_S... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-buttercms/.env.local.example | @@ -1,3 +1,3 @@
# Copy this file as .env.local
-NEXT_EXAMPLE_CMS_BUTTERCMS_API_KEY=
-NEXT_EXAMPLE_CMS_BUTTERCMS_PREVIEW_SECRET=
\ No newline at end of file
+BUTTERCMS_API_KEY=
+BUTTERCMS_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-buttercms/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
[https://next-blog-buttercms.now.sh/](https://next-blog-buttercms.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-2-set-up-environment-variables), deploy the examp... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-buttercms/lib/api.js | @@ -1,5 +1,5 @@
import Butter from 'buttercms'
-const butter = Butter(process.env.NEXT_EXAMPLE_CMS_BUTTERCMS_API_KEY)
+const butter = Butter(process.env.BUTTERCMS_API_KEY)
export async function getPreviewPostBySlug(slug) {
const postResponse = await butter.post.retrieve(slug, { | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-buttercms/pages/api/preview.js | @@ -4,8 +4,7 @@ export default async function preview(req, res) {
// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (
- req.query.secret !==
- process.env.NEXT_EXAMPLE_CMS_BUTTERCMS_PREVIEW_SECRET ||
+ req.query.secret !== process.env.BUTTER... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-buttercms/vercel.json | @@ -1,11 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_BUTTERCMS_API_KEY": "@next_example_cms_buttercms_api_key",
- "NEXT_EXAMPLE_CMS_BUTTERCMS_PREVIEW_SECRET": "@next_example_cms_buttercms_preview_secret"
- },
- "build": {
- "env": {
- "NEXT_EXAMPLE_CMS_BUTTERCMS_API_KEY": "@next_example_cms_buttercms_api... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/.env.example | @@ -1,4 +0,0 @@
-NEXT_EXAMPLE_CMS_CONTENTFUL_SPACE_ID=
-NEXT_EXAMPLE_CMS_CONTENTFUL_ACCESS_TOKEN=
-NEXT_EXAMPLE_CMS_CONTENTFUL_PREVIEW_ACCESS_TOKEN=
-NEXT_EXAMPLE_CMS_CONTENTFUL_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/.env.local.example | @@ -0,0 +1,4 @@
+CONTENTFUL_SPACE_ID=
+CONTENTFUL_ACCESS_TOKEN=
+CONTENTFUL_PREVIEW_ACCESS_TOKEN=
+CONTENTFUL_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
### [https://next-blog-contentful.now.sh/](https://next-blog-contentful.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-5-set-up-environment-variables), deploy the... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/lib/api.js | @@ -1,13 +1,13 @@
import { createClient } from 'contentful'
const client = createClient({
- space: process.env.NEXT_EXAMPLE_CMS_CONTENTFUL_SPACE_ID,
- accessToken: process.env.NEXT_EXAMPLE_CMS_CONTENTFUL_ACCESS_TOKEN,
+ space: process.env.CONTENTFUL_SPACE_ID,
+ accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/next.config.js | @@ -1,12 +0,0 @@
-require('dotenv').config()
-
-module.exports = {
- env: {
- NEXT_EXAMPLE_CMS_CONTENTFUL_SPACE_ID:
- process.env.NEXT_EXAMPLE_CMS_CONTENTFUL_SPACE_ID,
- NEXT_EXAMPLE_CMS_CONTENTFUL_ACCESS_TOKEN:
- process.env.NEXT_EXAMPLE_CMS_CONTENTFUL_ACCESS_TOKEN,
- NEXT_EXAMPLE_CMS_CONTENTFUL_PR... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/package.json | @@ -19,7 +19,6 @@
"devDependencies": {
"@fullhuman/postcss-purgecss": "^2.1.0",
"contentful-import": "^7.7.12",
- "dotenv": "8.2.0",
"postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.2.0"
} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/pages/api/preview.js | @@ -3,10 +3,7 @@ import { getPreviewPostBySlug } from '../../lib/api'
export default async function preview(req, res) {
const { secret, slug } = req.query
- if (
- secret !== process.env.NEXT_EXAMPLE_CMS_CONTENTFUL_PREVIEW_SECRET ||
- !slug
- ) {
+ if (secret !== process.env.CONTENTFUL_PREVIEW_SECRET || ... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-contentful/vercel.json | @@ -1,15 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_CONTENTFUL_SPACE_ID": "@next_example_contentful_space_id",
- "NEXT_EXAMPLE_CMS_CONTENTFUL_ACCESS_TOKEN": "@next_example_cms_contentful_access_token",
- "NEXT_EXAMPLE_CMS_CONTENTFUL_PREVIEW_ACCESS_TOKEN": "@next_example_cms_contentful_preview_access_token",
- ... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-cosmic/.env.local.example | @@ -1,3 +1,3 @@
-NEXT_EXAMPLE_CMS_COSMIC_BUCKET_SLUG=
-NEXT_EXAMPLE_CMS_COSMIC_READ_KEY=
-NEXT_EXAMPLE_CMS_COSMIC_PREVIEW_SECRET=
\ No newline at end of file
+COSMIC_BUCKET_SLUG=
+COSMIC_READ_KEY=
+COSMIC_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-cosmic/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
[https://next-blog-cosmic.now.sh/](https://next-blog-cosmic.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-3-set-up-environment-variables), deploy the example usi... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-cosmic/lib/api.js | @@ -1,7 +1,7 @@
import Cosmic from 'cosmicjs'
-const BUCKET_SLUG = process.env.NEXT_EXAMPLE_CMS_COSMIC_BUCKET_SLUG
-const READ_KEY = process.env.NEXT_EXAMPLE_CMS_COSMIC_READ_KEY
+const BUCKET_SLUG = process.env.COSMIC_BUCKET_SLUG
+const READ_KEY = process.env.COSMIC_READ_KEY
const bucket = Cosmic().bucket({
sl... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-cosmic/pages/api/preview.js | @@ -4,7 +4,7 @@ export default async function preview(req, res) {
// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (
- req.query.secret !== process.env.NEXT_EXAMPLE_CMS_COSMIC_PREVIEW_SECRET ||
+ req.query.secret !== process.env.COSMIC_PREVIEW_S... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-cosmic/vercel.json | @@ -1,14 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_COSMIC_BUCKET_SLUG": "@next_example_cms_cosmic_bucket_slug",
- "NEXT_EXAMPLE_CMS_COSMIC_READ_KEY": "@next_example_cms_cosmic_read_key",
- "NEXT_EXAMPLE_CMS_COSMIC_PREVIEW_SECRET": "@next_example_cms_cosmic_preview_secret"
- },
- "build": {
- "env": {
- ... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/.env.example | @@ -1,2 +0,0 @@
-NEXT_EXAMPLE_CMS_DATOCMS_API_TOKEN=
-NEXT_EXAMPLE_CMS_DATOCMS_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/.env.local.example | @@ -0,0 +1,2 @@
+DATOCMS_API_TOKEN=
+DATOCMS_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/README.md | @@ -20,6 +20,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
- [Storyblok](/examples/cms-storyblok)
- [Blog Starter](/examples/blog-starter)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-5-set-up-environment-variables), deploy the... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/lib/api.js | @@ -1,5 +1,5 @@
const API_URL = 'https://graphql.datocms.com'
-const API_TOKEN = process.env.NEXT_EXAMPLE_CMS_DATOCMS_API_TOKEN
+const API_TOKEN = process.env.DATOCMS_API_TOKEN
// See: https://www.datocms.com/blog/offer-responsive-progressive-lqip-images-in-2020
const responsiveImageFragment = ` | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/pages/api/preview.js | @@ -4,7 +4,7 @@ export default async function preview(req, res) {
// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (
- req.query.secret !== process.env.NEXT_EXAMPLE_CMS_DATOCMS_PREVIEW_SECRET ||
+ req.query.secret !== process.env.DATOCMS_PREVIEW... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-datocms/vercel.json | @@ -1,11 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_DATOCMS_API_TOKEN": "@next_example_cms_datocms_api_token",
- "NEXT_EXAMPLE_CMS_DATOCMS_PREVIEW_SECRET": "@next_example_cms_datocms_preview_secret"
- },
- "build": {
- "env": {
- "NEXT_EXAMPLE_CMS_DATOCMS_API_TOKEN": "@next_example_cms_datocms_api_token... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/.env.example | @@ -1,3 +0,0 @@
-NEXT_EXAMPLE_CMS_PRISMIC_API_TOKEN=
-NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_NAME=
-NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_LOCALE="en-us"
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/.env.local.example | @@ -0,0 +1,3 @@
+PRISMIC_API_TOKEN=
+PRISMIC_REPOSITORY_NAME=
+PRISMIC_REPOSITORY_LOCALE="en-us"
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
### [https://next-blog-prismic.now.sh/](https://next-blog-prismic.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-5-set-up-environment-variables), deploy the examp... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/lib/api.js | @@ -1,11 +1,11 @@
import Prismic from 'prismic-javascript'
-const REPOSITORY = process.env.NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_NAME
+const REPOSITORY = process.env.PRISMIC_REPOSITORY_NAME
const REF_API_URL = `https://${REPOSITORY}.prismic.io/api/v2`
const GRAPHQL_API_URL = `https://${REPOSITORY}.prismic.io/graphql... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/next.config.js | @@ -1,12 +0,0 @@
-require('dotenv').config()
-
-module.exports = {
- env: {
- NEXT_EXAMPLE_CMS_PRISMIC_API_TOKEN:
- process.env.NEXT_EXAMPLE_CMS_PRISMIC_API_TOKEN,
- NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_NAME:
- process.env.NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_NAME,
- NEXT_EXAMPLE_CMS_PRISMIC_REPOSITOR... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/package.json | @@ -17,7 +17,6 @@
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^2.1.0",
- "dotenv": "8.2.0",
"postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.2.0"
} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-prismic/vercel.json | @@ -1,12 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_PRISMIC_API_TOKEN": "@next_example_cms_prismic_api_token",
- "NEXT_EXAMPLE_CMS_PRISMIC_REPOSITORY_NAME": "@next_example_cms_prismic_repository_name"
- },
- "build": {
- "env": {
- "NEXT_EXAMPLE_CMS_PRISMIC_API_TOKEN": "@next_example_cms_prismic_api_tok... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/.env.example | @@ -1,3 +0,0 @@
-NEXT_EXAMPLE_CMS_SANITY_PREVIEW_SECRET=
-NEXT_EXAMPLE_CMS_SANITY_PROJECT_ID=
-NEXT_EXAMPLE_CMS_SANITY_API_TOKEN=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/.env.local.example | @@ -0,0 +1,3 @@
+SANITY_PREVIEW_SECRET=
+SANITY_PROJECT_ID=
+SANITY_API_TOKEN=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
### [https://next-blog-sanity.now.sh/](https://next-blog-sanity.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-4-set-up-environment-variables), deploy the example... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/lib/sanity.js | @@ -3,7 +3,7 @@ import sanityClient from '@sanity/client'
const options = {
// Find your project ID and dataset in `sanity.json` in your studio project
dataset: 'production',
- projectId: process.env.NEXT_EXAMPLE_CMS_SANITY_PROJECT_ID,
+ projectId: process.env.SANITY_PROJECT_ID,
useCdn: process.env.NODE_ENV... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/next.config.js | @@ -1,8 +0,0 @@
-require('dotenv').config()
-
-module.exports = {
- env: {
- NEXT_EXAMPLE_CMS_SANITY_PROJECT_ID:
- process.env.NEXT_EXAMPLE_CMS_SANITY_PROJECT_ID,
- },
-} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/package.json | @@ -18,7 +18,6 @@
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^2.1.0",
- "dotenv": "8.2.0",
"postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.2.0"
} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/pages/api/preview.js | @@ -4,7 +4,7 @@ export default async function preview(req, res) {
// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (
- req.query.secret !== process.env.NEXT_EXAMPLE_CMS_SANITY_PREVIEW_SECRET ||
+ req.query.secret !== process.env.SANITY_PREVIEW_S... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-sanity/vercel.json | @@ -1,12 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_SANITY_PREVIEW_SECRET": "@next_example_cms_sanity_preview_secret",
- "NEXT_EXAMPLE_CMS_SANITY_API_TOKEN": "@next_example_cms_sanity_api_token",
- "NEXT_EXAMPLE_CMS_SANITY_PROJECT_ID": "@next_example_cms_sanity_project_id"
- },
- "build": {
- "env": {
- ... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-storyblok/.env.local.example | @@ -1,3 +1,3 @@
# Copy this file as .env.local
-NEXT_EXAMPLE_CMS_STORYBLOK_API_KEY=
-NEXT_EXAMPLE_CMS_STORYBLOK_PREVIEW_SECRET=
\ No newline at end of file
+STORYBLOK_API_KEY=
+STORYBLOK_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-storyblok/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
[https://next-blog-storyblok.now.sh/](https://next-blog-storyblok.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-6-set-up-environment-variables), deploy the examp... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-storyblok/lib/api.js | @@ -3,7 +3,7 @@ async function fetchAPI(query, { variables, preview } = {}) {
method: 'POST',
headers: {
'Content-Type': 'application/json',
- Token: process.env.NEXT_EXAMPLE_CMS_STORYBLOK_API_KEY,
+ Token: process.env.STORYBLOK_API_KEY,
Version: preview ? 'draft' : 'published',
}... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-storyblok/pages/api/preview.js | @@ -4,8 +4,7 @@ export default async function preview(req, res) {
// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (
- req.query.secret !==
- process.env.NEXT_EXAMPLE_CMS_STORYBLOK_PREVIEW_SECRET ||
+ req.query.secret !== process.env.STORYB... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-storyblok/vercel.json | @@ -1,11 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_STORYBLOK_PREVIEW_SECRET": "@next_example_cms_storyblok_preview_secret",
- "NEXT_EXAMPLE_CMS_STORYBLOK_API_KEY": "@next_example_cms_storyblok_api_key"
- },
- "build": {
- "env": {
- "NEXT_EXAMPLE_CMS_STORYBLOK_API_KEY": "@next_example_cms_storyblok_api... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/.env.local.example | @@ -1,2 +1,2 @@
-NEXT_EXAMPLE_CMS_STRAPI_PREVIEW_SECRET=
-NEXT_PUBLIC_API_URL=http://localhost:1337
\ No newline at end of file
+STRAPI_PREVIEW_SECRET=
+NEXT_PUBLIC_STRAPI_API_URL=http://localhost:1337
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
[https://next-blog-strapi.now.sh/](https://next-blog-strapi.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-7-set-up-environment-variables), deploy the example usi... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/components/avatar.js | @@ -3,7 +3,9 @@ export default function Avatar({ name, picture }) {
<div className="flex items-center">
<img
src={`${
- picture.url.startsWith('/') ? process.env.NEXT_PUBLIC_API_URL : ''
+ picture.url.startsWith('/')
+ ? process.env.NEXT_PUBLIC_STRAPI_API_URL
+ ... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/components/cover-image.js | @@ -2,7 +2,7 @@ import Link from 'next/link'
export default function CoverImage({ title, url, slug }) {
const imageUrl = `${
- url.startsWith('/') ? process.env.NEXT_PUBLIC_API_URL : ''
+ url.startsWith('/') ? process.env.NEXT_PUBLIC_STRAPI_API_URL : ''
}${url}`
return (
<div className="-mx-5 sm:... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/lib/api.js | @@ -1,5 +1,5 @@
async function fetchAPI(query, { variables } = {}) {
- const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/graphql`, {
+ const res = await fetch(`${process.env.NEXT_PUBLIC_STRAPI_API_URL}/graphql`, {
method: 'POST',
headers: {
'Content-Type': 'application/json', | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/pages/api/preview.js | @@ -4,7 +4,7 @@ export default async function preview(req, res) {
// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (
- req.query.secret !== process.env.NEXT_EXAMPLE_CMS_STRAPI_PREVIEW_SECRET ||
+ req.query.secret !== process.env.STRAPI_PREVIEW_S... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-strapi/vercel.json | @@ -1,11 +0,0 @@
-{
- "env": {
- "NEXT_EXAMPLE_CMS_STRAPI_PREVIEW_SECRET": "@next_example_cms_strapi_preview_secret",
- "NEXT_PUBLIC_API_URL": "@next_example_cms_strapi_api_url"
- },
- "build": {
- "env": {
- "NEXT_PUBLIC_API_URL": "@next_example_cms_strapi_api_url"
- }
- }
-} | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-takeshape/.env.example | @@ -1,3 +0,0 @@
-NEXT_EXAMPLE_CMS_TAKESHAPE_API_KEY=
-NEXT_EXAMPLE_CMS_TAKESHAPE_PROJECT_ID=
-NEXT_EXAMPLE_CMS_TAKESHAPE_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-takeshape/.env.local.example | @@ -0,0 +1,3 @@
+TAKESHAPE_API_KEY=
+TAKESHAPE_PROJECT_ID=
+TAKESHAPE_PREVIEW_SECRET=
\ No newline at end of file | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-takeshape/.gitignore | @@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-... | true |
Other | vercel | next.js | 2cd691050af6b2bb75d6e6ab7c63efcea7074f1b.json | Add new import flow to CMS examples (#14053)
[ch2502]
- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples | examples/cms-takeshape/README.md | @@ -6,6 +6,12 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
### [https://next-blog-takeshape.now.sh/](https://next-blog-takeshape.now.sh/)
+## Deploy your own
+
+Once you have access to [the environment variables you'll need](#step-5-set-up-environment-variables), deploy the e... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.