Skip to content

Remove odd metadata reassign#55

Open
ycherniavskyi wants to merge 1 commit intototocaster:masterfrom
devlab21:remove-odd-metadata-reassign
Open

Remove odd metadata reassign#55
ycherniavskyi wants to merge 1 commit intototocaster:masterfrom
devlab21:remove-odd-metadata-reassign

Conversation

@ycherniavskyi
Copy link

We do not need to reassign metalsmith metadata, because of metalsmith return its internal metadata object. So if something changed in this metadata object its changed for all next plugin.

But when we reassign metalsmith metadata with metadata(<new metadata>) function this <new metadata> clones with deep copying. And this deep copying breaks the consistency of previously created referencing (for example by metalsmith-collections plugin) from some metadata property to files objects. And if next plugins change something in files, this change will not reflect in metadata, because of metadata property reference to copied files objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant