gridsome / gridsome/gridsome

Cannot fetch multiple markdown widgets from netlify cms

Open
#729 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8.5k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

## Description

Cannot fetch some of the netlify cms markdown widget fields as html.

### Steps to reproduce

Create a collection with more than one or nested markdown widget fields.

collections:
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "_posts/blog" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- { label: "Layout", name: "layout", widget: "hidden", default: "blog" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Rating (scale of 1-5)", name: "rating", widget: "number" }
- { label: "Body", name: "content", widget: "markdown" }
- { label: "Content", name: "newcontent", widget: "markdown" }
- label: "Test field"
name: "testfield"
widget: "object"
fields:
- { label: "Content", name: "content", widget: "markdown" }

### Expected result

I'm expecting the content of the markdown widget fields to be html.

### Actual result

{
allPost {
edges {
nodes {
content #returns html
newcontent #returns markdown
testfield {
content #returns markdown
}
}
}
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the collection configuration in the reproduction and trace how the `content`, `newcontent`, and nested `testfield.content` markdown fields are exposed through the GraphQL query. Compare the conversion behavior across multiple and nested markdown widgets; done means every markdown widget field returns HTML consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript
Domain
api, content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.