Skip to content
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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

LovedeepSingh19
Copy link
Contributor

Basic sitemap containing marketplace packages.

@LovedeepSingh19 LovedeepSingh19 linked an issue Nov 30, 2023 that may be closed by this pull request
3 tasks
Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sugarcane-ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 9:28pm

Comment on lines 2 to 7
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const prisma = new PrismaClient({
log:
process.env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"],
});

Copy link
Contributor

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);
Copy link
Contributor

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

Comment on lines 10 to 20
const packages = await prisma.promptPackage.findMany({
where: {
visibility: PackageVisibility.PUBLIC,
},
orderBy: {
updatedAt: "desc",
},
include: {
User: true,
},
});
Copy link
Contributor

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.

@devilankur18
Copy link
Contributor

devilankur18 commented Feb 3, 2024

@LovedeepSingh19 use getServerSideProps to generate sitemaps on ondemand.

https://nextjs.org/learn-pages-router/seo/crawling-and-indexing/xml-sitemaps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Cube]: Search Engine Sitemap for all public cubes
2 participants