Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor with-next-sitemap example #40712

Merged
merged 6 commits into from Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/with-next-sitemap/.gitignore
Expand Up @@ -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
@@ -1,3 +1,4 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://example.com',
generateRobotsTxt: true,
Expand Down
12 changes: 6 additions & 6 deletions examples/with-next-sitemap/package.json
Expand Up @@ -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"
}
}
5 changes: 2 additions & 3 deletions examples/with-next-sitemap/pages/[dynamic].tsx
Expand Up @@ -3,12 +3,11 @@ import { useRouter } from 'next/router'

const DynamicPage = () => {
const { query } = useRouter()

return (
<div>
<>
<h1>Dynamic Page</h1>
<h2>Query: {query.dynamic}</h2>
</div>
</>
)
}

Expand Down
8 changes: 4 additions & 4 deletions examples/with-next-sitemap/pages/index.tsx
@@ -1,7 +1,7 @@
import Link from 'next/link'

const HelloWorld = () => (
<div>
const IndexPage = () => (
<>
<h1>Hello World Page</h1>
<ol>
<li>
Expand Down Expand Up @@ -30,7 +30,7 @@ const HelloWorld = () => (
</Link>
</li>
</ol>
</div>
</>
)

export default HelloWorld
export default IndexPage
3 changes: 2 additions & 1 deletion examples/with-next-sitemap/tsconfig.json
Expand Up @@ -12,7 +12,8 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down