{"id":13790024,"url":"https://github.com/zaydek/esbuild-mdx","last_synced_at":"2025-04-11T04:05:03.124Z","repository":{"id":54733315,"uuid":"323640867","full_name":"zaydek/esbuild-mdx","owner":"zaydek","description":"esbuild plugin for rendering markdown as React components","archived":false,"fork":false,"pushed_at":"2021-02-02T02:37:01.000Z","size":48,"stargazers_count":13,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T04:04:58.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/zaydek.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}},"created_at":"2020-12-22T13:56:58.000Z","updated_at":"2024-01-29T20:42:11.000Z","dependencies_parsed_at":"2022-08-14T01:10:29.332Z","dependency_job_id":null,"html_url":"https://github.com/zaydek/esbuild-mdx","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesbuild-mdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesbuild-mdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesbuild-mdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaydek%2Fesbuild-mdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaydek","download_url":"https://codeload.github.com/zaydek/esbuild-mdx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339287,"owners_count":21087215,"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","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":[],"created_at":"2024-08-03T22:00:36.042Z","updated_at":"2025-04-11T04:05:03.102Z","avatar_url":"https://github.com/zaydek.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# esbuild-mdx\n\n`esbuild-mdx` resolves `.md` and `.mdx`-delimited files as markdown components you can render in your React components.\n\n- Add dependencies:\n\n  ```sh\n  yarn add react react-dom\n  yarn add --dev @mdx-js/react esbuild-mdx\n  ```\n\n- Create [`esbuild.js`](https://github.com/zaydek/esbuild-mdx-example/blob/master/esbuild.js):\n\n  ```js\n  require(\"esbuild\").build({\n  \t// ...\n  \tplugins: [require(\"esbuild-mdx\")()],\n  \t// ...\n  })\n  ```\n\n- Create a `.md` or `.mdx`-delimited file:\n\n  ```md\n  # Hello, world rendered by `esbuild-mdx`!\n  ```\n\n- Import your `.md` or `.mdx` file and render as a React component:\n\n  ```jsx\n  import React from \"react\"\n  import ReactDOM from \"react-dom\"\n\n  import MarkdownComponent from \"./example.md\"\n\n  function App() {\n  \treturn (\n  \t\t\u003cdiv\u003e\n  \t\t\t\u003ch1\u003e\n  \t\t\t\tHello, world rendered by \u003ccode\u003eReact\u003c/code\u003e!\n  \t\t\t\u003c/h1\u003e\n  \t\t\t\u003cMarkdownComponent /\u003e\n  \t\t\u003c/div\u003e\n  \t)\n  }\n\n  ReactDOM.render(\u003cApp /\u003e, document.getElementById(\"root\"))\n  ```\n\nSee [esbuild-mdx-example](https://github.com/zaydek/esbuild-mdx-example) for a reference implementation.\n\n**Note:** `react`, `react-dom`, and `@mdx-js/react` are peer dependencies.\n\n## License\n\nLicensed as MIT open source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaydek%2Fesbuild-mdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaydek%2Fesbuild-mdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaydek%2Fesbuild-mdx/lists"}