As mentioned in #26, currently the plugin transforms any relative markdown link in any markdown file (e.g., even if it's in the page directory or in the content directory and points to a location outside of content directory).
The decision outlined in #26 still needs to be made with regards to what situations are officially supported and what expected behavior should be, however currently, the plugin assumes that markdown links (regardless of current file location) reference markdown files within a content collection directory. Given this, any relative link that would otherwise be considered valid, should be further restricted to being a relative location within a content collection directory, either in the same collection or another collection.
Assuming PR #49 is merged (and preferably #50 merged and #53 implemented), cross collection references should be reliable, however references to a location outside of a content collection directory will still not work and are not currently supported given existing behavior.
As mentioned in #26, currently the plugin transforms any relative markdown link in any markdown file (e.g., even if it's in the page directory or in the content directory and points to a location outside of content directory).
The decision outlined in #26 still needs to be made with regards to what situations are officially supported and what expected behavior should be, however currently, the plugin assumes that markdown links (regardless of current file location) reference markdown files within a content collection directory. Given this, any relative link that would otherwise be considered valid, should be further restricted to being a relative location within a content collection directory, either in the same collection or another collection.
Assuming PR #49 is merged (and preferably #50 merged and #53 implemented), cross collection references should be reliable, however references to a location outside of a content collection directory will still not work and are not currently supported given existing behavior.
Repro: https://stackblitz.com/edit/withastro-astro-xtq8zt
Steps to reproduce:
Site Index
andSite Test Page
Docs Index
Site Index
andSite Test Page
Expected Behavior: Link is not transformed because linked markdown file is located outside of a content collection directory
Actual Behavior: Links are transformed to
/pages
and/pages/testpage
and 404