Skip to content
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

Change createMarkdownRenderer base to default to '' #555

Closed
ST-DDT opened this issue Feb 25, 2022 · 4 comments · Fixed by #556
Closed

Change createMarkdownRenderer base to default to '' #555

ST-DDT opened this issue Feb 25, 2022 · 4 comments · Fixed by #556
Labels
build Related to the build system enhancement New feature or request
Milestone

Comments

@ST-DDT
Copy link

ST-DDT commented Feb 25, 2022

804954c#diff-332834eb76757b8e31926e411cef34f7207564d0bf5fd00a185b41d97b3403bfR53

This change is not backwards compatible, it would be nice if the value could be set by default.

Originally posted by @ST-DDT in #502 (comment)

@ST-DDT
Copy link
Author

ST-DDT commented Feb 25, 2022

It would also be nice if the parameter could be renamed to linkBase or be annotated with some JSDocs , so its clear what it does.

@brc-dd
Copy link
Member

brc-dd commented Feb 26, 2022

config.base is by default / (ref.), which is being passed to createMarkdownToVueRenderFn, and ultimately to linkPlugin.

It'ld also be nice if the parameter could be renamed to linkBase or be annotated with some JSDocs, so its clear what it does.

Throughout the codebase, base is referred by base only, and (almost every time) means the same thing that is written in the docs.

This change is not backwards compatible,

Whatever done in that PR concerns an internal API, and not meant to be used directly.


That said, we can probably change these

base: string,

to base = '/'. It won't matter much for default working of VitePress anyway.

@ST-DDT
Copy link
Author

ST-DDT commented Feb 26, 2022

Whatever done in that PR concerns an internal API, and not meant to be used directly.

https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md#0203-2021-12-07

I thought this meant it is public API.
Nevermind then.
Is there something similar (md string to html/vue string) that is is public api?

ST-DDT added a commit to faker-js/faker that referenced this issue Feb 26, 2022
@brc-dd
Copy link
Member

brc-dd commented Feb 26, 2022

https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md#0203-2021-12-07

Ah, didn't looked that. If it is exposed, then yeah it can be used. We probably need to document this too. Fine, I'll just create a PR to add a default base value for now.

@kiaking kiaking added enhancement New feature or request build Related to the build system labels May 24, 2022
@kiaking kiaking added this to the v1.0.0 milestone May 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Related to the build system enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants