Collections

All sections and taxonomies.

Collections are automatically added based on Hugolify modules added (Sections) or (Taxonomies)

Enable or disable collections

/config/_default/params.yaml

admin:
  collections:
    indexes:
      enable: true
    pages:
      enable: true
    # e.g. set to false to disable posts even if you load hugolify-theme-posts
    posts:
      enable: false
    # …

Override fields avalaible for a collection

/config/_default/params.yaml

admin:
  collections:
    pages:
      fields:
        - is_draft
        - title_page
        - description
        - featured_image
        - body
        # …

Add filter

/config/_default/params.yaml

admin:
  collections:
    pages:
      filter:
        - field: isPage
          value: true

Add summary

/config/_default/params.yaml

admin:
  collections:
    pages:
      summary: "{{title}}"

Add sortable

/config/_default/params.yaml

admin:
  collections:
    pages:
      sortable: "['title']"

Add view filters

/config/_default/params.yaml

admin:
  collections:
    pages:
      view_filters:
        - label: 'Posts published in 2020'
          field: date
          pattern: '2020'

Add view groups

/config/_default/params.yaml

admin:
  collections:
    pages:
      view_groups:
        - label: 'Draft'
          field: draft

Create a collection

Add a yml collection file

layouts/
└── partials/
    └── admin/
        └── collections/
            └── types/
See examples in repository