backend:
  name: github
  repo: joe-brothers/diary
  branch: main
  auth_type: pat # Sveltia CMS: prompt for a Personal Access Token in the UI

site_url: https://diary.joe-brothers.com
display_url: https://diary.joe-brothers.com

media_folder: public/uploads
public_folder: /uploads

collections:
  - name: posts
    label: Posts
    label_singular: Post
    folder: src/content/posts
    extension: md
    format: frontmatter
    create: true
    slug: "{{fields.slug}}"
    summary: '{{title}} — {{publishedAt | date("YYYY-MM-DD")}}'
    sortable_fields: [publishedAt, title]
    fields:
      - name: slug
        label: Slug
        widget: string
        hint: 파일명/URL이 됩니다. 영문/숫자/하이픈 권장 (예 my-first-post). 한글도 가능.
        pattern: ['^[^/\\\s]+$', "슬래시·역슬래시·공백은 사용할 수 없습니다."]
      - name: title
        label: 제목
        widget: string
      - name: publishedAt
        label: 작성일시
        widget: datetime
        # Stored as ISO 8601 with timezone offset, e.g. 2026-05-05T14:30:00+09:00
        format: "YYYY-MM-DDTHH:mm:ssZ"
        date_format: "YYYY-MM-DD"
        time_format: "HH:mm"
        picker_utc: false
      - name: draft
        label: Draft
        widget: boolean
        default: false
      - name: body
        label: 본문
        widget: markdown
