fix: slug template variable (#795)

This commit is contained in:
Daniel Lautzenheiser
2023-05-10 12:26:39 -04:00
committed by GitHub
parent d28c43e95a
commit 8ee9a464ab
12 changed files with 884 additions and 32 deletions

View File

@ -71,6 +71,7 @@ collections:
label: FAQ
folder: _faqs
create: true
media_folder: '/_faqs_images/{{slug}}'
fields:
- label: Question
name: title
@ -78,6 +79,9 @@ collections:
- label: Answer
name: body
widget: markdown
- label: Image
name: image
widget: image
- name: posts
label: Posts
label_singular: Post
@ -475,3 +479,26 @@ collections:
- label: File
name: file
widget: file
- name: pages
label: Nested Pages
label_singular: 'Page'
folder: _nested_pages
create: true
media_folder: '/_nested_page_pictures/{{slug}}'
# 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: Image
name: image
widget: image
- label: Body
name: body
widget: markdown