When a page contains a custom slug, the transformed url is not respecting it and instead, generating the astro default slug via githug-slugger.
For example, in a file /posts/post-3.md:
---
title: Post 3
slug: post.3
---
[Post 3](./post-3.md)
Should result in /posts/post.3 but instead results in /posts/post3.
It appears in #9 logic was added to handle special characters, etc. which makes sense and was needed. However, if a custom slug exists, it should use it.
Astro appears to handle this by generating the default slug but then checking for a custom slug and if exists, using it, else falling back on default.
When a page contains a custom slug, the transformed url is not respecting it and instead, generating the
astro default
slug viagithug-slugger
.For example, in a file
/posts/post-3.md
:Should result in
/posts/post.3
but instead results in/posts/post3
.It appears in #9 logic was added to handle special characters, etc. which makes sense and was needed. However, if a custom slug exists, it should use it.
Astro appears to handle this by generating the default slug but then checking for a custom slug and if exists, using it, else falling back on default.
Repro:
With Proposed Fixes from PR #21:
Steps to repro:
Post 1
linkRepro for Issue #14
Expected Result: Link should navigate to
/posts/post.3
or/posts/archive.md/archive-1
(depending on link chosen)Actual Result: The
.
is stripped and results in 404Additional Info: You can see all links that Astro generates on home page under
Issue #14
heading