# Local admin copy of CMS config to ensure editor finds it
# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json

backend:
  name: github
  repo: su-resh/Simran-Portfolio
  branch: main
  auth_methods: [token]

media_folder: assets/images
public_folder: /assets/images

editor:
  preview: false

collections:
  - name: blog
    label: Blog Posts
    files:
      - label: Manage Blog Posts
        name: posts
        file: posts.json
        format: json
        fields:
          - label: Post List
            name: posts
            widget: list
            summary: "{{fields.title}}"
            fields:
              - label: Post Title
                name: title
                widget: string
                hint: "Example: My Internship Journey"
              - label: URL Slug
                name: slug
                widget: string
                hint: "Use small letters and hyphens only. Example: my-internship-journey"
              - label: Publish Date
                name: date
                widget: datetime
                type: date
                hint: "Select the date this post should appear on the site"
              - label: Short Description
                name: description
                widget: text
                hint: "1-2 lines shown in the blog list"
              - label: Tags
                name: tags
                widget: list
                default: []
                hint: "Optional. Press Enter after each tag"
              - label: Cover Image
                name: image
                widget: image
                required: false
                hint: "Optional: upload a featured image"
              - label: Author Name
                name: author
                widget: string
                default: Shila Jaisi
              - label: Post Content
                name: content
                widget: markdown
                hint: "Write your full post here"

  - name: certificates
    label: Certificates
    files:
      - label: Manage Certificates
        name: certificates
        file: data/certificates.json
        format: json
        fields:
          - label: Certificate List
            name: certificates
            widget: list
            summary: "{{fields.title}}"
            fields:
              - label: Certificate Title
                name: title
                widget: string
              - label: Certificate Image
                name: image
                widget: image
                hint: "Upload the certificate image"
              - label: Certificate Link
                name: link
                widget: string
                required: false
                hint: "Optional: link to a PDF or credential page"
