metalsmith / permalinks

A Metalsmith plugin for permalinks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

normalize() has to be run on the linksets to convert their "date" option to a function

rse opened this issue · comments

When using the recently introduced linksets feature, an error is given: "TypeError: options.date is not a function". This is because normalize() internally is not called on the linksets. As a quickfix I've added find(linksets, function(ls) { normalize(ls) }) below the line var linksets [...] in function plugin [...]. Please either apply this fix or make an alternative one. But without this using the linksets feature is broken AFAIK.

Just ran into this as well myself. Really does need looking at, I've waited ages for permalinks to support collections, finally spotted that it's been added with multiple linksets and now there's another roadblock in the way.

I had the same experience, a simple patch to normalize fixes the problem, #55.

👍 Same problem here.

There are 3 pull requests related to this issue: #54, #55 and #56.

Can one of them be merged please, followed by a new release?

@ianstormtaylor or @lambtron, would you mind having a look at this?
Or accept some additional maintainers to this repo?

Just ran into this myself, adding support for merging one of the PR's that fixes it, pretty please? :)

Nothing back on this issue for quite a while. Starting to think it's not a priority for them anymore.

commented

Hi,
Sorry to "re-open" this issue (which wasn't closed) but I ran into this too with metalsmith-permalinks 2.1.0. Is it possible to fix this with one of the proposed PR?
Thanks!