Files
Kunthawat Greethong ce8483e546 Remove Astro templates, fix sitemap template for Next.js
- Delete: CookieConsent.astro (old Astro component)
- Delete: consent.ts, right-to-be-forgotten.ts (Astro API routes)
- Update: route.ts is now proper Next.js route handler
- Update: sitemap-template.md - replace Astro pages structure with Next.js app/ structure
- Update: payload-nextjs-notes.md - fix MongoDB port reference
- Note: seo-multi-channel auto_publish.py is for Astro sites (kept as-is)
2026-04-17 11:03:10 +07:00

333 lines
9.1 KiB
Markdown

# Sitemap Template
สร้าง sitemap ตามคำตอบจาก pre-project questions
---
## Basic Sitemap Structure
```
/
├── index # Home (หน้าแรก)
├── about # About Us (เกี่ยวกับเรา)
├── services/ # Services Index (รายการบริการ)
│ ├── index # Services list
│ └── [slug] # Service detail page
├── blog/ # Blog Index (รายการบทความ)
│ ├── index # Blog list
│ └── [slug] # Blog post page
├── contact # Contact (ติดต่อ)
├── privacy-policy # Privacy Policy (นโยบายความเป็นส่วนตัว)
├── terms-of-service # Terms of Service (เงื่อนไขการให้บริการ)
├── login # Login (เข้าสู่ระบบ)
├── register # Register (สมัครสมาชิก)
├── account/ # Account Dashboard (หน้าบัญชีผู้ใช้)
│ ├── index # Dashboard overview
│ ├── profile # Edit profile
│ ├── orders # Order history
│ └── settings # Account settings
├── (optional modules...)
```
---
## Optional Modules
### Blog Module
```
/blog/
├── index # All posts
├── [slug] # Single post
└── category/[category]/ # Filter by category
└── index
```
### Portfolio Module
```
/portfolio/
├── index # Gallery overview
└── [slug] # Single portfolio item
```
### Product Catalog Module
```
/products/
├── index # Product listing
├── [slug] # Product detail
└── category/[category]/ # Filter by category
└── index
```
### FAQ Module
```
/faq/
└── index # FAQ page (accordion style)
```
### Team Module
```
/team/
├── index # Team list
└── [slug] # Team member profile
```
### Pricing Module
```
/pricing/
└── index # Pricing plans page
```
### Careers Module
```
/careers/
├── index # Job listings
└── [slug] # Job detail
```
---
## SEO Sitemap Structure
### XML Sitemap (sitemap.xml)
```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{SITE_URL}/</loc>
<lastmod>{DATE}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>{SITE_URL}/about/</loc>
<lastmod>{DATE}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<!-- เพิ่มทุกหน้าที่ต้องการ index -->
</urlset>
```
### robots.txt
```
User-agent: *
Allow: /
Sitemap: {SITE_URL}/sitemap.xml
# Block admin areas
Disallow: /admin/
Disallow: /api/
Disallow: /account/
```
---
## Page Meta Template
สร้าง meta information สำหรับแต่ละหน้า:
| Page | Title (TH) | Title (EN) | Description (TH) | Keywords |
|------|-----------|-----------|-----------------|----------|
| Home | {SITE_NAME} - {TAGLINE} | {SITE_NAME} | {DESCRIPTION} | {KEYWORDS} |
| About | เกี่ยวกับ {SITE_NAME} | About Us | {DESCRIPTION} | {KEYWORDS} |
| Services | บริการของ {SITE_NAME} | Our Services | {DESCRIPTION} | {KEYWORDS} |
| Blog | บทความ | Blog | {DESCRIPTION} | {KEYWORDS} |
| Contact | ติดต่อ {SITE_NAME} | Contact Us | {DESCRIPTION} | {KEYWORDS} |
| Privacy Policy | นโยบายความเป็นส่วนตัว | Privacy Policy | {DESCRIPTION} | privacy, pdpa, {KEYWORDS} |
| Terms | เงื่อนไขการให้บริการ | Terms of Service | {DESCRIPTION} | terms, {KEYWORDS} |
---
## Content Structure Example
```
src/
├── content/
│ ├── pages/
│ │ ├── home.md
│ │ ├── about.md
│ │ ├── contact.md
│ │ ├── privacy-policy.md
│ │ └── terms-of-service.md
│ ├── blog/
│ │ ├── post-1.md
│ │ ├── post-2.md
│ │ └── ...
│ ├── services/
│ │ ├── service-1.md
│ │ └── ...
│ └── team/
│ ├── member-1.md
│ └── ...
├── app/
│ ├── (frontend)/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── about/
│ │ │ └── page.tsx
│ │ ├── services/
│ │ │ ├── page.tsx
│ │ │ └── [slug]/
│ │ │ └── page.tsx
│ │ ├── blog/
│ │ │ ├── page.tsx
│ │ │ └── [slug]/
│ │ │ └── page.tsx
│ │ ├── contact/
│ │ │ └── page.tsx
│ │ ├── privacy-policy/
│ │ │ └── page.tsx
│ │ ├── terms-of-service/
│ │ │ └── page.tsx
│ │ ├── login/
│ │ │ └── page.tsx
│ │ ├── register/
│ │ │ └── page.tsx
│ │ └── account/
│ │ ├── page.tsx
│ │ ├── profile/
│ │ │ └── page.tsx
│ │ ├── orders/
│ │ │ └── page.tsx
│ │ └── settings/
│ │ └── page.tsx
│ └── (payload)/
│ ├── admin/
│ │ └── [[...segments]]/
│ │ └── page.tsx
│ └── api/
│ └── ...
├── components/
│ ├── Navigation.tsx
│ ├── Footer.tsx
│ ├── Hero.tsx
│ ├── ServiceCard.tsx
│ ├── BlogCard.tsx
│ ├── ContactForm.tsx
│ ├── CookieConsent.tsx
│ └── ...
└── collections/
├── Posts.ts
├── Pages.ts
├── Media.ts
├── Users.ts
└── ConsentLogs.ts
```
---
## Navigation Structure
### Desktop Navigation
```
[Logo] Home | Services | Blog | About | Contact [Login] [Register]
```
### Mobile Navigation (Hamburger)
```
☰ [Logo]
─────────
Home
Services
Blog
About
Contact
─────────
Login
Register
```
---
## Footer Structure
```
[Logo + Tagline]
[Links Column 1] [Links Column 2] [Links Column 3] [Contact]
- หน้าแรก - บริการ - บทความ - {ADDRESS}
- เกี่ยวกับเรา - ผลงาน - คำถามที่พบบ่อย - {PHONE}
- ติดต่อเรา - ติดต่อ - นโยบายความเป็นส่วนตัว - {EMAIL}
- สมัครสมาชิก - เงื่อนไขการให้บริการ
Copyright (c) {YEAR} {SITE_NAME} | Built with Next.js + Payload CMS
```
---
## JSON-LD Structured Data
### Organization Schema
```json
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "{SITE_NAME}",
"url": "{SITE_URL}",
"logo": "{SITE_URL}/logo.png",
"description": "{DESCRIPTION}",
"address": {
"@type": "PostalAddress",
"streetAddress": "{ADDRESS}",
"addressLocality": "{CITY}",
"addressCountry": "TH"
},
"contactPoint": {
"@type": "ContactPoint",
"telephone": "{PHONE}",
"contactType": "customer service"
}
}
```
### LocalBusiness Schema (ถ้ามีร้านค้า)
```json
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "{SITE_NAME}",
"image": "{SITE_URL}/og-image.jpg",
"priceRange": "{PRICE_RANGE}",
"address": {...},
"openingHoursSpecification": {...},
"aggregateRating": {...}
}
```
### WebSite Schema
```json
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "{SITE_NAME}",
"url": "{SITE_URL}",
"potentialAction": {
"@type": "SearchAction",
"target": "{SITE_URL}/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
```
---
## Notes
- ทุกหน้าต้องมี:
- Title tag (unique)
- Meta description (unique)
- Open Graph tags
- Canonical URL
- Structured data (ถ้าเหมาะสม)
- หน้า Privacy Policy และ Terms of Service ต้องมี:
- วันที่มีผลบังคับใช้
- วันที่แก้ไขล่าสุด
- ข้อมูล DPO
- ลิงก์ถึงกัน
- หน้า Contact ต้องมี:
- แบบฟอร์มติดต่อ (ทำงานจริง)
- ข้อมูลติดต่อ (ที่อยู่, โทร, อีเมล)
- แผนที่ (ถ้ามีร้านค้า)