Hello, I wanted to pull the username
and name
for the post collection but nothing shown. The redaksi collection is nested because I pull it from the JSON file
config.yml for decap-cms
# local development backend
local_backend: true
# github backend
backend:
name: github
repo: teknologipendidikan/universe
branch: main
site_url: https://lofi.teknologipendidikan.or.id
logo_url: https://lofi.teknologipendidikan.or.id/logo-lofi.svg
locale: id
search: false
media_folder: 'apps/lofi/public/posts'
public_folder: '/posts'
slug:
encoding: 'ascii'
clean_accents: true
sanitize_replacement: '-'
collections:
# ARTIKEL COLLECTION
- name: 'posts'
label: 'Artikel Berita'
folder: 'apps/lofi/_post'
create: true
format: 'frontmatter'
sortable_fields:
- 'title'
- 'date'
slug: '{{slug}}'
fields:
- { label: 'Title', name: 'title', widget: 'string' }
- { label: 'Publish Date', name: 'date', widget: 'datetime' }
- { label: 'description', name: 'description', widget: 'text' }
- { label: 'category', name: 'category', widget: 'string' }
- label: 'Repoter'
name: 'author'
widget: 'relation'
collection: 'redaksi.reporterlist'
search_fields: ['name', 'username', 'email']
value_field: 'username'
display_fields: ['name', 'username']
- { image: 'image', label: 'Image', name: 'image', widget: 'image' }
- { label: 'Body', name: 'body', widget: 'markdown' }
view_filters:
- label: 'Artikel Opini'
field: 'category'
pattern: 'opini'
- label: 'Artikel Refensi'
field: 'category'
pattern: 'referensi'
# TEAM REDAKSI COLLECTION
- name: 'redaksi'
label: 'Tim Redaksi'
editor:
preview: false
delete: false
files:
- label: 'Reporter Berita'
name: 'reporter'
file: 'apps/lofi/data/redaksi.json'
fields:
- label: 'Reporter Berita'
name: 'reporterlist'
widget: 'list'
allow_add: true
fields:
- { label: 'Name', name: 'name', widget: 'string' }
- { label: 'username', name: 'username', widget: 'string' }
- { label: 'Role', name: 'role', widget: 'string' }
- { label: 'Email', name: 'email', widget: 'string' }
redaksi.json
{
"reporterlist": [
{
"username": "john",
"name": "John Doe",
"role": "Director of Technology",
"email": "admin@example.com"
},
{
"username": "doe",
"name": "Doe John",
"role": "Lead Editorial Board",
"email": "email@example.com"
}
]
}
Netlify CMS version ^2.10.17@unpkg
NextJS ^13.0.0
Error Shown: