diff --git a/skills/website-creator/SKILL.md b/skills/website-creator/SKILL.md index 8fa8d1a..de84c86 100644 --- a/skills/website-creator/SKILL.md +++ b/skills/website-creator/SKILL.md @@ -1327,23 +1327,8 @@ cp ConsentLogs.ts src/collections/ mkdir -p src/app/api/consent # 3. เพิ่ม collection ใน payload.config.ts -**⚠️ สำคัญมาก: portal-mini-store-template มีปัญหา** -Template นี้เมื่อ clone มาจริงๆ คือ **Astro project** (Astro 6 + Tailwind v4 + SQLite/LibSQL) ไม่ใช่ Next.js + Payload + MongoDB ตามที่อธิบายไว้ใน skill นี้! - -```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) — ข้อมูลเดิม (พบว่าไม่ตรงความจริง) +### portal-mini-store-template (MongoDB) **เปิดเข้าไปใน project:** 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 - -**สิ่งที่พบ:** 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" →