2026-01-16 17:19:46 +09:00
|
|
|
import type { MetadataRoute } from "next";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sitemap for SEO
|
|
|
|
|
*
|
|
|
|
|
* Generates a sitemap.xml for search engine crawlers.
|
|
|
|
|
* Only includes public pages that should be indexed.
|
|
|
|
|
*/
|
|
|
|
|
export default function sitemap(): MetadataRoute.Sitemap {
|
2026-02-03 17:35:47 +09:00
|
|
|
const baseUrl = process.env["NEXT_PUBLIC_SITE_URL"] || "https://portal.asolutions.co.jp";
|
2026-01-16 17:19:46 +09:00
|
|
|
|
|
|
|
|
// Public pages that should be indexed
|
|
|
|
|
const publicPages = [
|
|
|
|
|
{ path: "", priority: 1.0, changeFrequency: "weekly" as const },
|
|
|
|
|
{ path: "/about", priority: 0.8, changeFrequency: "monthly" as const },
|
|
|
|
|
{ path: "/services", priority: 0.9, changeFrequency: "weekly" as const },
|
|
|
|
|
{ path: "/services/internet", priority: 0.8, changeFrequency: "weekly" as const },
|
|
|
|
|
{ path: "/services/sim", priority: 0.8, changeFrequency: "weekly" as const },
|
|
|
|
|
{ path: "/services/vpn", priority: 0.7, changeFrequency: "monthly" as const },
|
|
|
|
|
{ path: "/services/tv", priority: 0.7, changeFrequency: "monthly" as const },
|
|
|
|
|
{ path: "/services/onsite", priority: 0.7, changeFrequency: "monthly" as const },
|
|
|
|
|
{ path: "/services/business", priority: 0.7, changeFrequency: "monthly" as const },
|
|
|
|
|
{ path: "/contact", priority: 0.8, changeFrequency: "monthly" as const },
|
|
|
|
|
{ path: "/help", priority: 0.6, changeFrequency: "monthly" as const },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return publicPages.map(page => ({
|
|
|
|
|
url: `${baseUrl}${page.path}`,
|
|
|
|
|
lastModified: new Date(),
|
|
|
|
|
changeFrequency: page.changeFrequency,
|
|
|
|
|
priority: page.priority,
|
|
|
|
|
}));
|
|
|
|
|
}
|