-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
I have this collection of files and here is the config.yml specification
- name: support-page
label: Support Pages
extension: mdx
format: frontmatter
editor:
preview: true
delete: false
files:
- file: 'content/support/support.mdx'
label: Support
name: support
fields:
- label: Template
name: template
widget: hidden
default: Support
- label: Slug
- label: Slug
name: slug
widget: hidden
default: support
- label: Title
name: title
widget: string
- label: accordion
name: accordion
widget: list
fields:
- label: title
name: title
widget: string
default: ''
- label: content
name: content
widget: list
fields:
- default: ''
label: title
name: title
widget: string
- label: description
name: description
widget: string
But whenever I update the file this is what gets created.
---
title: Frequently Asked Questions
accordion:
- title: General
content:
- title: Can you finish our project in less than a day?
description: No.
---
Here is the template declaration in the cms.js
CMS.registerPreviewTemplate('support', ({ entry }) => (
<SupportTemplate {...entry.toJS().data} />
))
The default && hidden variables I declared in the config don't show up in the file at all and it prevents the page from getting created.
Expected behaviour
I expect that the file has this content
---
template: Support
slug: support
title: Frequently Asked Questions
accordion:
- title: General
content:
- title: Can you finish our project in less than a day?
description: No.
---
Screenshots
Applicable Versions:
- Netlify CMS version: netlify-cms-app 2.13.1
- Git provider: GitHub
- OS: Elementary OS
- Browser version: Chrome 86
Metadata
Metadata
Assignees
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code