blakeembrey / metalsmith-pagination

A Metalsmith plugin for paginating arrays and collections
MIT License
34 stars 10 forks source link

extend metadata instead of setting it #16

Closed ninjasort closed 8 years ago

ninjasort commented 8 years ago
coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling c748e5d11245ec8ad1bdbb375b434f1b2bde1a0e on cameronroe:master into f2dfd62703e5cec24a1e2d00fec2e406427b1759 on blakeembrey:master.

blakeembrey commented 8 years ago

I'm not sure I quite understand the problem or the solution. pagination.files metadata should never be changed, those are references to actual files. Maybe you mean pagination.pages?

ninjasort commented 8 years ago

I had an issue where I wasn't getting an excerpt property from a previous plugin in the pipeline and think that metadata should be set from the existing pipeline. For example, I shouldn't need to set the metadata for the excerpt because it's already been set.

ninjasort commented 8 years ago

That patch actually isn't working correctly for me. The tests pass but I'm not sure why it's not working.. I'll take another look tomorrow.

ninjasort commented 8 years ago

So it turned out that the metadata I was assigning was on a file not a collection. That's interesting how you can't really set file data after metalsmith-collections is run.