-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnext-sitemap.config.js
41 lines (36 loc) · 1022 Bytes
/
next-sitemap.config.js
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
const surahs_tr = require("./data/surahsEn");
module.exports = {
siteUrl: "https://quran.so",
generateRobotsTxt: true, // (optional)
exclude: ["/about", "/search"], // (optional)
sitemapBaseFileName: "sitemap-en",
sitemapSize: 2000,
additionalPaths: async () => {
const result = [];
surahs_tr.forEach((surah) => {
result.push({
loc: `/${surah.slug}`,
changefreq: "monthly",
priority: 0.8,
lastmod: new Date().toISOString(),
});
for (let i = 1; i <= surah.verse_count; i++) {
result.push({
loc: `/${surah.slug}/verse-${i}`,
changefreq: "monthly",
priority: 0.8,
lastmod: new Date().toISOString(),
});
}
for (let i = 1; i <= surah.verse_count; i++) {
result.push({
loc: `/${surah.slug}/verse-${i}?amp=1`,
changefreq: "monthly",
priority: 0.9,
lastmod: new Date().toISOString(),
});
}
});
return result;
},
};