Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove odd metadata reassign #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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