Skip to content

Hidden widget fails to show up in front matter (Hugo) #2294

@jonas-sk

Description

@jonas-sk

Describe the bug
Using Hugo (specifically Victor Hugo), when setting a hidden widget, the key-value combination doesn't appear in the front matter of the generated document.

To Reproduce
I haven't thoroughly tested the exact conditions. However, this is what I did:

  1. Use "deploy to netlify" in the netlify cms docs (i.e. use the Victor Hugo template)
  2. Add a hidden widget to the fields of one of the existing pages or create a new page with a hidden widget (i.e. in config.yml).
  3. Edit the page (file collection) or create a new post (folder collection) in the netlify cms UI

In my case the problem manifested in both folder and file collections and in both new files created via the UI and old files edited in the UI.

Expected behavior
The hidden widget should manifest in the front matter as a key-value combination. For example, when I have - {label: "Layout", name: "layout", widget: "hidden", default: "about"}, layout: about should appear in the front matter of that file.

Applicable Versions:

  • Netlify CMS version: 2.9.1
  • Git provider: GitHub
  • OS: Windows 10
  • Browser version: Firefox 66.0.3
  • Node.JS version: 4.1.2

CMS configuration
You can find it here: https://github.com/jonas-sk/pine-maastricht/blob/master/site/static/admin/config.yml. The problem specifically shows up in posts, projects, and conference-2019

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions