forked from react-hook-form/documentation
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnext-sitemap.config.js
More file actions
54 lines (51 loc) Β· 1.27 KB
/
next-sitemap.config.js
File metadata and controls
54 lines (51 loc) Β· 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://react-ko-form.netlify.app",
generateRobotsTxt: true,
exclude: ["/providers/*"],
robotsTxtOptions: {
policies: [
{
userAgent: "*",
allow: "/",
disallow: ["/providers/"],
},
],
},
transform: async (config, path) => {
// ννμ΄μ§λ κ°μ₯ λμ priority
if (path === "/") {
return {
loc: path,
changefreq: "weekly",
priority: 1.0,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
}
}
// μ£Όμ λ¬Έμ νμ΄μ§
if (path === "/get-started" || path === "/docs") {
return {
loc: path,
changefreq: "weekly",
priority: 0.9,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
}
}
// API λ¬Έμ νμ΄μ§
if (path.startsWith("/docs/")) {
return {
loc: path,
changefreq: "weekly",
priority: 0.8,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
}
}
// κΈ°ν νμ΄μ§
return {
loc: path,
changefreq: "monthly",
priority: 0.6,
lastmod: config.autoLastmod ? new Date().toISOString() : undefined,
}
},
}