Skip to content

Commit 1c1aac2

Browse files
committed
chore: added sitemap
chore: added sitemap
1 parent 51cefdd commit 1c1aac2

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
NEXT_PUBLIC_BASE_URL=
12
NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION=

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
3333

3434
## Building
3535

36+
Set the correct environment variables in `.env` or your CI/CD:
37+
3638
```bash
37-
npm run build
39+
cp .env.example .env
3840
```
3941

40-
## Deployment
42+
Build:
4143

42-
Set the correct environment variables as defined in `.env.example`
44+
```bash
45+
npm run build
46+
```
4347

4448
## Contribution
4549

src/app/sitemap.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { MetadataRoute } from 'next'
2+
3+
export const revalidate = false
4+
5+
export default function Sitemap(): MetadataRoute.Sitemap {
6+
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL
7+
return [
8+
{
9+
url: `${baseUrl}/`,
10+
lastModified: new Date(),
11+
changeFrequency: 'monthly',
12+
priority: 1,
13+
},
14+
{
15+
url: `${baseUrl}/quiz`,
16+
lastModified: new Date(),
17+
changeFrequency: 'monthly',
18+
priority: 0.8,
19+
},
20+
]
21+
}

0 commit comments

Comments
 (0)