8eaabe2fb0
Fix all deploy button URLs in the Next.js repo to follow the following format: ``` https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/<EXAMPLE_NAME>&project-name=<EXAMPLE_NAME>&repository-name=<EXAMPLE_NAME> ``` The detailed docs for the Deploy Button can be found here: https://vercel.com/docs/more/deploy-button. Also updates legacy Vercel import flow URLs (starting with vercel.com/import or with vercel.com/new/project), to use the new vercel.com/new URLs. --- For example, for the `hello-world` example: The URL is https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world And the deploy button looks like this: [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world) --- For reference, I used the following regexes to search for the incorrect URLs ``` \(https://vercel.com/import/git\?s=https://github.com/vercel/next.js/tree/canary/examples/(.*)\) \(https://vercel.com/import/git\?c=1&s=https://github.com/vercel/next.js/tree/canary/examples/([^&]*)(.*)\) \(https://vercel.com/import/project\?template=https://github.com/vercel/next.js/tree/canary/examples/(.*)\) https://vercel.com/import/git https://vercel.com/import/select-scope https://vercel.com/import https://vercel.com/new/project ```
65 lines
2 KiB
JavaScript
65 lines
2 KiB
JavaScript
import Head from 'next/head'
|
|
import styles from '../styles/Home.module.css'
|
|
|
|
export default function Home() {
|
|
return (
|
|
<div className={styles.container}>
|
|
<Head>
|
|
<title>Create Next App</title>
|
|
<link rel="icon" href="/favicon.ico" />
|
|
</Head>
|
|
|
|
<main className={styles.main}>
|
|
<h1 className={styles.title}>
|
|
Welcome to <a href="https://nextjs.org">Next.js!</a>
|
|
</h1>
|
|
|
|
<p className={styles.description}>
|
|
Get started by editing{' '}
|
|
<code className={styles.code}>pages/index.js</code>
|
|
</p>
|
|
|
|
<div className={styles.grid}>
|
|
<a href="https://nextjs.org/docs" className={styles.card}>
|
|
<h3>Documentation →</h3>
|
|
<p>Find in-depth information about Next.js features and API.</p>
|
|
</a>
|
|
|
|
<a href="https://nextjs.org/learn" className={styles.card}>
|
|
<h3>Learn →</h3>
|
|
<p>Learn about Next.js in an interactive course with quizzes!</p>
|
|
</a>
|
|
|
|
<a
|
|
href="https://github.com/vercel/next.js/tree/master/examples"
|
|
className={styles.card}
|
|
>
|
|
<h3>Examples →</h3>
|
|
<p>Discover and deploy boilerplate example Next.js projects.</p>
|
|
</a>
|
|
|
|
<a
|
|
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
|
className={styles.card}
|
|
>
|
|
<h3>Deploy →</h3>
|
|
<p>
|
|
Instantly deploy your Next.js site to a public URL with Vercel.
|
|
</p>
|
|
</a>
|
|
</div>
|
|
</main>
|
|
|
|
<footer className={styles.footer}>
|
|
<a
|
|
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
Powered by{' '}
|
|
<img src="/vercel.svg" alt="Vercel Logo" className={styles.logo} />
|
|
</a>
|
|
</footer>
|
|
</div>
|
|
)
|
|
}
|