eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

Should falsy frontmatter values defer to other values higher in the data cascade?

Open silveltman opened this issue 3 years ago • 1 comments

Describe the bug 11ty uses a frontmatter value instead of a global data file value, even though the frontmatter value is empty.

To Reproduce Steps to reproduce the behavior:

  1. Go to create an 11ty project
  2. create the data file and frontmatter below
  3. build/serve 11ty
  4. Look at build output

Expected behavior The frontmatter should be ignored and the value in the data file should be used

Environment:

  • Windows 10
  • Eleventy Version 1.01

Additional context" _data/seo.yaml

title:
description:

Frontmatter

seo:
  title:
  description:

silveltman avatar May 04 '22 13:05 silveltman

HMMMM. I see what you’re saying. But I think the current behavior is the most technically accurate and has the least amount of magic (is the most predictable).

Should all falsy values defer up the cascade?

zachleat avatar May 09 '22 22:05 zachleat