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
fix: make MD includes work with rewrites #1898
Conversation
At the moment, any MD inclusion like `<!--@include: ...-->` do not work within nested packages that are configured with rewrites. Demo is in https://github.com/chgeo/vitepress-rewrites-demo (fork of your rewrite demo repo). There, `packages/package-a/src/index.md` cannot resolve the sibling file `include.md` through `<!--@include: ./include.md-->` The fix is simple to not use a rewrite alias here, but to treat include file paths as strict relative paths.
Hey can you run |
Done. |
@brc-dd Can we merge this? Anything that is missing? |
I need to test it. Also, Evan was working on dynamic routes which are sort of linked. So I'm trying to avoid conflicts currently. Let him finish. We can merge this later. Also, includes work with rewrites. But currently they are being resolved to the final path. Like if you have rewritten |
Alright, then I'll be patient :) |
Fixes #1961