Closed techfg closed 7 months ago
When a url is transformed, the content collection path segment is being slugified resulting in incorrect path being generated.
For example, in a content collection of /posts.md, in a file post-3.md, the resulting url will be /postsmd/post-3 when it should be `/posts.md/post-3.
/posts.md
post-3.md
/postsmd/post-3
Astro does not appear to slugify the content collection segment itself, only the path relative to it.
Repro:
With Proposed Fixes from PR #21:
Steps to repro:
Post MD 1
Repro for Issue #15
Expected Result: Link should navigate to /posts.md/post-md-1 or /posts.md/post.md.2 (has a custom slug) depending on which link you clicked.
/posts.md/post-md-1
/posts.md/post.md.2
Actual Result: /posts.md is sluggified to /postsmd resulting in 404
/postsmd
Additional Info: You can see all links that Astro generates on home page under Issue #15 heading
Issue #15
FYI - Edited OP to a Stackblitz to the repro that contains the proposed fixes from #21.
Released in v0.9.0! Thanks!
When a url is transformed, the content collection path segment is being slugified resulting in incorrect path being generated.
For example, in a content collection of
/posts.md
, in a filepost-3.md
, the resulting url will be/postsmd/post-3
when it should be `/posts.md/post-3.Astro does not appear to slugify the content collection segment itself, only the path relative to it.
Repro:
With Proposed Fixes from PR #21:
Steps to repro:
Post MD 1
Repro for Issue #15
Expected Result: Link should navigate to
/posts.md/post-md-1
or/posts.md/post.md.2
(has a custom slug) depending on which link you clicked.Actual Result:
/posts.md
is sluggified to/postsmd
resulting in 404Additional Info: You can see all links that Astro generates on home page under
Issue #15
heading