-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use alias for base url? #2308
Comments
I like it. Contribution Welcome. If you'd like to take it. This might the file and I guess you can get |
Ah interesting! I noticed that ![Forest](~@source/.vuepress/public/images/forest.jpg) With my <img src="/experiments/vuepress/assets/img/forest.90378e61.jpg" alt="Forest"> So I guess because this is a "compile time" thing the Now I'm not sure how to proceed. Files in this ![Forest](~@source/images/forest.jpg) This results in <img src="/experiments/vuepress/assets/img/forest.90378e61.jpg" alt="Forest"> But then I'm not sure this is an big enough improvement over using relative paths to warrant the complexity of the ![Forest](../images/forest.jpg) This will result in the same html. I think the It might be interesting to mention this existing |
Feature request
What problem does this feature solve?
When using a different base it's not possible to use the regular image markdown syntax, for example:
Currently the workaround is using html and withBase
What does the proposed API look like?
Would it be possible to use a webpack alias to refer to the base url? For example:
But, this doesn't work out of the box. I tried this and got the following error
I used the following config to add the public alias.
Docs:
How should this be implemented in your opinion?
By including a default webpack alias?
Are you willing to work on this yourself?
Yes, but I'd need some tips.
The text was updated successfully, but these errors were encountered: