Next-Sitemap not picking up one of my pages in production?
Unanswered
Highlander posted this in #help-forum
HighlanderOP
Hi, I am using the next-sitemap package and everything works fine in localhost but in production my blog page and blogs aren't being included in my sitemap.
Here is the next-sitemap.config.js file:
Here is the blog page:
Any help or insight would be appreciated
Here is the next-sitemap.config.js file:
module.exports = {
siteUrl: process.env.SITE_URL || 'http://localhost:3000',
generateRobotsTxt: true,
generateIndexSitemap: false
}Here is the blog page:
import ListItem from "@/app/components/ListItem";
import { getPostsMeta } from "@/lib/posts";
export const revalidate = 10;
export const metadata = {
title: "Blog | Competitive Edge Dumpsters",
description: "Read our blog for tips and tricks on dumpster rentals, junk removal, and more.",
alternates: {
canonical: "https://www.competitiveedgedumpsters.com/blog",
},
};
export default async function Posts() {
const posts = await getPostsMeta();
if (!posts) {
return <p className="mt-10 text-center">Sorry, no posts available</p>
}
return (
<section className="pt-24 mx-auto max-w-[1280px]">
<h2 className="text-4xl font-bold text-center mb-8">Our Blog</h2>
<ul className="w-full grid grid-cols-1 md:grid-cols-2 px-10 gap-10 gap-y-16 pb-24">
{posts.map(post => (
<ListItem key={post.id} post={post} />
))}
</ul>
</section>
)Any help or insight would be appreciated