# GENERATED by scripts/make-demo-config.mjs from config.yml. Do not edit by hand.
# Sveltia CMS configuration (poc-plan 5.3 / 5.4).
# Keep in sync with src/content.config.ts: a field added there must be added here, and vice versa.
#
# Setup still to do before the team can sign in on the deployed site (needs the dev's accounts):
#   1. create the GitHub repo and put "owner/repo" below
#   2. create a GitHub OAuth App and deploy the Sveltia CMS Authenticator on Cloudflare Workers
#   3. put the Worker URL in backend.base_url
# Until then use the local workflow: `npm run dev`, open /admin/, "Work with Local Repository"
# (Chrome or Edge, project folder must be a git repo).

backend:
  name: test-repo

site_url: https://labweb-poc.pages.dev # TBD: real URL once known
display_url: https://labweb-poc.pages.dev

# Global media folder (used by anything without its own). Collections that keep pictures next to
# their entry override it with an empty media_folder, so Astro can resize them at build time.
media_folder: public/uploads
public_folder: /uploads

# TH is the default language. If the client picks EN (question 10) change it here AND in
# src/lib/i18n.ts AND astro.config.mjs.
i18n:
  structure: multiple_files
  locales: [th, en]
  default_locale: th

collections:
  # ------------------------------------------------------------------ news
  - name: news
    label: ข่าวและกิจกรรม
    label_singular: ข่าว
    folder: src/content/news
    extension: md
    format: yaml-frontmatter
    create: true
    slug: '{{fields.slug}}'
    summary: '{{date}} {{title}}'
    sortable_fields: [date, title]
    media_folder: ''
    public_folder: ''
    i18n: true
    fields:
      - { name: slug, label: ชื่อไฟล์ (URL), widget: string, i18n: duplicate, pattern: ['^[a-z0-9]+(-[a-z0-9]+)*$', 'ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และ - เท่านั้น'], hint: 'ขึ้นต้นด้วยวันที่ เช่น 2026-11-20-open-day ใช้เป็นลิงก์ของข่าว ตั้งแล้วไม่ควรเปลี่ยน' }
      - { name: title, label: หัวข้อข่าว, widget: string, i18n: true }
      - { name: date, label: วันที่เผยแพร่, widget: datetime, format: 'YYYY-MM-DD', date_format: 'DD/MM/YYYY', time_format: false, i18n: duplicate }
      - name: category
        label: หมวด
        widget: select
        i18n: duplicate
        default: news
        options:
          - { label: ข่าว, value: news }
          - { label: กิจกรรม, value: event }
          - { label: ผลงานและรางวัล, value: award }
          - { label: ประกาศรับสมัคร, value: recruitment }
          - { label: อื่น ๆ, value: other }
      - { name: summary, label: สรุปสั้น 1–2 ประโยค, widget: text, i18n: true, hint: 'แสดงในหน้ารายการข่าวและหน้าแรก' }
      - { name: cover, label: ภาพประกอบ, widget: image, required: false, i18n: duplicate, hint: 'อัตราส่วน 3:2 เช่น 1200 × 800 px' }
      - { name: coverAlt, label: คำอธิบายภาพ (สำหรับผู้ใช้โปรแกรมอ่านหน้าจอ), widget: string, required: false, i18n: true, hint: 'ต้องกรอกเมื่อใส่ภาพ' }
      - { name: eventDate, label: วันที่จัดงาน (เฉพาะกิจกรรม), widget: datetime, format: 'YYYY-MM-DD', date_format: 'DD/MM/YYYY', time_format: false, required: false, i18n: duplicate }
      - { name: location, label: สถานที่จัดงาน (เฉพาะกิจกรรม), widget: string, required: false, i18n: true }
      - { name: link, label: ลิงก์ที่เกี่ยวข้อง, widget: string, required: false, i18n: duplicate, pattern: ['^https?://', 'ต้องขึ้นต้นด้วย https://'] }
      - { name: draft, label: ฉบับร่าง (ยังไม่เผยแพร่), widget: boolean, default: false, required: false, i18n: duplicate }
      - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
      - { name: body, label: เนื้อหาข่าว, widget: markdown, i18n: true }

  # ---------------------------------------------------------------- people
  - name: people
    label: บุคลากร
    label_singular: บุคคล
    description: 'หัวหน้าทีม ผู้วิจัย ผู้ช่วยวิจัย นักศึกษา และศิษย์เก่า ไม่มีช่องสำหรับเกรด เบอร์โทรส่วนตัว หรืออีเมลส่วนตัว'
    folder: src/content/people
    extension: md
    format: yaml-frontmatter
    create: true
    slug: '{{fields.slug}}'
    summary: '{{name}}'
    sortable_fields: [order, name]
    view_filters:
      - { label: นักศึกษา, field: group, pattern: student }
      - { label: ศิษย์เก่า, field: group, pattern: alumni }
      - { label: ผู้วิจัย, field: group, pattern: investigator }
      - { label: ผู้ช่วยวิจัย, field: group, pattern: research_assistant }
    media_folder: ''
    public_folder: ''
    i18n: true
    fields:
      - { name: slug, label: ชื่อไฟล์ (URL), widget: string, i18n: duplicate, pattern: ['^[a-z0-9]+(-[a-z0-9]+)*$', 'ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และ - เท่านั้น'], hint: 'ไม่ใช้ชื่อจริง เช่น student-07 ใช้เป็นลิงก์ของโปรไฟล์ ตั้งแล้วไม่ควรเปลี่ยน' }
      - name: group
        label: กลุ่ม
        widget: select
        i18n: duplicate
        options:
          - { label: หัวหน้าทีม, value: pi }
          - { label: ผู้วิจัย, value: investigator }
          - { label: ผู้ช่วยวิจัย, value: research_assistant }
          - { label: นักศึกษา, value: student }
          - { label: ศิษย์เก่า, value: alumni }
      - name: level
        label: ระดับ
        widget: select
        required: false
        i18n: duplicate
        options:
          - { label: ปริญญาเอก, value: phd }
          - { label: ปริญญาโท, value: master }
          - { label: ปริญญาตรี, value: bachelor }
          - { label: นักวิจัยหลังปริญญาเอก, value: postdoc }
          - { label: เจ้าหน้าที่ / ผู้ช่วยวิจัย, value: staff }
          - { label: อื่น ๆ, value: other }
      - { name: year, label: ชั้นปีที่ศึกษา, widget: number, value_type: int, min: 1, max: 10, required: false, i18n: duplicate }
      - { name: joinedYear, label: ปีที่เข้าร่วมทีม (ค.ศ.), widget: number, value_type: int, min: 1900, max: 2300, required: false, i18n: duplicate }
      - { name: order, label: ลำดับที่แสดง, widget: number, value_type: int, default: 100, i18n: duplicate, hint: 'เลขน้อยแสดงก่อน' }
      - { name: visible, label: แสดงบนเว็บ, widget: boolean, default: true, i18n: duplicate, hint: 'ปิดเพื่อซ่อนบุคคลนี้ออกจากทุกหน้า' }
      - { name: profile, label: มีหน้าโปรไฟล์ของตัวเอง, widget: boolean, default: true, i18n: duplicate, hint: 'ปิดเพื่อแสดงเป็นรายการสั้น ๆ ไม่มีหน้าโปรไฟล์' }
      - { name: photo, label: รูปถ่าย, widget: image, required: false, i18n: duplicate, hint: 'หน้าตรง พื้นหลังเรียบ อัตราส่วน 4:5 ขนาด 800 × 1000 px ไม่เกิน 300 KB' }
      - { name: photoAlt, label: คำอธิบายรูปถ่าย, widget: string, required: false, i18n: true, hint: 'ต้องกรอกเมื่อใส่รูป เช่น ชื่อ-นามสกุล และสิ่งที่เห็นในรูป' }
      - { name: honorific, label: คำนำหน้า / ตำแหน่งทางวิชาการ, widget: string, required: false, i18n: true, hint: 'เช่น ผศ.ดร. หรือ Asst. Prof. Dr.' }
      - { name: name, label: ชื่อ-นามสกุล, widget: string, i18n: true }
      - { name: position, label: ตำแหน่ง (หรือหลักสูตรสำหรับนักศึกษา), widget: string, required: false, i18n: true }
      - { name: shortBio, label: ประวัติโดยย่อ, widget: text, required: false, i18n: true, hint: 'หัวหน้าทีม 100–150 คำ นักศึกษา 2–3 ประโยค' }
      - { name: researchTopic, label: หัวข้อวิจัย, widget: string, required: false, i18n: true }
      - { name: interests, label: ความสนใจทางวิชาการ, widget: list, required: false, i18n: true, field: { name: item, label: ความสนใจ, widget: string } }
      - name: education
        label: ประวัติการศึกษา
        widget: list
        required: false
        i18n: true
        summary: '{{fields.degree}}'
        hint: 'เรียงจากใหม่ไปเก่า'
        fields:
          - { name: degree, label: วุฒิและสาขา, widget: string }
          - { name: institution, label: สถาบัน, widget: string }
          - { name: year, label: ปี, widget: string, required: false }
      - name: awards
        label: รางวัลและทุนการศึกษา
        widget: list
        required: false
        i18n: true
        summary: '{{fields.title}}'
        fields:
          - { name: title, label: ชื่อรางวัลหรือทุน, widget: string }
          - { name: org, label: หน่วยงานที่มอบ, widget: string, required: false }
          - { name: year, label: ปี, widget: string, required: false }
      - name: courses
        label: รายวิชาที่สอน (หัวหน้าทีม)
        widget: list
        required: false
        i18n: true
        summary: '{{fields.name}}'
        fields:
          - { name: code, label: รหัสวิชา, widget: string, required: false }
          - { name: name, label: ชื่อวิชา, widget: string }
          - { name: level, label: ระดับ, widget: string, required: false }
      - name: links
        label: ลิงก์ (เฉพาะที่เจ้าตัวอนุญาตให้แสดง)
        widget: list
        required: false
        i18n: true
        summary: '{{fields.label}}'
        hint: 'เช่น Google Scholar, ORCID, LinkedIn'
        fields:
          - { name: label, label: ชื่อลิงก์, widget: string }
          - { name: url, label: ที่อยู่ลิงก์, widget: string, pattern: ['^https?://', 'ต้องขึ้นต้นด้วย https://'] }
      - { name: email, label: อีเมลสถาบัน, widget: string, required: false, i18n: duplicate, pattern: ['^[^@\s]+@[^@\s]+\.[^@\s]+$', 'รูปแบบอีเมลไม่ถูกต้อง'], hint: 'เฉพาะอีเมลของสถาบัน ไม่ใช้อีเมลส่วนตัว และจะแสดงเมื่อเปิดช่องด้านล่างเท่านั้น' }
      - { name: showEmail, label: แสดงอีเมลสถาบันบนเว็บ, widget: boolean, default: false, i18n: duplicate }
      - { name: currentWork, label: ที่ทำงานปัจจุบัน (ศิษย์เก่า), widget: string, required: false, i18n: true }
      - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
      - { name: demoOnly, label: ใช้เฉพาะตัวอย่างหน้าตา, widget: hidden, default: false, i18n: duplicate }
      - { name: body, label: ประวัติฉบับเต็ม, widget: markdown, required: false, i18n: true }

  # ---------------------------------------------------------- publications
  - name: publications
    label: ผลงานตีพิมพ์
    label_singular: ผลงาน
    description: 'ใส่ผลงานครั้งเดียว แล้วไปแสดงทั้งหน้าผลงานตีพิมพ์และโปรไฟล์ของสมาชิกที่เลือกไว้ในรายชื่อผู้แต่ง'
    folder: src/content/publications
    extension: json
    format: json
    create: true
    slug: '{{fields.slug}}'
    summary: '{{year}} {{title}}'
    sortable_fields: [year, title]
    fields:
      - { name: slug, label: ชื่อไฟล์ (URL), widget: string, pattern: ['^[a-z0-9]+(-[a-z0-9]+)*$', 'ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และ - เท่านั้น'], hint: 'เช่น 2026-sample-paper' }
      - { name: title, label: ชื่อผลงาน, widget: string }
      - name: authors
        label: ผู้แต่ง (เรียงตามลำดับในผลงาน)
        widget: list
        summary: '{{fields.name}}'
        fields:
          - { name: name, label: ชื่อที่ปรากฏในผลงาน, widget: string }
          - { name: member, label: สมาชิกของแล็บ, widget: relation, collection: people, search_fields: [name, slug], value_field: '{{slug}}', display_fields: [name], required: false, hint: 'เลือกถ้าเป็นสมาชิกของแล็บ ชื่อจะเป็นตัวหนาและผลงานจะขึ้นในโปรไฟล์' }
      - { name: venue, label: วารสาร / ชื่อการประชุม / สำนักพิมพ์, widget: string }
      - { name: year, label: ปีที่ตีพิมพ์ (ค.ศ.), widget: number, value_type: int, min: 1900, max: 2300 }
      - name: type
        label: ประเภท
        widget: select
        options:
          - { label: วารสาร, value: journal }
          - { label: ประชุมวิชาการ, value: conference }
          - { label: อื่น ๆ (หนังสือ สิทธิบัตร), value: other }
      - { name: volume, label: ปีที่ (Volume), widget: string, required: false }
      - { name: issue, label: ฉบับที่ (Issue), widget: string, required: false }
      - { name: pages, label: หน้า, widget: string, required: false, hint: 'เช่น 123–135' }
      - { name: quartile, label: Quartile / Impact Factor, widget: string, required: false, hint: 'เช่น Q1' }
      - { name: doi, label: DOI, widget: string, required: false, hint: 'เช่น 10.1234/abcd.2026.01 (ไม่ต้องใส่ https://doi.org/)' }
      - { name: url, label: ลิงก์ผลงาน, widget: string, required: false, pattern: ['^https?://', 'ต้องขึ้นต้นด้วย https://'] }
      - name: presentation
        label: รูปแบบการนำเสนอ (ประชุมวิชาการ)
        widget: select
        required: false
        options:
          - { label: บรรยาย, value: oral }
          - { label: โปสเตอร์, value: poster }
          - { label: เชิญบรรยาย, value: invited }
      - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false }

  # -------------------------------------------------------------- research
  - name: research
    label: งานวิจัย
    label_singular: หัวข้อวิจัย
    folder: src/content/research
    extension: md
    format: yaml-frontmatter
    create: true
    slug: '{{fields.slug}}'
    summary: '{{title}}'
    sortable_fields: [order, title]
    media_folder: ''
    public_folder: ''
    i18n: true
    fields:
      - { name: slug, label: ชื่อไฟล์ (URL), widget: string, i18n: duplicate, pattern: ['^[a-z0-9]+(-[a-z0-9]+)*$', 'ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และ - เท่านั้น'], hint: 'เช่น topic-04 ใช้เป็นจุดอ้างอิงในหน้างานวิจัย' }
      - { name: title, label: ชื่อหัวข้อวิจัย, widget: string, i18n: true }
      - { name: summary, label: คำอธิบายสั้น 1–2 ประโยค, widget: text, i18n: true, hint: 'แสดงในหน้าแรกและหน้างานวิจัย' }
      - { name: cover, label: รูปประกอบ, widget: image, required: false, i18n: duplicate, hint: 'สี่เหลี่ยมจัตุรัส เช่น 900 × 900 px' }
      - { name: coverAlt, label: คำอธิบายรูป, widget: string, required: false, i18n: true, hint: 'ต้องกรอกเมื่อใส่รูป' }
      - { name: order, label: ลำดับที่แสดง, widget: number, value_type: int, default: 100, i18n: duplicate, hint: 'เลขน้อยแสดงก่อน หน้าแรกแสดง 3 หัวข้อแรก' }
      - { name: keywords, label: คำสำคัญ, widget: list, required: false, i18n: true, field: { name: item, label: คำสำคัญ, widget: string } }
      - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
      - { name: body, label: คำอธิบายฉบับเต็ม, widget: markdown, required: false, i18n: true }

  # -------------------------------------------------------------- projects
  - name: projects
    label: โครงการและทุน
    label_singular: โครงการ
    description: 'ไม่แสดงจำนวนเงินทุนบนเว็บ'
    folder: src/content/projects
    extension: md
    format: yaml-frontmatter
    create: true
    slug: '{{fields.slug}}'
    summary: '{{title}}'
    sortable_fields: [order, title]
    i18n: true
    fields:
      - { name: slug, label: ชื่อไฟล์ (URL), widget: string, i18n: duplicate, pattern: ['^[a-z0-9]+(-[a-z0-9]+)*$', 'ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และ - เท่านั้น'] }
      - { name: title, label: ชื่อโครงการ, widget: string, i18n: true }
      - { name: funder, label: แหล่งทุน, widget: string, i18n: true }
      - { name: startDate, label: วันที่เริ่ม, widget: datetime, format: 'YYYY-MM-DD', date_format: 'DD/MM/YYYY', time_format: false, required: false, i18n: duplicate }
      - { name: endDate, label: วันที่สิ้นสุด (เว้นว่างถ้ายังดำเนินการอยู่), widget: datetime, format: 'YYYY-MM-DD', date_format: 'DD/MM/YYYY', time_format: false, required: false, i18n: duplicate }
      - name: status
        label: สถานะ
        widget: select
        i18n: duplicate
        default: ongoing
        options:
          - { label: วางแผน, value: planned }
          - { label: กำลังดำเนินการ, value: ongoing }
          - { label: เสร็จสิ้น, value: finished }
          - { label: ระงับชั่วคราว, value: paused }
      - { name: members, label: ผู้ร่วมโครงการ, widget: relation, collection: people, multiple: true, search_fields: [name, slug], value_field: '{{slug}}', display_fields: [name], required: false, i18n: duplicate }
      - { name: order, label: ลำดับที่แสดง, widget: number, value_type: int, default: 100, i18n: duplicate }
      - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }

  # ---------------------------------------------------------- collaborators
  - name: collaborators
    label: ความร่วมมือ
    label_singular: ผู้ร่วมงาน
    folder: src/content/collaborators
    extension: json
    format: json
    create: true
    slug: '{{fields.slug}}'
    summary: '{{name}}'
    sortable_fields: [order, name]
    media_folder: ''
    public_folder: ''
    i18n: true
    fields:
      - { name: slug, label: ชื่อไฟล์ (URL), widget: string, i18n: duplicate, pattern: ['^[a-z0-9]+(-[a-z0-9]+)*$', 'ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และ - เท่านั้น'] }
      - name: kind
        label: เป็นบุคคลหรือหน่วยงาน
        widget: select
        i18n: duplicate
        options:
          - { label: หน่วยงาน, value: organization }
          - { label: บุคคล, value: person }
      - name: partnerType
        label: ประเภทความร่วมมือ
        widget: select
        required: false
        i18n: duplicate
        options:
          - { label: ความร่วมมือด้านวิชาการ, value: academic }
          - { label: แหล่งทุนวิจัย, value: funder }
          - { label: ภาคอุตสาหกรรม, value: industry }
          - { label: หน่วยงานภาครัฐ, value: government }
          - { label: อื่น ๆ, value: other }
      - { name: name, label: ชื่อ, widget: string, i18n: true }
      - { name: affiliation, label: ต้นสังกัดหรือรายละเอียดสั้น ๆ, widget: string, required: false, i18n: true }
      - { name: logo, label: โลโก้, widget: image, required: false, i18n: duplicate, hint: 'พื้นหลังโปร่งใส และต้องได้รับอนุญาตให้ใช้' }
      - { name: logoAlt, label: คำอธิบายโลโก้, widget: string, required: false, i18n: true }
      - { name: url, label: เว็บไซต์, widget: string, required: false, i18n: duplicate, pattern: ['^https?://', 'ต้องขึ้นต้นด้วย https://'] }
      - { name: order, label: ลำดับที่แสดง, widget: number, value_type: int, default: 100, i18n: duplicate }
      - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }

  # ----------------------------------------------------------------- pages
  - name: pages
    label: ข้อความในหน้า
    description: 'ข้อความของหน้าแรก เกี่ยวกับทีม สิ่งอำนวยความสะดวก ซอฟต์แวร์ และติดต่อ'
    i18n: true
    files:
      - name: home
        label: หน้าแรก
        file: src/content/pages/home.{{locale}}.md
        format: yaml-frontmatter
        media_folder: ''
        public_folder: ''
        i18n: true
        fields:
          - { name: title, label: ชื่อหน้า, widget: hidden, default: หน้าแรก, i18n: true }
          - { name: heroTitle, label: ข้อความใหญ่ในส่วนบนสุด (ชื่อแล็บ), widget: string, i18n: true }
          - { name: heroText, label: ประโยคเดียวที่บอกว่าแล็บทำอะไร, widget: text, i18n: true }
          - { name: heroImage, label: ภาพจากกล้องจุลทรรศน์, widget: image, required: false, i18n: duplicate, hint: 'สี่เหลี่ยมจัตุรัส อย่างน้อย 1000 × 1000 px จะถูกครอบเป็นวงกลม ถ้าไม่ใส่ จะแสดงเป็นตัวอักษรล้วน' }
          - { name: heroImageAlt, label: คำอธิบายภาพ, widget: string, required: false, i18n: true, hint: 'ต้องกรอกเมื่อใส่ภาพ' }
          - { name: heroCaption, label: คำบรรยายใต้ภาพ, widget: string, required: false, i18n: true, hint: 'ชนิดตัวอย่าง วิธีย้อมสี กำลังขยาย และเครดิต' }
          - name: heroScale
            label: แถบมาตราส่วน
            widget: object
            required: false
            i18n: duplicate
            hint: 'ถ้ารู้มาตราส่วนจริงของภาพ ให้ใส่ ถ้าไม่ทราบให้เว้นว่าง (แถบจะไม่แสดง)'
            fields:
              - { name: label, label: ข้อความ, widget: string, hint: 'เช่น 10 µm' }
              - { name: percent, label: ความยาวแถบ (% ของความกว้างภาพ), widget: number, value_type: int, min: 5, max: 60 }
          - { name: vision, label: วิสัยทัศน์, widget: text, required: false, i18n: true }
          - { name: mission, label: พันธกิจ, widget: text, required: false, i18n: true }
          - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
      - name: about-lab
        label: เกี่ยวกับทีม
        file: src/content/pages/about-lab.{{locale}}.md
        format: yaml-frontmatter
        i18n: true
        fields:
          - { name: title, label: ชื่อหน้า, widget: string, i18n: true }
          - { name: lead, label: ประโยคแนะนำใต้ชื่อหน้า, widget: text, required: false, i18n: true }
          - { name: description, label: คำอธิบายสำหรับผลการค้นหา, widget: text, required: false, i18n: true }
          - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
          - { name: body, label: เนื้อหา, widget: markdown, i18n: true }
      - name: facilities
        label: สิ่งอำนวยความสะดวก
        file: src/content/pages/facilities.{{locale}}.md
        format: yaml-frontmatter
        i18n: true
        fields:
          - { name: title, label: ชื่อหน้า, widget: string, i18n: true }
          - { name: lead, label: ประโยคแนะนำใต้ชื่อหน้า, widget: text, required: false, i18n: true }
          - name: items
            label: ห้องปฏิบัติการและเครื่องมือ
            widget: list
            required: false
            i18n: true
            summary: '{{fields.title}}'
            fields:
              - { name: title, label: ชื่อห้องหรือกลุ่มเครื่องมือ, widget: string }
              - { name: text, label: รายละเอียด, widget: text, required: false }
          - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
      - name: software
        label: ซอฟต์แวร์
        file: src/content/pages/software.{{locale}}.md
        format: yaml-frontmatter
        i18n: true
        fields:
          - { name: title, label: ชื่อหน้า, widget: string, i18n: true }
          - { name: lead, label: ประโยคแนะนำใต้ชื่อหน้า, widget: text, required: false, i18n: true }
          - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
      - name: contact
        label: ติดต่อ
        file: src/content/pages/contact.{{locale}}.md
        format: yaml-frontmatter
        i18n: true
        fields:
          - { name: title, label: ชื่อหน้า, widget: string, i18n: true }
          - { name: lead, label: ประโยคต้อนรับ, widget: text, required: false, i18n: true }
          - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
          - { name: body, label: ข้อความเพิ่มเติม, widget: markdown, required: false, i18n: true }

  # -------------------------------------------------------------- settings
  - name: settings
    label: ข้อมูลกลางของเว็บไซต์
    description: 'ใช้ทั้งส่วนหัว ท้ายเว็บ และหน้าติดต่อ'
    i18n: true
    files:
      - name: site
        label: ข้อมูลเว็บไซต์
        file: src/content/settings/site.{{locale}}.json
        i18n: true
        fields:
          - { name: siteName, label: ชื่อแล็บ (ชื่อเว็บไซต์), widget: string, i18n: true }
          - { name: tagline, label: ประโยคแนะนำแล็บ, widget: string, required: false, i18n: true }
          - { name: institution, label: ภาควิชา คณะ มหาวิทยาลัย, widget: string, required: false, i18n: true }
          - { name: address, label: ที่อยู่, widget: text, required: false, i18n: true, hint: 'ขึ้นบรรทัดใหม่ได้ แสดงตามที่พิมพ์' }
          - { name: email, label: อีเมลกลางของแล็บ, widget: string, required: false, i18n: duplicate }
          - { name: phone, label: เบอร์โทรศัพท์ของแล็บ, widget: string, required: false, i18n: duplicate }
          - { name: hours, label: วันและเวลาทำการ, widget: string, required: false, i18n: true }
          - { name: mapUrl, label: ลิงก์ Google Maps, widget: string, required: false, i18n: duplicate, pattern: ['^https?://', 'ต้องขึ้นต้นด้วย https://'] }
          - { name: domain, label: โดเมนเว็บไซต์, widget: string, required: false, i18n: duplicate }
          - name: social
            label: โซเชียลมีเดีย
            widget: list
            required: false
            i18n: duplicate
            summary: '{{fields.platform}}'
            fields:
              - name: platform
                label: ช่องทาง
                widget: select
                options: [Facebook, YouTube, LinkedIn, Instagram, X, Line Official Account]
              - { name: url, label: ที่อยู่ลิงก์, widget: string, required: false, pattern: ['^https?://', 'ต้องขึ้นต้นด้วย https://'] }
          - { name: seoDescription, label: คำอธิบายเว็บไซต์สำหรับผลการค้นหา, widget: text, required: false, i18n: true, hint: '1–2 ประโยค' }
          - { name: mock, label: ข้อมูลตัวอย่าง, widget: hidden, default: false, i18n: duplicate }
