collections

Root property: collections #

The collections property is optional. It can define an array with one or more collections with pages which will get their own navigation item in the Quiqr Content Menu. In the above example there is a Collection Blog configured containing blog pages in the folder content/blog/. Below the properties of a single collection dictionary.

propertyvalue typeoptionaldescription
keystringmandatoryKeys are for internal use and must be unique
dataformatstring: yaml, toml,jsonmandatoryDefines the output format of the frontmatter block. Collections can only handle markdown files. the outputs regards to the frontmatter
extension???mandatory???
titlestringmandatoryThe title of this page in the menu and when Quiqr App refers to this page
itemtitlestringmandatoryThe singular name of the collection items
hideIndexbooleanoptionalwhen set true the _index.md is not showed in the list of items
folderstring: relative path to dirmandatoryThe path to the directory containing all files with the configured extension.
previewUrlBasestring: relative url path to the websiteoptionalWhen set, this path as base path to preview the page
hidePreviewIconbooleanoptionalHide Preview Icon which opens the page in the browser
hideExternalEditIconbooleanoptionalHide Enternal Editor Icon which opens the file in the OS Text Editor
hideSaveButtonbooleanoptionalHide form Save button
fieldsarray of dictionariesmandatoryThese are the form input fields.
sortkeystringoptionalcan be set to a front matter key which will be used for sorting

Example #

./model/base.
     
collections:
- dataformat: yaml
  extension: md
  fields:
  - key: title
    title: Title
    type: string
  - key: mainContent
    title: Main content
    type: markdown
  - key: publishdate
    title: Publishdate
    type: hidden
  - key: tags
    title: Tags
    type: chips
  folder: content/post/
  itemtitle: Post
  key: post
  title: Posts
[[collections]]
  dataformat = "yaml"
  extension = "md"
  folder = "content/post/"
  itemtitle = "Post"
  key = "post"
  title = "Posts"

  [[collections.fields]]
    key = "title"
    title = "Title"
    type = "string"

  [[collections.fields]]
    key = "mainContent"
    title = "Main content"
    type = "markdown"

  [[collections.fields]]
    key = "publishdate"
    title = "Publishdate"
    type = "hidden"

  [[collections.fields]]
    key = "tags"
    title = "Tags"
    type = "chips"
{
   "collections": [
      {
         "dataformat": "yaml",
         "extension": "md",
         "fields": [
            {
               "key": "title",
               "title": "Title",
               "type": "string"
            },
            {
               "key": "mainContent",
               "title": "Main content",
               "type": "markdown"
            },
            {
               "key": "publishdate",
               "title": "Publishdate",
               "type": "hidden"
            },
            {
               "key": "tags",
               "title": "Tags",
               "type": "chips"
            }
         ],
         "folder": "content/post/",
         "itemtitle": "Post",
         "key": "post",
         "title": "Posts"
      }
   ]
}