feat: nested collections (#680)

This commit is contained in:
Daniel Lautzenheiser
2023-04-04 15:12:32 -04:00
committed by GitHub
parent 22a1b8d9c0
commit d0ecae310c
54 changed files with 2671 additions and 295 deletions

View File

@ -311,6 +311,9 @@ collections:
nested:
depth: 100 # max depth to show in the collection tree
summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field
# adding a path object allows editing the path of entries
# moving an existing entry will move the entire sub tree of the entry to the new location
path: { widget: string, index_file: 'index' }
fields:
- label: Title
name: title
@ -318,9 +321,6 @@ collections:
- label: Body
name: body
widget: markdown
# adding a meta object with a path property allows editing the path of entries
# moving an existing entry will move the entire sub tree of the entry to the new location
meta: { path: { widget: string, label: 'Path', index_file: 'index' } }
```
```js
@ -334,7 +334,11 @@ collections:
"create": true,
"nested": {
"depth": 100,
"summary": "{{title}}"
"summary": "{{title}}",
"path": {
"label": "Path",
"index_file": "index"
}
},
"fields": [
{
@ -347,14 +351,7 @@ collections:
"name": "body",
"widget": "markdown"
}
],
"meta": {
"path": {
"widget": "string",
"label": "Path",
"index_file": "index"
}
}
]
}
]
}