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

overridding path variable in pagination.files #28

Open
ninjasort opened this issue Dec 31, 2015 · 3 comments · May be fixed by #37
Open

overridding path variable in pagination.files #28

ninjasort opened this issue Dec 31, 2015 · 3 comments · May be fixed by #37

Comments

@ninjasort
Copy link

I'm using this with metalsmith-pagination and it's somehow overriding the post metadata and removing the path variable provided by metalsmith-pagination.

@maiertech
Copy link

I'm having a similar issue when using metalsmith-collections. I traced it down to this line:

metalsmith.metadata(metadata);

It does a deep clone when setting Metalsmith's _metadata and this causes objects in files and collections to be different. See metalsmith/metalsmith#247.

I guess a quick fix is removing

// update metadata
if (!opts.skipMetadata) {
metalsmith.metadata(metadata);
}
because metadata is already the real (non-cloned) Metalsmith metadata (set here:
var metadata = metalsmith.metadata();
).

Anyone any thoughts?

@Ajedi32
Copy link

Ajedi32 commented Sep 4, 2016

Isn't this basically a dup of #21?

@maiertech
Copy link

Yes

@maiertech maiertech linked a pull request Sep 6, 2016 that will close this issue
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 a pull request may close this issue.

3 participants