-
Notifications
You must be signed in to change notification settings - Fork 67
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
path
or permalink
not added to file’s metadata
#136
Comments
Hi there, The relevant lines for this issue are 414-431. metalsmith.env('DEBUG', '@metalsmith/permalinks:warn') The I sketched a plan for future versions in #135 (comment):
So the current |
Kind of you to respond so quickly. We'll switch off of using Even with pattern removed or set to "null", neither |
Ok, upon reading the linked issue I understand better. These lines of code: https://github.com/metalsmith/permalinks/blob/v2.5.1/src/index.js#L421-L431 require some rework (for one the setter should set I'll include this in a patch release ASAP |
I'm closing this as it is not an issue with @metalsmith/permalinks, see playcanvas/developer.playcanvas.com#521 for more info on the resolution |
Upgrading from 2.4.1 to 2.5.1 the
path
property is not added to the file’s metadata.I have tried
path
,permalink
,file.path
,file.permalink
Follow the steps described in the metalsmith documentation. See 3rd paragraph here:
https://metalsmith.io/docs/getting-started/#the-plugin-chain
It notes that the path property should be added.
We have been using this config. I don't know if this pattern has ever been valid. It may have been relying on invalid / empty pattern behaviour that populates the
path
metadata.We are using this metadata in a handlbars helper. Called
locale-url
that accepts 2 parameters.For completeness, here is is the handlebars helper that simply makes the URL fully qualified. I've added a debug helper to warn when
path
is not defined.Expected behaviour
Permalinks plugin operates as documented in the 3rd paragraph here:
https://metalsmith.io/docs/getting-started/#the-plugin-chain
Either
path
or some replacement likepermalink
is defined.Environment
Additional context
I'd prefer to be guided toward the correct usage which will be default in the upcoming versions. Looking at the commits, the words deprecated are close to words that sound like this issue / and the functionality that we are using.
Issue on dependent project: playcanvas/developer.playcanvas.com#521
Thank you.
The text was updated successfully, but these errors were encountered: