Move seed.sql out of migrations and add SEO structured data

- Relocate seed.sql to scripts/ so wrangler d1 migrations apply
  doesn't treat it as a migration; update package.json, setup.mjs,
  README, and all AGENTS.md references.
- Add src/lib/schema-org.ts builders (LocalBusiness, FAQPage,
  BlogPosting, BreadcrumbList) and emit JSON-LD via Base.astro.
- Add lastmod to sitemap entries.
- Set real site domain, worker route, and D1/KV ids.
- Improve image loading hints and heading semantics across site
  components; switch BlogIndex to client:idle.
This commit is contained in:
2026-09-13 16:21:59 +08:00
parent f6b885efe6
commit 6dedb5469f
28 changed files with 255 additions and 108 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ D1 讀取查詢層(`content.ts`)同後台網站設定欄位定義(`setting
- **Slug 去重**`uniqueSlug(db, base, selfId?)` 撞 slug 就加 `-2``-3`…;`selfId` 用喺更新自己時排除自己。admin 文章同 AI 生成都用。
- **`Db` 型別**`DrizzleD1Database<typeof schema>`
- **連結 helper**`whatsappHref` / `telHref` / `mailHref` / `digits` / `formatDate`;電話/WhatsApp 一律經呢啲 helper,唔好散寫。
- **設定欄位**`settings-fields.ts``SETTINGS_GROUPS``/admin/settings` 表單的唯一來源;新增一個 setting key 之後,要同步加落 `migrations/seed.sql`
- **設定欄位**`settings-fields.ts``SETTINGS_GROUPS``/admin/settings` 表單的唯一來源;新增一個 setting key 之後,要同步加落 `scripts/seed.sql`
- **圖片欄位**`FieldType``"image"``hero_image` / `og_image` 用呢個型別,`/admin/settings` 會 render `ImageField`(可上傳去 R2)。
- 顯示用文案繁體中文。