Decap CMS Collections Configuration Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Decap CMS Collections Configuration Setup
Simple
from 1 business day to 3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Decap CMS Collections Configuration Setup

Collections — central element of config.yml. Each collection defines content type: where files store, how named, what fields available. Properly configured collections make difference between usable CMS and confusing fields set.

Two Collection Types

Folder collection — list of similar records (articles, cases, jobs):

collections:
  - name: blog
    label: Blog
    folder: content/blog
    create: true
    delete: true
    slug: "{{slug}}"
    fields:
      - { label: Title, name: title, widget: string }
      - { label: Body, name: body, widget: markdown }

Files collection — fixed page set (home, about, contacts):

  - name: pages
    label: Pages
    files:
      - label: Home Page
        name: home
        file: content/home.yaml
        fields:
          - { label: Hero Title, name: hero_title, widget: string }
      - label: About
        name: about
        file: content/about.md
        fields:
          - { label: Body, name: body, widget: markdown }

Field Widgets

Complete widget set for real projects:

fields:
  - { label: String, name: title, widget: string, required: true }
  - { label: Text, name: description, widget: text }
  - { label: Number, name: order, widget: number, value_type: int }
  - { label: Boolean, name: featured, widget: boolean, default: false }
  - { label: Date, name: date, widget: datetime, format: "YYYY-MM-DD" }

  # Select from list
  - label: Category
    name: category
    widget: select
    options: [{label: News, value: news}, {label: Cases, value: cases}]

  # Media file
  - { label: Cover, name: cover, widget: image, required: false }

  # Markdown editor
  - { label: Body, name: body, widget: markdown, modes: [rich_text, raw] }

  # List of strings
  - { label: Tags, name: tags, widget: list }

  # Nested object
  - label: SEO
    name: seo
    widget: object
    fields:
      - { label: Meta Title, name: title, widget: string }
      - { label: Meta Description, name: description, widget: text }

  # List of objects
  - label: Features
    name: features
    widget: list
    fields:
      - { label: Icon, name: icon, widget: string }
      - { label: Title, name: title, widget: string }

File Name Templates

slug determines created file name. Template variables available:

# Date + slug from title
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
# Result: 2025-03-15-my-first-post.md

# Only slug
slug: "{{slug}}"

# Custom field
slug: "{{fields.id}}-{{slug}}"

Sorting and Filtering

- name: team
  label: Team
  folder: content/team
  sortable_fields: ['name', 'position', 'order']
  view_filters:
    - label: Active Only
      field: active
      pattern: true
    - label: Managers
      field: department
      pattern: management
  view_groups:
    - label: By Department
      field: department

Conditional Fields

fields:
  - label: Block Type
    name: type
    widget: select
    options: [text, video, gallery]
  - label: Text
    name: text
    widget: markdown
    condition:
      field: type
      value: text
  - label: Video URL
    name: video_url
    widget: string
    condition:
      field: type
      value: video

i18n Collections

i18n:
  structure: multiple_files
  locales: [en, uk]
  default_locale: en

collections:
  - name: services
    label: Services
    folder: content/services
    i18n: true
    fields:
      - { label: Title, name: title, widget: string, i18n: true }
      - { label: Slug, name: slug, widget: string, i18n: duplicate }
      - { label: Body, name: body, widget: markdown, i18n: true }

Timeline

5–8 content types: 4–8 hours. With i18n, conditionals, relations: 1–2 days.