-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
next-sitemap-1 #116
base: develop
Are you sure you want to change the base?
next-sitemap-1 #116
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
apps/factory/next-sitemap.config.mjs
Outdated
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
const prisma = new PrismaClient({ | ||
log: | ||
process.env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"], | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import prisma from db, no need to redefine it.
}; | ||
}); | ||
} catch (error) { | ||
console.error("Failed to fetch package data:", error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use sentry to report exception
apps/factory/next-sitemap.config.mjs
Outdated
const packages = await prisma.promptPackage.findMany({ | ||
where: { | ||
visibility: PackageVisibility.PUBLIC, | ||
}, | ||
orderBy: { | ||
updatedAt: "desc", | ||
}, | ||
include: { | ||
User: true, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a common function and reuse it.
b4079f1
to
8642afc
Compare
760bc32
to
8d4361a
Compare
@LovedeepSingh19 use getServerSideProps to generate sitemaps on ondemand. https://nextjs.org/learn-pages-router/seo/crawling-and-indexing/xml-sitemaps |
Basic sitemap containing marketplace packages.