-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add mdx
filter
#550
Add mdx
filter
#550
Conversation
Sorry for the late response. It looks great! You can take the vto test as example: https://github.com/lumeland/lume/blob/main/tests/assets/vento/vto-filter.page.js |
I added an example, but I'm not quite sure how Lines 150 to 154 in a5430a4
|
@kwaa In this case it's |
If use Build a mdx site => ./tests/mdx.test.ts:5:6
error: Error: Error rendering the page: /mdx-filter.page.ts
throw new Error(`Error rendering the page: ${page.sourcePath}`, {
^
...
Caused by: TypeError: Path must be a string. Received undefined
... |
Hmm, okay. It must be here: https://github.com/lumeland/lume/blob/main/plugins/mdx.ts#L73 const baseUrl = toFileUrl(join(this.baseUrl, filename || "")).href; |
Changing to this works fine: - const baseUrl = toFileUrl(join(this.baseUrl, filename || "")).href;
+ const baseUrl = toFileUrl(join(this.baseUrl, filename || "/")).href; Using an empty string will cause the JSX import to fail. |
Great. Good work, thanks you!! |
Description
This PR adds an
mdx
Filter to the MDX plugin.Check List
CODE OF CONDUCT
CONTRIBUTING
send multiple pull request.
fmt
to fix the code format before commit.CHANGELOG.md
.