jholt1 / ember-yaml-cms

Ember addon to turn YAML files into a single JSON file
MIT License
1 stars 0 forks source link

Roll up contents of child route folders as arrays rather than objects (or have an option) #3

Open allthesignals opened 6 years ago

allthesignals commented 6 years ago

Jekyll has a concept of posts which are treated as a general iterable collection of items rather than properties of an object. It would be nice to have an option to have these items rolled up as an array, which seems more of a restful approach (intuitively, this is how I expect to use something named posts).

So this:

├─┬ cms
  ├─┬ posts
  | ├── my-post.yaml
  | └── another-post.yaml

Becomes this:

{ cms:
{ 
  posts: [
      { title: 'post-1' },
      { title: 'post-2' },
  ]
}
 }

I'd be interested in your thoughts on this.

jholt1 commented 6 years ago

@allthesignals interesting, will have a look into this.