Add SEO improvements: sitemap, robots.txt, LocalBusiness schema, GA4, llm.txt
- Add dynamic sitemap.xml generation for all pages - Add robots.txt for search engine crawl directives - Add LocalBusiness JSON-LD schema for local SEO - Add BreadcrumbList schema for navigation breadcrumbs - Add canonical URLs to all product pages - Add Twitter Cards metadata - Add Google Analytics 4 integration component - Create llm.txt with all product data for AI optimization - Create reusable UI components (Button, Card, Badge) - Update company address to full Thai address - Update .env.example with GA4 placeholder
This commit is contained in:
@@ -4,6 +4,7 @@ import '@/styles/globals.css';
|
||||
import Header from '@/components/layout/Header';
|
||||
import Footer from '@/components/layout/Footer';
|
||||
import FloatingContact from '@/components/layout/FloatingContact';
|
||||
import GoogleAnalytics from '@/components/analytics/GoogleAnalytics';
|
||||
|
||||
const kanit = Kanit({
|
||||
subsets: ['latin', 'thai'],
|
||||
@@ -20,6 +21,10 @@ export const metadata: Metadata = {
|
||||
description: 'ดีลพลัสเทค - ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ ท่อพีพีอาร์ ท่อ HDPE ท่อ PVC วาล์ว และอุปกรณ์ต่อท่อครบวงจร',
|
||||
keywords: ['ท่อพีพีอาร์', 'ท่อ HDPE', 'ท่อ PVC', 'วาล์ว', 'อุปกรณ์ท่อ', 'ดีลพลัสเทค'],
|
||||
authors: [{ name: 'Deal Plus Tech' }],
|
||||
metadataBase: new URL('https://dealplustech.co.th'),
|
||||
alternates: {
|
||||
canonical: '/',
|
||||
},
|
||||
openGraph: {
|
||||
type: 'website',
|
||||
locale: 'th_TH',
|
||||
@@ -27,9 +32,104 @@ export const metadata: Metadata = {
|
||||
siteName: 'ดีลพลัสเทค',
|
||||
title: 'ดีลพลัสเทค - ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ',
|
||||
description: 'ดีลพลัสเทค - ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ ท่อพีพีอาร์ ท่อ HDPE ท่อ PVC วาล์ว และอุปกรณ์ต่อท่อครบวงจร',
|
||||
images: [
|
||||
{
|
||||
url: '/og-image.jpg',
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: 'ดีลพลัสเทค - ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ',
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
site: '@dealplustech',
|
||||
title: 'ดีลพลัสเทค - ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ',
|
||||
description: 'ดีลพลัสเทค - ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ ท่อพีพีอาร์ ท่อ HDPE ท่อ PVC วาล์ว และอุปกรณ์ต่อท่อครบวงจร',
|
||||
images: ['/og-image.jpg'],
|
||||
},
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
googleBot: {
|
||||
index: true,
|
||||
follow: true,
|
||||
'max-video-preview': -1,
|
||||
'max-image-preview': 'large',
|
||||
'max-snippet': -1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// LocalBusiness Schema for SEO
|
||||
function LocalBusinessSchema() {
|
||||
const schema = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'LocalBusiness',
|
||||
'@id': 'https://dealplustech.co.th/#organization',
|
||||
name: 'ดีลพลัสเทค',
|
||||
alternateName: 'Deal Plus Tech Co., Ltd.',
|
||||
description: 'ผู้เชี่ยวชาญด้านวัสดุท่อและอุปกรณ์ระบบท่อ จำหน่ายท่อพีพีอาร์ ท่อ HDPE ท่อ PVC วาล์ว และอุปกรณ์ต่อท่อครบวงจร',
|
||||
url: 'https://dealplustech.co.th',
|
||||
logo: 'https://dealplustech.co.th/images/logo.png',
|
||||
image: 'https://dealplustech.co.th/og-image.jpg',
|
||||
telephone: '+66-90-555-1415',
|
||||
email: 'info@dealplustech.co.th',
|
||||
address: {
|
||||
'@type': 'PostalAddress',
|
||||
streetAddress: '9/70 ซอยนครลุง 17',
|
||||
addressLocality: 'แขวงบางไผ่',
|
||||
addressRegion: 'เขตบางแค',
|
||||
addressCountry: 'TH',
|
||||
postalCode: '10160',
|
||||
},
|
||||
geo: {
|
||||
'@type': 'GeoCoordinates',
|
||||
latitude: '13.7244',
|
||||
longitude: '100.4044',
|
||||
},
|
||||
openingHoursSpecification: [
|
||||
{
|
||||
'@type': 'OpeningHoursSpecification',
|
||||
dayOfWeek: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
|
||||
opens: '08:30',
|
||||
closes: '17:30',
|
||||
},
|
||||
{
|
||||
'@type': 'OpeningHoursSpecification',
|
||||
dayOfWeek: 'Saturday',
|
||||
opens: '08:30',
|
||||
closes: '12:00',
|
||||
},
|
||||
],
|
||||
priceRange: '$$',
|
||||
sameAs: [
|
||||
'https://facebook.com/dealplustech',
|
||||
'https://line.me/ti/p/@dealplustech',
|
||||
],
|
||||
areaServed: {
|
||||
'@type': 'Country',
|
||||
name: 'Thailand',
|
||||
},
|
||||
knowsAbout: [
|
||||
'ท่อพีพีอาร์ (PPR Pipe)',
|
||||
'ท่อ HDPE',
|
||||
'ท่อ PVC',
|
||||
'วาล์ว (Valve)',
|
||||
'อุปกรณ์ระบบท่อ',
|
||||
'ระบบดับเพลิง',
|
||||
'ระบบปรับอากาศ HVAC',
|
||||
],
|
||||
};
|
||||
|
||||
return (
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
@@ -37,7 +137,11 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="th" className={kanit.variable}>
|
||||
<head>
|
||||
<LocalBusinessSchema />
|
||||
</head>
|
||||
<body className="font-sans">
|
||||
<GoogleAnalytics />
|
||||
<Header />
|
||||
<main className="min-h-screen">{children}</main>
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user