filters:
  and:
    - file.ext == "md"
formulas:
  doc_type: |
    if(file.hasTag("plugin/transformer"), "transformer",
    if(file.hasTag("plugin/emitter"), "emitter",
    if(file.hasTag("plugin/filter"), "filter",
    if(file.hasTag("component"), "component",
    if(file.inFolder("features"), "feature",
    if(file.inFolder("advanced"), "advanced",
    if(file.inFolder("plugins"), "plugin",
    if(file.inFolder("getting-started"), "getting-started",
    if(file.inFolder("cli"), "cli", "guide")))))))))
  last_modified: file.mtime.relative()
  section: |
    if(file.inFolder("plugins"), "plugins",
    if(file.inFolder("features"), "features",
    if(file.inFolder("advanced"), "advanced",
    if(file.inFolder("getting-started"), "getting-started",
    if(file.inFolder("cli"), "cli",
    if(file.inFolder("tags"), "tags", "core"))))))
properties:
  title:
    displayName: Title
  formula.doc_type:
    displayName: Type
  formula.last_modified:
    displayName: Updated
  formula.section:
    displayName: Section
views:
  - type: table
    name: All Documentation
    groupBy:
      property: formula.section
      direction: ASC
    order:
      - file.name
      - title
      - formula.doc_type
      - formula.section
      - formula.last_modified
    sort:
      - property: formula.doc_type
        direction: ASC
      - property: file.name
        direction: ASC
    columnSize:
      file.name: 185
      note.title: 268
      formula.doc_type: 146
      formula.section: 276
  - type: table
    name: Plugins
    filters:
      or:
        - file.hasTag("plugin/transformer")
        - file.hasTag("plugin/emitter")
        - file.hasTag("plugin/filter")
    groupBy:
      property: formula.doc_type
      direction: ASC
    order:
      - file.name
      - title
      - formula.doc_type
      - formula.last_modified
  - type: table
    name: Components & Features
    filters:
      or:
        - file.hasTag("component")
        - file.inFolder("features")
    order:
      - file.name
      - title
      - formula.doc_type
      - formula.last_modified
  - type: list
    name: Recently Updated
    order:
      - file.name
      - formula.last_modified
    limit: 15
  - type: table
    name: Core Guides
    filters:
      not:
        - file.inFolder("plugins")
        - file.inFolder("features")
        - file.inFolder("advanced")
        - file.inFolder("getting-started")
        - file.inFolder("cli")
        - file.inFolder("tags")
    order:
      - file.name
      - title
      - formula.last_modified
  - type: board
    name: By Type (Board)
    groupBy:
      property: formula.doc_type
      direction: ASC
    order:
      - file.name
      - title
      - formula.last_modified
  - type: gallery
    name: Gallery
    order:
      - title
      - formula.doc_type
      - formula.section
    limit: 30
  - type: cards
    name: Cards
    order:
      - file.name
      - title
      - formula.doc_type
      - formula.section
      - formula.last_modified
    limit: 24
