Bug: :dirname placeholders should not be slugified
webketje opened this issue · comments
:dirname
pattern parts are processed with the slug
option, which removes slashes by default. This causes undesired results for files nested more than one level deep.
The solution (validated locally) is to add an else if (key === 'dirname') ret[key] = val
at https://github.com/metalsmith/permalinks/blob/v3.0.0/src/index.js#L202
Just a note to say this issue has affected us in:
Nested paths are now flattened, for example:
/community/upcoming-components-patterns/
→ /community-upcoming-components-patterns/
We've got some easy breaking changes due to how we handle relative URLs and can override slug
for now
@colinrotherham Thanks for the ping, a patch update to address this and the other open issues will be released very soon