Skip to content

Commit ad03f1f

Browse files
committed
nit: sitemap
1 parent 0bd87b4 commit ad03f1f

1 file changed

Lines changed: 30 additions & 104 deletions

File tree

apps/docs/src/app/sitemap.ts

Lines changed: 30 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,34 @@
11
import type { MetadataRoute } from 'next'
22

3+
const BASE_URL = 'https://reactqrcode.com'
4+
const DEFAULT_OPTIONS = {
5+
lastModified: new Date(),
6+
changeFrequency: 'monthly' as const,
7+
}
8+
const PAGES = [
9+
{ path: '', priority: 1 },
10+
{ path: '/installation', priority: 0.8 },
11+
{ path: '/quick-start', priority: 0.8 },
12+
{ path: '/demo', priority: 0.9 },
13+
{ path: '/react-qr-code-props', priority: 0.7 },
14+
{ path: '/data-modules-settings', priority: 0.7 },
15+
{ path: '/finder-pattern-outer-settings', priority: 0.7 },
16+
{ path: '/finder-pattern-inner-settings', priority: 0.7 },
17+
{ path: '/gradient-settings', priority: 0.7 },
18+
{ path: '/image-settings', priority: 0.7 },
19+
{ path: '/ref-api', priority: 0.7 },
20+
{ path: '/examples/basic', priority: 0.7 },
21+
{ path: '/examples/data-modules', priority: 0.7 },
22+
{ path: '/examples/finder-patterns', priority: 0.7 },
23+
{ path: '/examples/background', priority: 0.7 },
24+
{ path: '/examples/image', priority: 0.7 },
25+
{ path: '/examples/download', priority: 0.7 },
26+
]
27+
328
export default function sitemap(): MetadataRoute.Sitemap {
4-
return [
5-
{
6-
url: 'https://reactqrcode.com',
7-
lastModified: new Date(),
8-
changeFrequency: 'monthly',
9-
priority: 1,
10-
},
11-
{
12-
url: 'https://reactqrcode.com/installation',
13-
lastModified: new Date(),
14-
changeFrequency: 'monthly',
15-
priority: 0.8,
16-
},
17-
{
18-
url: 'https://reactqrcode.com/quick-start',
19-
lastModified: new Date(),
20-
changeFrequency: 'monthly',
21-
priority: 0.8,
22-
},
23-
{
24-
url: 'https://reactqrcode.com/demo',
25-
lastModified: new Date(),
26-
changeFrequency: 'monthly',
27-
priority: 0.9,
28-
},
29-
{
30-
url: 'https://reactqrcode.com/react-qr-code-props',
31-
lastModified: new Date(),
32-
changeFrequency: 'monthly',
33-
priority: 0.7,
34-
},
35-
{
36-
url: 'https://reactqrcode.com/data-modules-settings',
37-
lastModified: new Date(),
38-
changeFrequency: 'monthly',
39-
priority: 0.7,
40-
},
41-
{
42-
url: 'https://reactqrcode.com/finder-pattern-outer-settings',
43-
lastModified: new Date(),
44-
changeFrequency: 'monthly',
45-
priority: 0.7,
46-
},
47-
{
48-
url: 'https://reactqrcode.com/finder-pattern-inner-settings',
49-
lastModified: new Date(),
50-
changeFrequency: 'monthly',
51-
priority: 0.7,
52-
},
53-
{
54-
url: 'https://reactqrcode.com/gradient-settings',
55-
lastModified: new Date(),
56-
changeFrequency: 'monthly',
57-
priority: 0.7,
58-
},
59-
{
60-
url: 'https://reactqrcode.com/image-settings',
61-
lastModified: new Date(),
62-
changeFrequency: 'monthly',
63-
priority: 0.7,
64-
},
65-
{
66-
url: 'https://reactqrcode.com/ref-api',
67-
lastModified: new Date(),
68-
changeFrequency: 'monthly',
69-
priority: 0.7,
70-
},
71-
{
72-
url: 'https://reactqrcode.com/examples/basic',
73-
lastModified: new Date(),
74-
changeFrequency: 'monthly',
75-
priority: 0.7,
76-
},
77-
{
78-
url: 'https://reactqrcode.com/examples/data-modules',
79-
lastModified: new Date(),
80-
changeFrequency: 'monthly',
81-
priority: 0.7,
82-
},
83-
{
84-
url: 'https://reactqrcode.com/examples/finder-patterns',
85-
lastModified: new Date(),
86-
changeFrequency: 'monthly',
87-
priority: 0.7,
88-
},
89-
{
90-
url: 'https://reactqrcode.com/examples/background',
91-
lastModified: new Date(),
92-
changeFrequency: 'monthly',
93-
priority: 0.7,
94-
},
95-
{
96-
url: 'https://reactqrcode.com/examples/image',
97-
lastModified: new Date(),
98-
changeFrequency: 'monthly',
99-
priority: 0.7,
100-
},
101-
{
102-
url: 'https://reactqrcode.com/examples/download',
103-
lastModified: new Date(),
104-
changeFrequency: 'monthly',
105-
priority: 0.7,
106-
},
107-
]
29+
return PAGES.map(({ path, priority }) => ({
30+
url: `${BASE_URL}${path}`,
31+
priority,
32+
...DEFAULT_OPTIONS,
33+
}))
10834
}

0 commit comments

Comments
 (0)