fix: sitemap slug undefined (#493)
This commit is contained in:
parent
54b7ded4ad
commit
7ec85a002e
|
|
@ -34,7 +34,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
${pages.list?.map(
|
||||
(page: any) => ` <url>
|
||||
<loc>${link}/${page.slug || page.id}</loc>
|
||||
<loc>${link}/${page.metadata.content.slug}</loc>
|
||||
<lastmod>${dayjs(page.date_updated).format("YYYY-MM-DD")}</lastmod>
|
||||
</url>`,
|
||||
).join(`
|
||||
|
|
|
|||
Loading…
Reference in New Issue