Wiredcraft / jekyllpro-cms

A lightweight CMS for Jekyll websites.
http://jekyllpro.com/#cms
MIT License
7 stars 2 forks source link

refine the left nav meta data and filter logic #76

Closed woodpig07 closed 7 years ago

woodpig07 commented 7 years ago

To deal with the filter logic defined in _cms-setting.yml, for example:

  - id: menu_food_cake
    label: "cake dessert"
    collection_type: products
    path: menu/category/cake_dessert
    creatable: true
    default:
      category: [menu, category, food]
      types: [cake_dessert]
    filter:
      contains:
        - category: [menu, category, food]
        - types: [cake_dessert]

It would check if the collection file has frontmatter fields "category" and "types", and their value includes these item in the array above.