Skip to content
This repository was archived by the owner on Sep 22, 2024. It is now read-only.

support minimal mdx cases and add test fixture#159

Draft
deer wants to merge 1 commit into
netzo:mainfrom
deer:mdx
Draft

support minimal mdx cases and add test fixture#159
deer wants to merge 1 commit into
netzo:mainfrom
deer:mdx

Conversation

@deer
Copy link
Copy Markdown
Contributor

@deer deer commented Mar 7, 2024

A small amount of life happened which prevented me from making any meaningful progress on this , but I finally got some space to at least get this up as a draft review. I hope to get back to it soon in order to add the much needed tests and document what's necessary to move it forward.

Comment thread lib/plugins/mdx/mod.ts
> => {
const mdxFiles = await scanForMDXFiles("routes");
const routes: PluginRoute[] = await mdxPathsToRoutes(mdxFiles);
export async function mdx(config: MdxConfig): Promise<Plugin<NetzoState>> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit here, maybe keep arrow syntax here for consistency with the other plugins.

export const mdx = async (config: MdxConfig): Promise<Plugin<NetzoState>> => {}

Comment thread lib/plugins/mdx/mod.ts
// deno-lint-ignore ban-types
export type MdxConfig = {};
export type MdxConfig = {
configLocation: string;
Copy link
Copy Markdown
Contributor

@miguelrk miguelrk Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should look into using the same property across plugins. The unocss plugin uses url for this same value which should also be set to import.meta.url).

I have no preference really, but I think URL is more indicative than location (matches the url in import.meta.url). Maybe configURL would be best of both worlds? And we could change this also for the unocss plugin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants