diff --git a/examples/with-next-sitemap/.gitignore b/examples/with-next-sitemap/.gitignore index c87c9b392c020..2358b3776292e 100644 --- a/examples/with-next-sitemap/.gitignore +++ b/examples/with-next-sitemap/.gitignore @@ -34,3 +34,8 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# next sitemap build +public/robots.txt +public/sitemap.xml +public/sitemap-*.xml \ No newline at end of file diff --git a/examples/with-next-sitemap/next-sitemap.js b/examples/with-next-sitemap/next-sitemap.config.js similarity index 87% rename from examples/with-next-sitemap/next-sitemap.js rename to examples/with-next-sitemap/next-sitemap.config.js index 79a7b9c6f3b77..c127ef9e53677 100644 --- a/examples/with-next-sitemap/next-sitemap.js +++ b/examples/with-next-sitemap/next-sitemap.config.js @@ -1,3 +1,4 @@ +/** @type {import('next-sitemap').IConfig} */ module.exports = { siteUrl: 'https://example.com', generateRobotsTxt: true, diff --git a/examples/with-next-sitemap/package.json b/examples/with-next-sitemap/package.json index f538893148dc6..21f884cb41a6e 100644 --- a/examples/with-next-sitemap/package.json +++ b/examples/with-next-sitemap/package.json @@ -8,13 +8,13 @@ }, "dependencies": { "next": "latest", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "devDependencies": { - "@types/node": "14.6.0", - "@types/react": "^16.9.45", - "next-sitemap": "latest", - "typescript": "^4.3.2" + "@types/node": "18.7.18", + "@types/react": "^18.0.20", + "next-sitemap": "3.1.22", + "typescript": "^4.8.3" } } diff --git a/examples/with-next-sitemap/pages/[dynamic].tsx b/examples/with-next-sitemap/pages/[dynamic].tsx index 1847e6aba2de4..ef76099e22960 100644 --- a/examples/with-next-sitemap/pages/[dynamic].tsx +++ b/examples/with-next-sitemap/pages/[dynamic].tsx @@ -3,12 +3,11 @@ import { useRouter } from 'next/router' const DynamicPage = () => { const { query } = useRouter() - return ( -