backend:
  name: github
  branch: main
  cms_label_prefix: cms/
  repo: RustBit/Website
  squash_merges: true
logo_url: /static/images/kanit-light.svg
publish_mode: editorial_workflow
search: true
media_folder: src/static/media
public_folder: /static/media
slug:
  encoding: ascii
  clean_accents: true
collections:
  - label: Blog Posts
    name: posts
    description: News and updates on the blog
    folder: src/blog
    extension: md
    create: true
    slug: '{{year}}-{{month}}-{{day}}_{{slug}}'
    preview_path: 'blog/{{slug}}'
    label_singular: Post
    fields:
      - label: Draft
        name: draft
        description: Drafts will not be published to the production website
        widget: boolean
        default: true
      - label: Title
        name: title
        widget: string
      - label: Date
        name: date
        widget: datetime
      - label: Author
        name: author
        widget: relation
        collection: settings
        file: blog_settings
        value_field: authors.*.name
        search_fields:
          - authors.*.name
        display_fields:
          - authors.*.name
      - label: Tags
        name: tags
        widget: relation
        collection: settings
        file: blog_settings
        multiple: true
        value_field: tags.*.label
        search_fields:
          - tags.*.label
        display_fields:
          - tags.*.label
      - label: Featured Image
        name: featured_image
        widget: object
        fields:
          - label: Image
            name: image
            widget: image
          - label: Alt Text
            name: alt_text
            widget: string
      - label: Content
        name: body
        widget: markdown
  - label: Pages
    name: pages
    description: Static text pages that do not require custom components/rich content
    folder: src/
    extension: md
    create: true
    label_singular: Page
    fields:
      - label: Title
        name: title
        widget: string
      - label: Path
        name: url
        widget: string
        required: false
      - label: Layout
        name: layout
        widget: select
        options:
          - label: Basic Page
            value: layouts/text.njk
      - label: Hero
        name: hero
        widget: object
        fields:
          - label: Include Hero
            name: include_hero
            widget: boolean
            default: false
            required: false
          - label: Hero Image
            name: hero_image
            widget: image
            required: false
          - label: Hero Text
            name: hero_text
            widget: string
            required: false
      - label: Content
        name: body
        widget: markdown
  - label: Settings
    name: settings
    files:
      - label: Blog Settings
        name: blog_settings
        description: Global settings for blog posts
        file: src/_data/blog_settings.yml
        extension: yml
        editor:
          preview: false
        create: true
        fields:
          - label: Tags
            label_singular: Tag
            name: tags
            widget: list
            collapsed: false
            summary: '{{fields.label}}'
            fields:
              - label: Label
                name: label
                widget: string
          - label: Authors
            label_singular: Author
            name: authors
            widget: list
            collapsed: false
            fields:
              - label: Author
                name: name
                widget: string
              - label: Image
                name: image
                widget: image
      - label: Home Page
        name: home-page
        file: src/_data/home_page_settings.yml
        extension: yml
        create: true
        fields:
          - label: Hero Image
            name: hero_image
            widget: object
            fields:
              - label: Image
                name: image
                widget: image
              - label: Alt Text
                name: alt_text
                widget: string
          - label: Introduction Content
            name: intro_content
            widget: markdown
          - label: Team Image
            name: team_image
            widget: object
            fields:
              - label: Image
                name: image
                widget: image
              - label: Alt Text
                name: alt_text
                widget: string
      - label: Navbar Settings
        name: navbar
        file: src/_data/navbar_settings.yml
        extension: yml
        create: true
        fields:
          - label: Navbar Links
            name: navbar-links
            widget: list
            fields:
              - label: Label
                name: label
                required: true
                widget: string
              - label: Link
                name: link
                required: true
                widget: string
      - label: Footer Settings
        name: footer
        file: src/_data/footer_settings.yml
        extension: yml
        create: true
        fields:
          - label: Footer Links
            name: footer-links
            widget: list
            fields:
              - label: Label
                name: label
                required: true
                widget: string
              - label: Link
                name: link
                required: true
                widget: string
          - label: Legal Disclaimer
            name: disclaimer
            widget: text
      - label: Social Media Settings
        name: social-media-settings
        description: Settings for social media
        file: src/_data/social_media_settings.yml
        extension: yml
        create: true
        editor:
          preview: false
        fields:
          - label: Social Media Links
            name: links
            widget: list
            collapsed: false
            fields:
              - label: Name
                name: name
                widget: string
              - label: FontAwesome Icon
                name: font_awesome_icon_class
                widget: string
              - label: Label
                name: label
                widget: string
              - label: URL
                name: url
                widget: string
              - label: Options
                name: options
                widget: object
                fields:
                  - label: Include in Header
                    name: in_header
                    widget: boolean
                    default: true
                  - label: Include in Footer
                    name: in_footer
                    widget: boolean
                    default: true
      - label: Site Settings
        name: site-settings
        description: Core site settings
        file: src/_data/site_settings.yml
        extension: yml
        create: true
        editor:
          preview: false
        fields:
          - label: Newsletter API URI
            name: newsletter_api_uri
            widget: string
site_url: 'https://rustbit.com/'
local_backend: false
