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

@ -0,0 +1,5 @@
---
title: An Author
---
Author details go here!.

View File

@ -0,0 +1,3 @@
---
title: Authors
---

View File

@ -0,0 +1,3 @@
---
title: Pages
---

View File

@ -0,0 +1,5 @@
---
title: Hello World
---
Coffee is a small tree or shrub that grows in the forest understory in its wild form, and traditionally was grown commercially under other trees that provided shade. The forest-like structure of shade coffee farms provides habitat for a great number of migratory and resident species.

View File

@ -0,0 +1,3 @@
---
title: Posts
---

View File

@ -504,3 +504,22 @@ collections:
label: Date
widget: datetime
i18n: duplicate
- name: pages
label: Nested Pages
label_singular: 'Page'
folder: packages/core/dev-test/backends/proxy/_nested_pages
create: true
# adding a nested object will show the collection folder structure
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: { label: 'Path', index_file: 'index' }
fields:
- label: Title
name: title
widget: string
- label: Body
name: body
widget: markdown