mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### Description Follow up #35349. 1. Update the [example template](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) with [StackBlitz](https://stackblitz.com/) preview 2. Add `preview live with StackBlitz` to the examples 3. Remove the below old StackBlitz preview section from the examples ```md ## Preview Preview the example live on [StackBlitz](http://stackblitz.com/): [](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/active-class-name) ``` CC: @samcx ### Improving Documentation - [x] Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - [x] Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
Example app using Google Maps Embed
This example shows how to embed a Google Maps Embed using @next/third-parties.
Deploy your own
Deploy the example using Vercel or preview live with StackBlitz
How to use
Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-google-maps-embed with-google-maps-embed-app
yarn create next-app --example with-google-maps-embed with-google-maps-embed-app
pnpm create next-app --example with-google-maps-embed with-google-maps-embed-app
Next, copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):
cp .env.local.example .env.local
Set the NEXT_PUBLIC_GOOGLE_API_KEY variable in .env.local to match your Google Maps API Key.
Deploy it to the cloud with Vercel (Documentation).