{"id":13394255,"url":"https://github.com/jxnblk/mdx-docs","last_synced_at":"2025-09-27T01:30:44.279Z","repository":{"id":67375983,"uuid":"143901641","full_name":"jxnblk/mdx-docs","owner":"jxnblk","description":":memo: Document and develop React components with MDX and Next.js","archived":true,"fork":false,"pushed_at":"2019-09-25T16:02:23.000Z","size":1838,"stargazers_count":453,"open_issues_count":12,"forks_count":32,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-14T07:47:58.062Z","etag":null,"topics":["design-system","docs","documentation","markdown","mdx","nextjs","react","theming"],"latest_commit_sha":null,"homepage":"https://mdx-docs.now.sh","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/jxnblk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-07T16:44:06.000Z","updated_at":"2024-03-17T21:10:05.000Z","dependencies_parsed_at":"2023-02-21T03:01:14.732Z","dependency_job_id":null,"html_url":"https://github.com/jxnblk/mdx-docs","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/jxnblk%2Fmdx-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxnblk%2Fmdx-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxnblk%2Fmdx-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jxnblk%2Fmdx-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jxnblk","download_url":"https://codeload.github.com/jxnblk/mdx-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234369910,"owners_count":18821352,"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":["design-system","docs","documentation","markdown","mdx","nextjs","react","theming"],"created_at":"2024-07-30T17:01:13.959Z","updated_at":"2025-09-27T01:30:43.860Z","avatar_url":"https://github.com/jxnblk.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n# MDX Docs\n\n:memo: Document and develop React components with [MDX][] and [Next.js][]\n\n![](docs/static/mdx-docs.gif)\n\nhttps://mdx-docs.now.sh/\n\n[![Build Status][badge]][travis]\n[![Downloads][downloads-badge]][npm]\n[![Version][version-badge]][npm]\n[![MIT License][license]](LICENSE.md)\n\n```sh\nnpm init docs\n```\n\n- :memo: Create documentation with markdown\n- :atom_symbol: Import and use React components\n- :gear: Component-based API\n- :computer: Live code examples\n- :nail_care: Customizable themes\n- ▲ Built for Next.js\n\n[badge]: https://flat.badgen.net/travis/jxnblk/mdx-docs\n[travis]: https://travis-ci.org/jxnblk/mdx-docs\n[version-badge]: https://flat.badgen.net/npm/v/mdx-docs\n[downloads-badge]: https://flat.badgen.net/npm/dt/mdx-docs\n[npm]: https://npmjs.com/package/mdx-docs\n[license]: https://flat.badgen.net/badge/license/MIT/blue\n\n## Getting Started\n\nTo create a new documentation site, run `npm init docs` and follow the prompts.\nOnce the application has been generated, see the [README.md](templates/next/README.md)\nfor more documentation.\n\nTo add MDX Docs to an existing Next.js app, see the [Custom Setup](docs/pages/custom-setup.md) docs.\n\n## Using MDX\n\nMDX lets you mix markdown with inline JSX to render React components.\nWrite markdown as you normally would and use ES import syntax to use custom components in your document.\n\n```mdx\nimport { Box } from 'grid-styled'\n\n# Hello MDX!\n\n\u003cBox\n  p={3}\n  bg='tomato'\u003e\n  This will render as a component\n\u003c/Box\u003e\n```\n\n## Live Code\n\nMDX Docs has built-in components to render JSX fenced code blocks as live previews with editable code, powered by [react-live](https://github.com/FormidableLabs/react-live).\nTo make a code block render as an editable example, use the `.jsx` language attribute (note the `.` prefix).\n\n````mdx\nLive code example:\n\n```.jsx\n\u003cbutton\u003eBeep\u003c/button\u003e\n```\n````\n\n[react-live]: https://github.com/FormidableLabs/react-live\n\n## Components Scope\n\nTo add components to scope for use in the live code examples,\npass a `components` object to the [`Layout`](docs/pages/components.md#Layout) component.\n\n```jsx\n// example components\nimport React from 'react'\n\nexport default {\n  Box: props =\u003e (\n    \u003cdiv\n      {...props}\n      style={{\n        padding: '32px',\n        backgroundColor: 'tomato'\n      }}\n    /\u003e\n  )\n}\n```\n\n```jsx\n// example _app.js\n\u003cLayout\n  {...this.props}\n  components={components}\u003e\n  \u003cLayout.Main\u003e\n    \u003cComponent {...page} /\u003e\n  \u003c/Layout.Main\u003e\n\u003c/Layout\u003e\n```\n\nThe `components` object can also include components to render the HTML elements in MDX.\n\n\n## Documentation\n\n- [Components](https://mdx-docs.now.sh/components)\n- [Custom Setup](https://mdx-docs.now.sh/custom-setup)\n\n---\n\n#### Prior Art\n\n[mdx-go][],\n[Compositor x0][],\n[mdx-deck][],\n[live-doc][],\n[Doctor Mark][],\n[docz][]\n\n#### Related\n\n[Next.js][],\n[MDX][],\n[react-live](https://github.com/FormidableLabs/react-live)\n\n[mdx-go]: https://github.com/jxnblk/mdx-go\n[Compositor x0]: https://compositor.io/x0\n[live-doc]: https://github.com/jxnblk/live-doc\n[Doctor Mark]: https://github.com/jxnblk/doctor-mark\n[mdx-deck]: https://github.com/jxnblk/mdx-deck\n[docz]: https://github.com/pedronauck/docz\n\n[MDX]: https://github.com/mdx-js/mdx\n[Next.js]: https://github.com/zeit/next.js/\n\n\n[MIT License](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjxnblk%2Fmdx-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjxnblk%2Fmdx-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjxnblk%2Fmdx-docs/lists"}