strata / frontend

The front of Headless CMS. Build an efficient front-end website taking content from multiple data sources.
MIT License
13 stars 5 forks source link

allow to pass a yaml file as content field definition #23

Closed maries24 closed 5 years ago

maries24 commented 5 years ago

Allows to import array of flexible components (for example) fro external yaml file, e.g.

author:
  type: relation
  content_type: user
featured:
  type: boolean
page_content: flexible-components.yaml
simonrjones commented 5 years ago

Good idea @maries24

  1. Can you add a test please.
  2. Could you have an explicit key name for this. It will help if we ever look to support other config styles in Symfony. E.g.
author:
  type: relation
  content_type: user
featured:
  type: boolean
page_content: 
  config: flexible-components.yaml
maries24 commented 5 years ago

Hi @simonrjones I've made the change (introduced a 'config' key) and added tests. What do you think? Thanks.