metalsmith-pagination icon indicating copy to clipboard operation
metalsmith-pagination copied to clipboard

path option arguments don't work correctly

Open chebum opened this issue 8 years ago • 5 comments

It looks like there is an issue in the interpolate method. For example, this path setting won't be replaced correctly: path: 'blog/page:num_en.html'

After performing the interpolate method, it will return blog/pageundefined.html

chebum avatar Aug 05 '16 14:08 chebum

It seems that the pagination doesn't work with [email protected] Is this plugin still maintain?

carolineBda avatar Apr 21 '17 09:04 carolineBda

Yes, it does. Yes, it is. And your question seems unrelated to the issue you commented on.

blakeembrey avatar Apr 21 '17 13:04 blakeembrey

Sorry I should have been more precise. When you upgrade metalsmith-collections from 0.7.0 to 0.9.0 then the path field in the file object listed in pagination.files become a string "articles/le-theatre-entreprise.md"

instead of being the usual object :

{ root: '',
  dir: 'articles',
  base: 'le-theatre-entreprise.md',
  ext: '.md',
  name: 'lexique-satisfaction-client-W',
  href: '/articles/le-theatre-entreprise.md,
  dhref: '/articles/' 
}

I thought it was related to the issue above but if it isn't I will open a new issue.

carolineBda avatar Apr 21 '17 15:04 carolineBda

No, the issue above is just about interpolation not working because of how word matching works with the syntax. There's a related PR that unfortunately wasn't linked to this issue or completed.

As for the issue you have, go ahead and create a new one. I'll take a look at it, seems odd - I didn't encounter this before. Is it a very new release? What's your configuration look like?

blakeembrey avatar Apr 21 '17 16:04 blakeembrey

Done : https://github.com/blakeembrey/metalsmith-pagination/issues/30

carolineBda avatar Apr 24 '17 09:04 carolineBda