You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this is quite a bug, but it's an area where eleventy could have a bit better error handling.
If tags exists in frontmatter but is empty (null?), merging with data files fails.
It would help if eleventy coerced empty tags to [] or something.
I think this section would want to be edited to test for null. edit: pr submitted
Why I have empty tags:
I create most of my posts from a template file with a load of front-matter prepopulated, like this:
---
title: TITLEsubtitle: This is the titledate: YYYY-MM-DDtags:
location:
venue:
people:
trip:
series:
primaryImage: path/to/the/image.jpg
---
[[CONTENT HERE]]
Up until now, I've always had tags on posts. But I'm now moving to deepDataMerge where my one common tag (to set a post type) is in a data file.
It seems the merge of page and data file fails if tags exists but is empty.
You could argue I don't need it above - I find it helpful to remind me what things I might want to add - and I hope an empty item shouldn't cause a crash.
The text was updated successfully, but these errors were encountered:
I'm unsure if this is quite a bug, but it's an area where eleventy could have a bit better error handling.
If tags exists in frontmatter but is empty (null?), merging with data files fails.
It would help if eleventy coerced empty tags to
[]
or something.I think this section would want to be edited to test for null. edit: pr submitted
Why I have empty tags:
I create most of my posts from a template file with a load of front-matter prepopulated, like this:
Up until now, I've always had tags on posts. But I'm now moving to deepDataMerge where my one common tag (to set a post type) is in a data file.
It seems the merge of page and data file fails if tags exists but is empty.
You could argue I don't need it above - I find it helpful to remind me what things I might want to add - and I hope an empty item shouldn't cause a crash.
The text was updated successfully, but these errors were encountered: