@djangocfg/seo 2.1.411 → 2.1.413

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1233,31 +1233,31 @@ function generateClaudeContext(report) {
1233
1233
  lines.push("");
1234
1234
  lines.push("**Required files in `app/`:**");
1235
1235
  lines.push("");
1236
- lines.push("### sitemap.xml/route.ts");
1236
+ lines.push("### sitemap.ts");
1237
1237
  lines.push("```typescript");
1238
- lines.push("import { createSitemapHandler } from '@djangocfg/nextjs/sitemap';");
1239
- lines.push("");
1240
- lines.push('export const dynamic = "force-static";');
1241
- lines.push("export const { GET } = createSitemapHandler({");
1242
- lines.push(" siteUrl,");
1243
- lines.push(" staticPages: [");
1244
- lines.push(' { loc: "/", priority: 1.0, changefreq: "daily" },');
1245
- lines.push(' { loc: "/about", priority: 0.8 },');
1238
+ lines.push("import { createDjangoSitemap } from '@djangocfg/nextjs/sitemap';");
1239
+ lines.push("");
1240
+ lines.push("const { generateSitemaps, sitemap } = createDjangoSitemap({");
1241
+ lines.push(" host: process.env.NEXT_PUBLIC_SITE_URL!,");
1242
+ lines.push(" // apiUrl: process.env.NEXT_PUBLIC_API_URL, // pulls /cfg/sitemap/* from Django");
1243
+ lines.push(" staticRoutes: [");
1244
+ lines.push(' { path: "/", changeFrequency: "daily", priority: 1.0 },');
1245
+ lines.push(' { path: "/about", changeFrequency: "weekly", priority: 0.8 },');
1246
1246
  lines.push(" ],");
1247
- lines.push(" dynamicPages: async () => fetchPagesFromAPI(),");
1248
1247
  lines.push("});");
1248
+ lines.push("");
1249
+ lines.push("export { generateSitemaps, sitemap as default };");
1250
+ lines.push("export const revalidate = 3600;");
1249
1251
  lines.push("```");
1250
1252
  lines.push("");
1251
1253
  lines.push("### robots.ts");
1252
1254
  lines.push("```typescript");
1253
- lines.push("import type { MetadataRoute } from 'next';");
1254
- lines.push("");
1255
- lines.push("export default function robots(): MetadataRoute.Robots {");
1256
- lines.push(" return {");
1257
- lines.push(' rules: { userAgent: "*", allow: "/" },');
1258
- lines.push(" sitemap: `${siteUrl}/sitemap.xml`,");
1259
- lines.push(" };");
1260
- lines.push("}");
1255
+ lines.push("import { createRobots } from '@djangocfg/nextjs/sitemap';");
1256
+ lines.push("");
1257
+ lines.push("export default createRobots({");
1258
+ lines.push(" host: process.env.NEXT_PUBLIC_SITE_URL!,");
1259
+ lines.push(' disallow: ["/account/", "/auth", "/api/"],');
1260
+ lines.push("});");
1261
1261
  lines.push("```");
1262
1262
  lines.push("");
1263
1263
  lines.push("### Cloudflare Override");