52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
import getPostMetadata from "@/utils/getPostMetaData"
|
|
|
|
export default async function sitemap() {
|
|
const defaultPages = [
|
|
{
|
|
url: "https://fastpocket.dev",
|
|
lastModified: new Date(),
|
|
changeFrequency: "daily",
|
|
priority: 1
|
|
},
|
|
{
|
|
url: "https://fastpocket.dev/about",
|
|
lastModified: new Date(),
|
|
changeFrequency: "monthly",
|
|
priority: 0.9
|
|
},
|
|
{
|
|
url: "https://fastpocket.dev/pricing",
|
|
lastModified: new Date(),
|
|
changeFrequency: "monthly",
|
|
priority: 0.9
|
|
},
|
|
{
|
|
url: "https://fastpocket.dev/blogs",
|
|
lastModified: new Date(),
|
|
changeFrequency: "monthly",
|
|
priority: 0.9
|
|
},
|
|
{
|
|
url: "https://fastpocket.dev/whatsnew",
|
|
lastModified: new Date(),
|
|
changeFrequency: "monthly",
|
|
priority: 0.9
|
|
}
|
|
// other pages
|
|
]
|
|
|
|
const postSlugs = await getPostMetadata()
|
|
|
|
const sitemap = [
|
|
...defaultPages,
|
|
...postSlugs.map(e => ({
|
|
url: `https://fastpocket.dev/blogs/${e.slug}`,
|
|
lastModified: e.modified,
|
|
changeFrequency: "daily",
|
|
priority: 0.8
|
|
}))
|
|
]
|
|
|
|
return sitemap
|
|
}
|