refactor: remove unused metadata and sitemap configurations for cleaner code
This commit is contained in:
parent
9e442a51f8
commit
44aa90061e
@ -11,61 +11,12 @@ export const metadata: Metadata = {
|
||||
},
|
||||
description:
|
||||
"One stop IT solution for Japan's international community. Internet, mobile, VPN, and tech support with English service since 2002.",
|
||||
metadataBase: new URL(process.env["NEXT_PUBLIC_SITE_URL"] || "https://portal.asolutions.co.jp"),
|
||||
alternates: {
|
||||
canonical: "/",
|
||||
},
|
||||
openGraph: {
|
||||
type: "website",
|
||||
locale: "en_US",
|
||||
siteName: "Assist Solutions",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
},
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
index: false,
|
||||
follow: false,
|
||||
},
|
||||
};
|
||||
|
||||
// Organization structured data for rich search results
|
||||
const organizationJsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
name: "Assist Solutions Corp.",
|
||||
alternateName: "Assist Solutions",
|
||||
url: "https://asolutions.co.jp",
|
||||
logo: "https://portal.asolutions.co.jp/assets/images/logo.png",
|
||||
foundingDate: "2002-03-08",
|
||||
description:
|
||||
"IT and telecom services for Japan's international community with bilingual English/Japanese support.",
|
||||
address: {
|
||||
"@type": "PostalAddress",
|
||||
streetAddress: "3F Azabu Maruka Bldg., 3-8-2 Higashi Azabu",
|
||||
addressLocality: "Minato-ku",
|
||||
addressRegion: "Tokyo",
|
||||
postalCode: "106-0044",
|
||||
addressCountry: "JP",
|
||||
},
|
||||
contactPoint: [
|
||||
{
|
||||
"@type": "ContactPoint",
|
||||
telephone: "+81-3-3560-1006",
|
||||
contactType: "customer service",
|
||||
availableLanguage: ["English", "Japanese"],
|
||||
},
|
||||
{
|
||||
"@type": "ContactPoint",
|
||||
telephone: "0120-660-470",
|
||||
contactType: "customer service",
|
||||
areaServed: "JP",
|
||||
availableLanguage: ["English", "Japanese"],
|
||||
},
|
||||
],
|
||||
sameAs: ["https://www.asolutions.co.jp"],
|
||||
};
|
||||
|
||||
// Disable static generation for the entire app since it uses dynamic features extensively
|
||||
// This is the recommended approach for apps with heavy useSearchParams usage
|
||||
export const dynamic = "force-dynamic";
|
||||
@ -81,12 +32,6 @@ export default async function RootLayout({
|
||||
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<head>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationJsonLd) }}
|
||||
/>
|
||||
</head>
|
||||
<body className="antialiased">
|
||||
<QueryProvider nonce={nonce}>
|
||||
{children}
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
/**
|
||||
* Robots.txt configuration
|
||||
*
|
||||
* Controls search engine crawler access.
|
||||
* Allows all public pages, blocks account/authenticated areas.
|
||||
*/
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
const baseUrl = process.env["NEXT_PUBLIC_SITE_URL"] || "https://portal.asolutions.co.jp";
|
||||
|
||||
return {
|
||||
rules: [
|
||||
{
|
||||
userAgent: "*",
|
||||
allow: "/",
|
||||
disallow: ["/account/", "/api/", "/auth/", "/_next/", "/order/"],
|
||||
},
|
||||
],
|
||||
sitemap: `${baseUrl}/sitemap.xml`,
|
||||
};
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
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 {
|
||||
const baseUrl = process.env["NEXT_PUBLIC_SITE_URL"] || "https://portal.asolutions.co.jp";
|
||||
|
||||
// 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,
|
||||
}));
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user