-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
area: extensions/widgets/codearea: extensions/widgets/listtype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
Where creating a List widget of Code widget and persist it, only one of them is actually saved (code or lang) but not both of them
To Reproduce
Create a config file with the following:
- label: "Terminal"
name: "terminal"
widget: "list"
field:
{
label: "Code Snippet",
name: "code_snippet",
widget: "code",
}
Expected behavior
When published, both code and lang are saved within the markdown
Screenshots
Applicable Versions:
- Netlify CMS version: 2.10.186
- Git provider: Github (but with git-gateway locally)
- OS: MacOS Monterey
- Browser version Firefox 97.0.1
- Node.JS version: v15.14.0
CMS configuration
# Uncomment when in dev mod
local_backend: true
backend:
name: git-gateway
media_folder: public/img
publish_mode: editorial_workflow
site_url: https://dagger.io
show_preview_links: true
public_folder: img
collections:
- name: "pages"
label: "Pages"
files:
- label: "Home"
name: "Home"
file: "content/home.md"
fields:
- label: "Section Hero"
name: "hero"
widget: "object"
collapsed: true
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- { label: "Call to action", name: "cta", widget: "string" }
- { label: "Image", name: "img", widget: "image" }
- label: "Parallax"
name: "storyParallax"
widget: "object"
collapsed: true
fields:
- label: "Slide-1"
name: "slide1"
widget: "object"
fields:
- { label: "Image", name: "img", widget: "image" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- label: "Slide-2"
name: "slide2"
widget: "object"
fields:
- { label: "Image", name: "img", widget: "image" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- label: "Slide-3"
name: "slide3"
widget: "object"
fields:
- { label: "Image", name: "img", widget: "image" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- label: "Slide-4"
name: "slide4"
widget: "object"
fields:
- { label: "Image", name: "img", widget: "image" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- label: "How it works"
name: "howItWorks"
widget: "object"
fields:
- { label: "Title", name: "title", widget: "string" }
- label: "Content"
name: "content"
widget: "list"
summary: "{{fields.title}}"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- { label: "Image", name: "img", widget: "image" }
- label: "Terminal"
name: "terminal"
widget: "list"
field:
{
label: "Code Snippet",
name: "code_snippet",
widget: "code",
}
- label: "Section Footer"
name: "footer"
widget: "object"
collapsed: true
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "body", widget: "markdown" }
- { label: "Call to action", name: "cta", widget: "string" }
- { label: "Image", name: "img", widget: "image" }
- label: "Terms of Service"
name: "terms-of-service"
file: "content/terms-of-service.md"
fields:
- { label: "Title", name: "title", widget: "string" }
- {
label: "Publish Date",
name: "date",
widget: "datetime",
date_format: "MMMM YYYY",
time_format: false,
}
- { label: "Body", name: "body", widget: "markdown" }
- label: "Privacy policy"
name: "privacy-policy"
file: "content/privacy-policy.md"
fields:
- { label: "Title", name: "title", widget: "string" }
- {
label: "Publish Date",
name: "date",
widget: "datetime",
date_format: "MMMM YYYY",
time_format: false,
}
- { label: "Body", name: "body", widget: "markdown" }
- name: "blog"
label: "Blog"
folder: "content/blog/posts"
create: true
slug: "{{slug}}"
identifier_field: slug
fields:
- { label: "Slug", name: "slug", widget: "string" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Body", name: "body", widget: "markdown" }
Additional context
Metadata
Metadata
Assignees
Labels
area: extensions/widgets/codearea: extensions/widgets/listtype: bugcode to address defects in shipped codecode to address defects in shipped code