decaporg / decaporg/decap-cms

Feat: support hidden widget in files collections

Open
#3,046 14 comments 8 reactions 0 assignees View on GitHub
area: extensions/widgets pinned type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

Repo: chokeul8r/gncms

I am attempting to use NetlifyCMS in a Gatsby Landing Page project for the first time. My problem relates to the config.yml file and Template key field in particular. The template key is not showing up in my frontmatter and/or my graphgl query.

```yaml
backend:
name: git-gateway
branch: master

media_folder: static/assets
public_folder: assets

collections:
- label: "Pages"
name: "pages"
files:
- label: "Home Page"
name: "home"
file: "content/home.md"
fields:
- {
label: "Template Key",
name: "templateKey",
widget: "hidden",
default: "home-page",
}
- { label: Background Image, name: backgroundimage, widget: image }
- { label: Title, name: title, widget: string }
- { label: Sub-Title, name: subtitle, widget: string }
- { label: Intro text, name: intro, widget: text }
- { label: Body text, name: body, widget: text }
- { label: Profile Image, name: profileimage, widget: image }
- label: "Thank You Page"
name: "thank-you"
file: "content/thank-you.md"
fields:
- {
label: "Template Key",
name: "templateKey",
widget: "hidden",
default: "thank-you-page",
}
- { label: Title, name: title, widget: string }
- { label: Intro text, name: intro, widget: text }
- { label: Image, name: image, widget: image }
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.