Remove Astro references from website-creator skill

This commit is contained in:
2026-04-16 18:51:36 +07:00
parent ba1bca244a
commit 2d57380c79

View File

@@ -1327,23 +1327,8 @@ cp ConsentLogs.ts src/collections/
mkdir -p src/app/api/consent mkdir -p src/app/api/consent
# 3. เพิ่ม collection ใน payload.config.ts # 3. เพิ่ม collection ใน payload.config.ts
**⚠️ สำคัญมาก: portal-mini-store-template มีปัญหา**
Template นี้เมื่อ clone มาจริงๆ คือ **Astro project** (Astro 6 + Tailwind v4 + SQLite/LibSQL) ไม่ใช่ Next.js + Payload + MongoDB ตามที่อธิบายไว้ใน skill นี้! ### portal-mini-store-template (MongoDB)
```bash
# สิ่งที่ได้จริงๆ คือ Astro project:
# - astro.config.mjs
# - src/content.config.ts
# - @astrojs/db (ไม่ใช่ @payloadcms/db-mongodb)
# - better-sqlite3 / libsql (ไม่ใช่ MongoDB)
```
**ทางแก้:** ถ้าต้องการ Next.js + Payload + MongoDB ต้องสร้างจาก template อื่น หรือใช้ website-creator อ้างอิง pattern จาก github.com/payloadcms/payload/tree/main/templates/with-postgres โดยเปลี่ยน db adapter เป็น mongooseAdapter
---
### portal-mini-store-template (MongoDB) — ข้อมูลเดิม (พบว่าไม่ตรงความจริง)
**เปิดเข้าไปใน project:** **เปิดเข้าไปใน project:**
cd portal-mini-store-template cd portal-mini-store-template
@@ -1505,19 +1490,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
} }
``` ```
### Issue 2: Title field structure — seoTitle vs title ### Issue 2: sitemap.xml and robots.txt routes must export GET
**สิ่งที่พบ:** Astro templates เก็บ full title ไว้ที่ metadata (เช่น `"AI Automation | MoreminiMore"`) แต่ h1 ใช้ short title (เช่น `"AI Automation"`)
**ทางแก้:** Payload `Pages` collection ควรมี 2 fields:
```ts
{ name: 'title', type: 'text', required: true }, // short: "AI Automation" → h1
{ name: 'seoTitle', type: 'text' }, // full: "AI Automation | MoreminiMore" → <title>
```
Seed script ต้องแยก: ดึง full title จาก Astro → ใส่ `seoTitle`, สร้าง short title จาก slug → ใส่ `title`
### Issue 3: sitemap.xml and robots.txt routes must export GET
**รูปแบบผิด:** **รูปแบบผิด:**
```ts ```ts