From c0b2503aa91467d639cc3bdd6dc62d4d807156a4 Mon Sep 17 00:00:00 2001 From: Khattak Date: Fri, 10 Jul 2020 12:48:42 +0500 Subject: [PATCH 01/11] Add with-sitemap Example --- examples/with-sitemap/README.md | 30 +++ examples/with-sitemap/next.config.js | 9 + examples/with-sitemap/package.json | 18 ++ examples/with-sitemap/pages/contact.js | 128 +++++++++++ examples/with-sitemap/pages/index.js | 209 ++++++++++++++++++ examples/with-sitemap/public/favicon.ico | Bin 0 -> 15086 bytes examples/with-sitemap/public/sitemap.xml | 13 ++ examples/with-sitemap/public/vercel.svg | 4 + .../with-sitemap/scripts/generate-sitemap.js | 35 +++ 9 files changed, 446 insertions(+) create mode 100644 examples/with-sitemap/README.md create mode 100644 examples/with-sitemap/next.config.js create mode 100644 examples/with-sitemap/package.json create mode 100644 examples/with-sitemap/pages/contact.js create mode 100644 examples/with-sitemap/pages/index.js create mode 100644 examples/with-sitemap/public/favicon.ico create mode 100644 examples/with-sitemap/public/sitemap.xml create mode 100644 examples/with-sitemap/public/vercel.svg create mode 100644 examples/with-sitemap/scripts/generate-sitemap.js diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md new file mode 100644 index 0000000000000..4b5c883b29bd5 --- /dev/null +++ b/examples/with-sitemap/README.md @@ -0,0 +1,30 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/examples/with-sitemap/next.config.js b/examples/with-sitemap/next.config.js new file mode 100644 index 0000000000000..08a972d01c6d6 --- /dev/null +++ b/examples/with-sitemap/next.config.js @@ -0,0 +1,9 @@ +module.exports = { + webpack: (config, { isServer }) => { + if (isServer) { + require('./scripts/generate-sitemap') + } + + return config + }, +} diff --git a/examples/with-sitemap/package.json b/examples/with-sitemap/package.json new file mode 100644 index 0000000000000..50e828b7ef096 --- /dev/null +++ b/examples/with-sitemap/package.json @@ -0,0 +1,18 @@ +{ + "name": "with-sitemap", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "9.4.4", + "react": "16.13.1", + "react-dom": "16.13.1" + }, + "devDependencies": { + "globby": "^11.0.1" + } +} diff --git a/examples/with-sitemap/pages/contact.js b/examples/with-sitemap/pages/contact.js new file mode 100644 index 0000000000000..0d718f02d5fc9 --- /dev/null +++ b/examples/with-sitemap/pages/contact.js @@ -0,0 +1,128 @@ +import Head from 'next/head' + +export default function Home() { + return ( +
+ + Create Next App + + + +
+

+ Welcome to Next.js! +

+ +

Contact Page

+
+ + + + + + +
+ ) +} diff --git a/examples/with-sitemap/pages/index.js b/examples/with-sitemap/pages/index.js new file mode 100644 index 0000000000000..1379c5f92dabb --- /dev/null +++ b/examples/with-sitemap/pages/index.js @@ -0,0 +1,209 @@ +import Head from 'next/head' + +export default function Home() { + return ( +
+ + Create Next App + + + +
+

+ Welcome to Next.js! +

+ +

+ Get started by editing pages/index.js +

+ +
+ +

Documentation →

+

Find in-depth information about Next.js features and API.

+
+ + +

Learn →

+

Learn about Next.js in an interactive course with quizzes!

+
+ + +

Examples →

+

Discover and deploy boilerplate example Next.js projects.

+
+ + +

Deploy →

+

+ Instantly deploy your Next.js site to a public URL with Vercel. +

+
+
+
+ + + + + + +
+ ) +} diff --git a/examples/with-sitemap/public/favicon.ico b/examples/with-sitemap/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4965832f2c9b0605eaa189b7c7fb11124d24e48a GIT binary patch literal 15086 zcmeHOOH5Q(7(R0cc?bh2AT>N@1PWL!LLfZKyG5c!MTHoP7_p!sBz0k$?pjS;^lmgJ zU6^i~bWuZYHL)9$wuvEKm~qo~(5=Lvx5&Hv;?X#m}i|`yaGY4gX+&b>tew;gcnRQA1kp zBbm04SRuuE{Hn+&1wk%&g;?wja_Is#1gKoFlI7f`Gt}X*-nsMO30b_J@)EFNhzd1QM zdH&qFb9PVqQOx@clvc#KAu}^GrN`q5oP(8>m4UOcp`k&xwzkTio*p?kI4BPtIwX%B zJN69cGsm=x90<;Wmh-bs>43F}ro$}Of@8)4KHndLiR$nW?*{Rl72JPUqRr3ta6e#A z%DTEbi9N}+xPtd1juj8;(CJt3r9NOgb>KTuK|z7!JB_KsFW3(pBN4oh&M&}Nb$Ee2 z$-arA6a)CdsPj`M#1DS>fqj#KF%0q?w50GN4YbmMZIoF{e1yTR=4ablqXHBB2!`wM z1M1ke9+<);|AI;f=2^F1;G6Wfpql?1d5D4rMr?#f(=hkoH)U`6Gb)#xDLjoKjp)1;Js@2Iy5yk zMXUqj+gyk1i0yLjWS|3sM2-1ECc;MAz<4t0P53%7se$$+5Ex`L5TQO_MMXXi04UDIU+3*7Ez&X|mj9cFYBXqM{M;mw_ zpw>azP*qjMyNSD4hh)XZt$gqf8f?eRSFX8VQ4Y+H3jAtvyTrXr`qHAD6`m;aYmH2zOhJC~_*AuT} zvUxC38|JYN94i(05R)dVKgUQF$}#cxV7xZ4FULqFCNX*Forhgp*yr6;DsIk=ub0Hv zpk2L{9Q&|uI^b<6@i(Y+iSxeO_n**4nRLc`P!3ld5jL=nZRw6;DEJ*1z6Pvg+eW|$lnnjO zjd|8>6l{i~UxI244CGn2kK@cJ|#ecwgSyt&HKA2)z zrOO{op^o*- + + + http://localhost:3000/contact + + + + http://localhost:3000 + + + + \ No newline at end of file diff --git a/examples/with-sitemap/public/vercel.svg b/examples/with-sitemap/public/vercel.svg new file mode 100644 index 0000000000000..fbf0e25a651c2 --- /dev/null +++ b/examples/with-sitemap/public/vercel.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/examples/with-sitemap/scripts/generate-sitemap.js b/examples/with-sitemap/scripts/generate-sitemap.js new file mode 100644 index 0000000000000..89cdaca0168a5 --- /dev/null +++ b/examples/with-sitemap/scripts/generate-sitemap.js @@ -0,0 +1,35 @@ +const fs = require('fs') + +const globby = require('globby') + +const WEBSITE_URL = 'http://localhost:3000' + +;(async () => { + // Ignore Next.js specific files (e.g., _app.js) and API routes. + const pages = await globby([ + 'pages/**/*{.js,.mdx}', + '!pages/_*.js', + '!pages/api', + ]) + const sitemap = ` + + ${pages + .map((page) => { + const path = page + .replace('pages', '') + .replace('.js', '') + .replace('.mdx', '') + const route = path === '/index' ? '' : path + + return ` + + ${`${WEBSITE_URL}${route}`} + + ` + }) + .join('')} + + ` + + fs.writeFileSync('public/sitemap.xml', sitemap) +})() From e311207334ddbebba03c98607e2b7a44f033733c Mon Sep 17 00:00:00 2001 From: Khattak Date: Fri, 10 Jul 2020 15:56:34 +0500 Subject: [PATCH 02/11] Update README --- examples/with-sitemap/README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 4b5c883b29bd5..894a0c024a599 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -1,4 +1,7 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +### Sitemap for Static Next.Js App + +This is a static [Next.js](https://nextjs.org/) project which generates a sitemap for all the static paths. +Everytime, you try to start a development server or make a build, you get an updated `sitemap.xml` file in `public` directory. ## Getting Started @@ -10,18 +13,9 @@ npm run dev yarn dev ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +Open [http://localhost:3000/sitemap.xml](http://localhost:3000/sitemap.xml) with your browser to see the sitemap. -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! +**Note**: Everytime you add or remove a page from `pages` directory, you need to restart the server, to update your `pages/sitemap.xml` file. ## Deploy on Vercel From 34626f2928344aa5c7b4eaffaad2e2da09735cdc Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:50:08 +0500 Subject: [PATCH 03/11] Update examples/with-sitemap/scripts/generate-sitemap.js Co-authored-by: Luis Alvarez D. --- .../with-sitemap/scripts/generate-sitemap.js | 39 ++++++++----------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/examples/with-sitemap/scripts/generate-sitemap.js b/examples/with-sitemap/scripts/generate-sitemap.js index 89cdaca0168a5..4bd49377b2c50 100644 --- a/examples/with-sitemap/scripts/generate-sitemap.js +++ b/examples/with-sitemap/scripts/generate-sitemap.js @@ -1,35 +1,28 @@ const fs = require('fs') - const globby = require('globby') -const WEBSITE_URL = 'http://localhost:3000' +function addPage(page) { + const path = page.replace('pages', '').replace('.js', '').replace('.mdx', '') + const route = path === '/index' ? '' : path + + return ` + ${`${process.env.WEBSITE_URL}${route}`} + hourly + ` +} -;(async () => { +async function generateSitemap() { // Ignore Next.js specific files (e.g., _app.js) and API routes. const pages = await globby([ 'pages/**/*{.js,.mdx}', '!pages/_*.js', '!pages/api', ]) - const sitemap = ` - - ${pages - .map((page) => { - const path = page - .replace('pages', '') - .replace('.js', '') - .replace('.mdx', '') - const route = path === '/index' ? '' : path - - return ` - - ${`${WEBSITE_URL}${route}`} - - ` - }) - .join('')} - - ` + const sitemap = ` +${pages.map(addPage).join('\n')} +` fs.writeFileSync('public/sitemap.xml', sitemap) -})() +} + +generateSitemap() From e3af2a2859c11cd1450346b28fe13b22ec961a6b Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:51:15 +0500 Subject: [PATCH 04/11] Update examples/with-sitemap/package.json Co-authored-by: Luis Alvarez D. --- examples/with-sitemap/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/with-sitemap/package.json b/examples/with-sitemap/package.json index 50e828b7ef096..beb83580fa2e2 100644 --- a/examples/with-sitemap/package.json +++ b/examples/with-sitemap/package.json @@ -1,18 +1,18 @@ { "name": "with-sitemap", "version": "0.1.0", - "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { - "next": "9.4.4", - "react": "16.13.1", - "react-dom": "16.13.1" + "next": "latest", + "react": "^16.13.1", + "react-dom": "^16.13.1" }, "devDependencies": { "globby": "^11.0.1" - } + }, + "license": "MIT" } From 0eb95a8b16ba28ef169bfd7c37e0186124ccc27b Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Thu, 23 Jul 2020 11:52:13 +0500 Subject: [PATCH 05/11] Update examples/with-sitemap/public/sitemap.xml Co-authored-by: Luis Alvarez D. --- examples/with-sitemap/public/sitemap.xml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/examples/with-sitemap/public/sitemap.xml b/examples/with-sitemap/public/sitemap.xml index 6330a4320fdbb..0afda5b27c685 100644 --- a/examples/with-sitemap/public/sitemap.xml +++ b/examples/with-sitemap/public/sitemap.xml @@ -1,13 +1,10 @@ - - - - - http://localhost:3000/contact - - - - http://localhost:3000 - - - - \ No newline at end of file + + + http://localhost:3000/contact + hourly + + + http://localhost:3000 + hourly + + From 54c6e17d2608e50966f68ad9cc1e312d93496a3b Mon Sep 17 00:00:00 2001 From: Khattak Date: Thu, 23 Jul 2020 12:37:56 +0500 Subject: [PATCH 06/11] Update README --- examples/with-sitemap/.env | 2 ++ examples/with-sitemap/README.md | 45 +++++++++++++++++------- examples/with-sitemap/public/sitemap.xml | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 examples/with-sitemap/.env diff --git a/examples/with-sitemap/.env b/examples/with-sitemap/.env new file mode 100644 index 0000000000000..8d8ccb6fca0e4 --- /dev/null +++ b/examples/with-sitemap/.env @@ -0,0 +1,2 @@ +# Used to add the domain to sitemap.xml, replace it with a real domain in production +WEBSITE_URL=http://localhost:3000 \ No newline at end of file diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 894a0c024a599..91e053bdaa53a 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -1,24 +1,45 @@ -### Sitemap for Static Next.Js App +# With Sitemap example -This is a static [Next.js](https://nextjs.org/) project which generates a sitemap for all the static paths. -Everytime, you try to start a development server or make a build, you get an updated `sitemap.xml` file in `public` directory. +This example shows how to generate Sitemap for static [Next.js](https://nextjs.org/) paths. +Everytime, you try to start a development server or make a build, you get an updated `sitemap.xml` file in `public` directory(`http://localhost:3000/sitemap.xml`). -## Getting Started +**Note**: Everytime you add or remove a page from `pages` directory, you need to restart the server, to update your `pages/sitemap.xml` file. + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com): + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/hello-world) + +## How to use -First, run the development server: +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: ```bash -npm run dev +npx create-next-app --example with-sitemap with-sitemap-app # or -yarn dev +yarn create next-app --example with-sitemap with-sitemap-app ``` -Open [http://localhost:3000/sitemap.xml](http://localhost:3000/sitemap.xml) with your browser to see the sitemap. +### Download manually -**Note**: Everytime you add or remove a page from `pages` directory, you need to restart the server, to update your `pages/sitemap.xml` file. +Download the example: -## Deploy on Vercel +```bash +curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-sitemap +cd with-sitemap +``` -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +Install it and run: + +```bash +npm install +npm run dev +# or +yarn +yarn dev +``` -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-sitemap/public/sitemap.xml b/examples/with-sitemap/public/sitemap.xml index 0afda5b27c685..73774003a77ab 100644 --- a/examples/with-sitemap/public/sitemap.xml +++ b/examples/with-sitemap/public/sitemap.xml @@ -7,4 +7,4 @@ http://localhost:3000 hourly - + \ No newline at end of file From 0bf8608d1e50f7c3753ef4653ff633990c1ec504 Mon Sep 17 00:00:00 2001 From: Khattak Date: Thu, 23 Jul 2020 12:44:48 +0500 Subject: [PATCH 07/11] Add .env Info to README --- examples/with-sitemap/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 91e053bdaa53a..4c1747e821c92 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -1,9 +1,16 @@ # With Sitemap example This example shows how to generate Sitemap for static [Next.js](https://nextjs.org/) paths. -Everytime, you try to start a development server or make a build, you get an updated `sitemap.xml` file in `public` directory(`http://localhost:3000/sitemap.xml`). +Every time, you try to start a development server or make a build, you get an updated `sitemap.xml` file in the `public` directory(`http://localhost:3000/sitemap.xml`). -**Note**: Everytime you add or remove a page from `pages` directory, you need to restart the server, to update your `pages/sitemap.xml` file. +The website URL can be changed from `.env` file in the project root. + +``` +# Used to add the domain to sitemap.xml, replace it with a real domain in production +WEBSITE_URL=http://localhost:3000 +``` + +**Note**: Every time you add or remove a page from the `pages` directory, you need to restart the server, to update your `pages/sitemap.xml` file. ## Deploy your own From d29fab627bfc53006672c3fc30f484682002f9eb Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Fri, 24 Jul 2020 12:13:29 +0500 Subject: [PATCH 08/11] Update examples/with-sitemap/README.md Co-authored-by: Luis Alvarez D. --- examples/with-sitemap/README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 4c1747e821c92..1ad2fbb783b85 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -3,15 +3,6 @@ This example shows how to generate Sitemap for static [Next.js](https://nextjs.org/) paths. Every time, you try to start a development server or make a build, you get an updated `sitemap.xml` file in the `public` directory(`http://localhost:3000/sitemap.xml`). -The website URL can be changed from `.env` file in the project root. - -``` -# Used to add the domain to sitemap.xml, replace it with a real domain in production -WEBSITE_URL=http://localhost:3000 -``` - -**Note**: Every time you add or remove a page from the `pages` directory, you need to restart the server, to update your `pages/sitemap.xml` file. - ## Deploy your own Deploy the example using [Vercel](https://vercel.com): From 90c0c0c13075c73cccdcfc58b5318343005ee100 Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Fri, 24 Jul 2020 12:14:59 +0500 Subject: [PATCH 09/11] Update examples/with-sitemap/README.md Co-authored-by: Luis Alvarez D. --- examples/with-sitemap/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 1ad2fbb783b85..22bb8a71a2ad3 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -1,7 +1,6 @@ # With Sitemap example -This example shows how to generate Sitemap for static [Next.js](https://nextjs.org/) paths. -Every time, you try to start a development server or make a build, you get an updated `sitemap.xml` file in the `public` directory(`http://localhost:3000/sitemap.xml`). +This example shows how to generate a `sitemap.xml` file based on the pages in your [Next.js](https://nextjs.org/) app. The sitemap will be generated and saved in the `public` directory after starting the development server or by making a build. ## Deploy your own From f2b9efbd6e96e0f7068d79fb4c6314c802f01086 Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Fri, 24 Jul 2020 12:15:16 +0500 Subject: [PATCH 10/11] Update examples/with-sitemap/README.md Co-authored-by: Luis Alvarez D. --- examples/with-sitemap/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 22bb8a71a2ad3..4903c30353a18 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -38,5 +38,13 @@ npm run dev yarn yarn dev ``` +Your app should be up and running on [http://localhost:3000](http://localhost:3000) and the sitemap should now be available in [http://localhost:3000/sitemap.xml](http://localhost:3000/sitemap.xml)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions). + +To change the website URL used by `sitemap.xml`, open the file `.env` and change the `WEBSITE_URL` environment variable: + +```bash +# Used to add the domain to sitemap.xml, replace it with a real domain in production +WEBSITE_URL=https://my-domain.com +``` Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). From c25f75eed57e814723aab0766b416426b20fe422 Mon Sep 17 00:00:00 2001 From: Arsalan Khattak <37709578+eKhattak@users.noreply.github.com> Date: Fri, 24 Jul 2020 21:22:55 +0500 Subject: [PATCH 11/11] Update examples/with-sitemap/README.md Co-authored-by: Luis Alvarez D. --- examples/with-sitemap/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/with-sitemap/README.md b/examples/with-sitemap/README.md index 4903c30353a18..a6d6d7b56b76b 100644 --- a/examples/with-sitemap/README.md +++ b/examples/with-sitemap/README.md @@ -38,6 +38,7 @@ npm run dev yarn yarn dev ``` + Your app should be up and running on [http://localhost:3000](http://localhost:3000) and the sitemap should now be available in [http://localhost:3000/sitemap.xml](http://localhost:3000/sitemap.xml)! If it doesn't work, post on [GitHub discussions](https://github.com/vercel/next.js/discussions). To change the website URL used by `sitemap.xml`, open the file `.env` and change the `WEBSITE_URL` environment variable: