{"id":22105240,"url":"https://github.com/zhangyu1818/rsc-mdx","last_synced_at":"2025-10-12T03:30:24.238Z","repository":{"id":219241208,"uuid":"748440658","full_name":"zhangyu1818/rsc-mdx","owner":"zhangyu1818","description":"Lightweight MDX rendering for React Server Components, with custom component and plugin support.","archived":false,"fork":false,"pushed_at":"2024-01-26T08:59:52.000Z","size":43,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T07:58:00.534Z","etag":null,"topics":["mdx","react","react-server-components"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhangyu1818.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-26T01:04:33.000Z","updated_at":"2024-05-16T07:40:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2589a41f-eea9-455b-8134-92c0d1ebe2fb","html_url":"https://github.com/zhangyu1818/rsc-mdx","commit_stats":null,"previous_names":["zhangyu1818/rsc-mdx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhangyu1818/rsc-mdx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Frsc-mdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Frsc-mdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Frsc-mdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Frsc-mdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhangyu1818","download_url":"https://codeload.github.com/zhangyu1818/rsc-mdx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Frsc-mdx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010148,"owners_count":26084692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mdx","react","react-server-components"],"created_at":"2024-12-01T06:40:02.666Z","updated_at":"2025-10-12T03:30:23.944Z","avatar_url":"https://github.com/zhangyu1818.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rsc-mdx\n\nrsc-mdx is an ultra-lightweight library specifically designed for React Server Components, offering a minimalistic wrapper around `@mdx-js/mdx`. With rsc-mdx, you can effortlessly render MDX content on the server side, while also supporting custom components and plugin configurations to meet a variety of complex requirements.\n\n## Key Features\n\n- **Ultra-Lightweight**: rsc-mdx provides a minimalistic wrapper around `@mdx-js/mdx`, ensuring negligible overhead during usage.\n- **Server-Side Rendering**: Leverages the advantages of React Server Components to render MDX content on the server, significantly reducing the load on the client.\n- **Ease of Use**: Works seamlessly with `@mdx-js/mdx`, eliminating the need for additional configurations or complex setups.\n- **Performance Enhancement**: Utilizes server components to decrease the workload on the client, resulting in faster page interactions.\n\n## Installation\n\nYou can install rsc-mdx using npm:\n\n```bash\nnpm install rsc-mdx\n```\n\n## Usage Examples\n\n### Basic Usage\n\nUse rsc-mdx within server components to render MDX content:\n\n```jsx\nimport { MDX } from 'rsc-mdx'\n\nconst markdown = `\n# h1\n\nlorem ipsum\n`\n\nexport default function Page() {\n  return \u003cMDX source={markdown} /\u003e\n}\n```\n\n### Integrating Custom Components\n\nEasily integrate custom components using the `useMDXComponents` function:\n\n```jsx\nimport { lazy } from 'react'\nimport { MDX } from 'rsc-mdx'\n\nconst Counter = lazy(() =\u003e import('./counter'))\n\nconst markdown = `\n# h1\n\nlorem ipsum\n\n\u003cCounter /\u003e\n`\n\nexport default function Page() {\n  return \u003cMDX source={markdown} useMDXComponents={() =\u003e ({ Counter })} /\u003e\n}\n```\n\n### Configuring Plugins\n\nSupports `remark` and `rehype` plugins to enhance MDX processing capabilities:\n\n```jsx\n\u003cMDX\n  source={markdown}\n  remarkPlugins={\n    [\n      /*...*/\n    ]\n  }\n  rehypePlugins={\n    [\n      /*...*/\n    ]\n  }\n/\u003e\n```\n\nFor more configuration options, refer to the MDX documentation: [MDX Documentation](https://mdxjs.com/packages/mdx/#evaluateoptions).\n\n## Contribution\n\nWe welcome all forms of contribution! If you have any questions, suggestions, or would like to contribute code, please feel free to submit an issue or pull request.\n\n## License\n\nThis project is licensed under the MIT License. For more details, see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangyu1818%2Frsc-mdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhangyu1818%2Frsc-mdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangyu1818%2Frsc-mdx/lists"}