diff --git a/docs/components/footer.vue b/docs/components/footer.vue index f0f90873162..3fd1fed1d9b 100644 --- a/docs/components/footer.vue +++ b/docs/components/footer.vue @@ -44,10 +44,10 @@
Hosting provided by - + . Docs generated with - Nuxt.js. + Nuxt.js. and proudly hosted on Netlify. - - and proudly hosted on Zeit. + + and proudly hosted on Vercel.
@@ -146,8 +146,8 @@ export default { isNetlify() { return Boolean(process.env.NETLIFY) }, - isZeitNow() { - return Boolean(process.env.ZEIT_NOW) + isVercel() { + return Boolean(process.env.VERCEL_NOW) } } } diff --git a/docs/components/header.vue b/docs/components/header.vue index 9a9b43dfb7e..ba0f144752b 100644 --- a/docs/components/header.vue +++ b/docs/components/header.vue @@ -199,30 +199,35 @@ export default { isNetlify() { return Boolean(process.env.NETLIFY) }, - isZeitNow() { - return Boolean(process.env.ZEIT_NOW) + isVercel() { + return Boolean(process.env.VERCEL_NOW) }, branchName() { - return this.isZeitNow ? process.env.ZEIT_BRANCH || '' : '' + // Netlify doesn't support providing the branch name + return this.isVercel ? process.env.VERCEL_BRANCH || '' : '' }, isDev() { // In our case, `production` is the dev branch preview (Netlify) return ( (this.isNetlify && process.env.NETLIFY_CONTEXT === 'production') || - (this.isZeitNow && this.branchName === 'dev') + (this.isVercel && this.branchName === 'dev') ) }, isPR() { return ( (this.isNetlify && process.env.PULL_REQUEST && process.env.REVIEW_ID) || - (this.isZeitNow && !this.isDev && this.branchName !== 'master') + (this.isVercel && !this.isDev && this.branchName !== 'master') ) }, prId() { + // Vercel doesn't currently support returning the PR number + // `REVIEW_ID` is provided by Netlify return this.isPR ? process.env.REVIEW_ID : '' }, dropdownText() { + // Dropdown button text if (this.isPR) { + // Vercel doesn't currently support returning the PR number return this.prId ? `Pull #${this.prId}` : 'Pull Request' } else if (this.isLocal) { return 'Local Copy' diff --git a/docs/nuxt.config.js b/docs/nuxt.config.js index e721ea79ef0..e2cf4b73409 100644 --- a/docs/nuxt.config.js +++ b/docs/nuxt.config.js @@ -151,20 +151,20 @@ module.exports = { PULL_REQUEST: process.env.NETLIFY ? process.env.PULL_REQUEST : null, // - If the previous is `true`, this will be the PR number REVIEW_ID: process.env.NETLIFY && process.env.PULL_REQUEST ? process.env.REVIEW_ID : null, - // ENV vars provided by Zeit Now build + // ENV vars provided by Vercel/Zeit Now build // https://zeit.co/docs/v2/build-step#system-environment-variables // - `true` if on Zeit Now (dev or PR) - ZEIT_NOW: process.env.NOW_GITHUB_DEPLOYMENT, + VERCEL_NOW: process.env.VERCEL_GITHUB_DEPLOYMENT || process.env.NOW_GITHUB_DEPLOYMENT, // - The branch name used for the deploy (i.e. `dev`, `master`, `patch-1`, etc) - ZEIT_BRANCH: process.env.NOW_GITHUB_COMMIT_REF, + VERCEL_BRANCH: process.env.VERCEL_GITHUB_COMMIT_REF || process.env.NOW_GITHUB_COMMIT_REF, // - The Commit SHA hash - ZEIT_COMMIT_SHA: process.env.NOW_GITHUB_COMMIT_SHA, + VERCEL_COMMIT_SHA: process.env.VERCEL_GITHUB_COMMIT_SHA || process.env.NOW_GITHUB_COMMIT_SHA, // - The deployment URL - ZEIT_URL: process.env.NOW_URL, + VERCEL_URL: process.env.VERCEL_URL || process.env.NOW_URL, // - The Github Organization (ie. bootstrap-vue) - ZEIT_GITHUB_ORG: process.env.NOW_GITHUB_ORG, + VERCEL_GITHUB_ORG: process.env.VERCEL_GITHUB_ORG || process.env.NOW_GITHUB_ORG, // - The repo is the organization (i.e. bootstrap-vue) - ZEIT_GITHUB_REPO: process.env.NOW_GITHUB_REPO + VERCEL_GITHUB_REPO: process.env.VERCEL_GITHUB_REPO || process.env.NOW_GITHUB_REPO }, build: {