{"id":29428848,"url":"https://github.com/abhay-ramesh/notebook-mdx","last_synced_at":"2026-04-13T13:32:09.341Z","repository":{"id":304007785,"uuid":"1016305391","full_name":"abhay-ramesh/notebook-mdx","owner":"abhay-ramesh","description":"Render Jupyter notebooks in MDX with authentic styling and syntax highlighting","archived":false,"fork":false,"pushed_at":"2026-03-27T21:04:45.000Z","size":1796,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T02:11:11.368Z","etag":null,"topics":["documentation","jupyter-notebook","mdx","nextjs","rehype","remark"],"latest_commit_sha":null,"homepage":"https://notebook-mdx.vercel.app","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/abhay-ramesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T20:00:37.000Z","updated_at":"2026-03-27T21:04:48.000Z","dependencies_parsed_at":"2025-07-10T22:12:45.968Z","dependency_job_id":"57cd2850-bb0c-4711-9468-d6b1fd5d8880","html_url":"https://github.com/abhay-ramesh/notebook-mdx","commit_stats":null,"previous_names":["abhay-ramesh/notebook-mdx"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abhay-ramesh/notebook-mdx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhay-ramesh%2Fnotebook-mdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhay-ramesh%2Fnotebook-mdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhay-ramesh%2Fnotebook-mdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhay-ramesh%2Fnotebook-mdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhay-ramesh","download_url":"https://codeload.github.com/abhay-ramesh/notebook-mdx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhay-ramesh%2Fnotebook-mdx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31754871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["documentation","jupyter-notebook","mdx","nextjs","rehype","remark"],"created_at":"2025-07-12T16:00:34.883Z","updated_at":"2026-04-13T13:32:09.322Z","avatar_url":"https://github.com/abhay-ramesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# notebook-mdx\n\n\u003cdiv align=\"center\"\u003e\n\n![notebook-mdx Logo](.github/assets/logo.png)\n\n**Render Jupyter notebooks in MDX with authentic styling and syntax highlighting**\n\n[![NPM Version](https://img.shields.io/npm/v/notebook-mdx?style=flat\u0026colorA=18181B\u0026colorB=28CF8D)](https://www.npmjs.com/package/notebook-mdx)\n[![NPM Downloads](https://img.shields.io/npm/dm/notebook-mdx?style=flat\u0026colorA=18181B\u0026colorB=28CF8D)](https://www.npmjs.com/package/notebook-mdx)\n[![Bundle Size](https://img.shields.io/bundlephobia/minzip/notebook-mdx?style=flat\u0026colorA=18181B\u0026colorB=28CF8D)](https://bundlephobia.com/package/notebook-mdx)\n[![GitHub Stars](https://img.shields.io/github/stars/abhay-ramesh/notebook-mdx?style=flat\u0026colorA=18181B\u0026colorB=28CF8D)](https://github.com/abhay-ramesh/notebook-mdx)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat\u0026colorA=18181B\u0026colorB=3178C6)](https://www.typescriptlang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=flat\u0026colorA=18181B\u0026colorB=F59E0B)](https://opensource.org/licenses/MIT)\n\n[Documentation](https://notebook-mdx.vercel.app) • [Demo](https://notebook-mdx.vercel.app/notebook-demo) • [NPM](https://www.npmjs.com/package/notebook-mdx) • [GitHub](https://github.com/abhay-ramesh/notebook-mdx)\n\n\u003c/div\u003e\n\n## ✨ Features\n\n- 🎨 **Authentic Jupyter styling** - Pixel-perfect recreation of Jupyter notebook appearance\n- 🖥️ **Syntax highlighting** - Multi-language code highlighting with Highlight.js\n- 📱 **Responsive design** - Looks great on desktop, tablet, and mobile\n- ⚡ **Zero client-side dependencies** - Renders at build time for optimal performance\n- 🔧 **Framework agnostic** - Works with Next.js, Docusaurus, Fumadocs, and more\n- 📦 **TypeScript support** - Full type safety out of the box\n- 🎯 **Simple API** - Just import and render, no complex configuration\n- 🔄 **Multi-language cells** - Python, R, JavaScript, SQL, and more\n- 🖼️ **Rich outputs** - Images, HTML, JSON, and text outputs\n- 📋 **Copy-paste ready** - Code cells with built-in copy functionality\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\nnpm install notebook-mdx remark-directive\n# or\nyarn add notebook-mdx remark-directive\n# or\npnpm add notebook-mdx remark-directive\n```\n\n### Setup\n\nConfigure the remark plugin in your MDX setup:\n\n```javascript\n// next.config.js\nimport remarkDirective from 'remark-directive';\nimport { remarkNotebookDirective } from 'notebook-mdx';\n\nconst withMDX = require('@next/mdx')({\n  extension: /\\.mdx?$/,\n  options: {\n    remarkPlugins: [\n      remarkDirective,\n      remarkNotebookDirective,\n    ],\n  },\n});\n\nmodule.exports = withMDX({\n  pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],\n});\n```\n\n### Basic Usage\n\nUse the notebook directive in your MDX files:\n\n```mdx\n# My Data Analysis\n\n:::notebook{file=\"./my-notebook.ipynb\"}\nThis notebook shows our analysis results\n:::\n\nMore content here...\n\n:::notebook{file=\"./demo.ipynb\" cells=\"1-5\" showCellNumbers}\nSelected cells from another notebook\n:::\n```\n\n### Alternative: Direct Component Usage\n\nFor more control, you can also use components directly:\n\n```mdx\nimport { NotebookLoader, NotebookStyles } from \"notebook-mdx\";\nimport notebook from \"./my-notebook.ipynb\";\n\n\u003cNotebookStyles /\u003e\n\u003cNotebookLoader notebookData={JSON.parse(notebook)} /\u003e\n```\n\n## 📖 Documentation\n\n- **[Getting Started](https://notebook-mdx.vercel.app)** - Installation and basic usage\n- **[Advanced Usage](https://notebook-mdx.vercel.app/advanced)** - Multi-language support and configuration\n- **[API Reference](https://notebook-mdx.vercel.app/api)** - Complete component props and options\n- **[Live Demo](https://notebook-mdx.vercel.app/notebook-demo)** - Interactive examples\n\n## 🎯 Use Cases\n\n### 📚 Technical Documentation\n\nPerfect for data science blogs, tutorials, and educational content where you want to show Jupyter notebooks inline with your documentation.\n\n### 🔬 Research Papers\n\nEmbed computational notebooks directly in academic papers and research documentation.\n\n### 📊 Data Science Portfolios\n\nShowcase your data analysis projects with authentic notebook styling in your portfolio site.\n\n### 🏢 Internal Documentation\n\nDocument data pipelines, analysis workflows, and research findings in company wikis and documentation sites.\n\n## 🌟 Why notebook-mdx?\n\n| Feature               | notebook-mdx                  | Alternatives             |\n| --------------------- | ----------------------------- | ------------------------ |\n| **Authentic Styling** | ✅ Pixel-perfect Jupyter look | ❌ Generic code blocks   |\n| **Zero Runtime**      | ✅ Renders at build time      | ❌ Client-side rendering |\n| **TypeScript**        | ✅ Full type safety           | ❌ Limited or no types   |\n| **Framework Support** | ✅ Works everywhere           | ❌ Framework-specific    |\n| **Bundle Size**       | ✅ ~15kB minzipped            | ❌ Often 100kB+          |\n| **Maintenance**       | ✅ Actively maintained        | ❌ Many are abandoned    |\n\n## 🖼️ Screenshots\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\" align=\"center\"\u003e\n\n### Before (Plain Markdown)\n\n_Generic code blocks with basic syntax highlighting_\n\n![Plain Markdown](.github/assets/before.png)\n\n\u003c/td\u003e\n\u003ctd width=\"50%\" align=\"center\"\u003e\n\n### After (notebook-mdx)\n\n_Authentic Jupyter styling with In/Out prompts_\n\n![notebook-mdx](.github/assets/after.png)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## 🔧 Framework Examples\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eNext.js App Router\u003c/strong\u003e\u003c/summary\u003e\n\n```mdx\n// app/blog/my-analysis/page.mdx\nexport const metadata = {\n  title: \"My Data Analysis\",\n  description: \"Deep dive into user behavior data\"\n};\n\n# My Data Analysis\n\n:::notebook{file=\"./analysis.ipynb\" showCellNumbers}\nThis notebook shows our user behavior analysis\n:::\n\n:::notebook{file=\"./additional-analysis.ipynb\" cells=\"1-3\" hideCode}\nKey findings from our research\n:::\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDocusaurus\u003c/strong\u003e\u003c/summary\u003e\n\n```mdx\n---\ntitle: Machine Learning Tutorial\n---\n\n# Machine Learning Tutorial\n\n:::notebook{file=\"./tutorial.ipynb\" showCellNumbers showOutputs}\nComplete machine learning workflow\n:::\n\n:::notebook{file=\"./exercises.ipynb\" cells=\"1,3,5\"}\nPractice exercises\n:::\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eFumadocs\u003c/strong\u003e\u003c/summary\u003e\n\n```mdx\n---\ntitle: API Documentation\ndescription: Complete guide to our data API\n---\n\n# API Documentation\n\n:::notebook{file=\"./api-examples.ipynb\" hideCode showOutputs}\nLive API examples and responses\n:::\n\n:::notebook{file=\"./advanced-usage.ipynb\" cells=\"1-5\"}\nAdvanced usage patterns\n:::\n```\n\n\u003c/details\u003e\n\n## 🏗️ Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/abhay-ramesh/notebook-mdx.git\ncd notebook-mdx\n\n# Install dependencies\npnpm install\n\n# Start development\npnpm dev\n\n# Run tests\npnpm test\n\n# Build packages\npnpm build\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n- 🐛 [Report bugs](https://github.com/abhay-ramesh/notebook-mdx/issues/new?template=bug_report.md)\n- 💡 [Request features](https://github.com/abhay-ramesh/notebook-mdx/issues/new?template=feature_request.md)\n- 📖 [Improve docs](https://github.com/abhay-ramesh/notebook-mdx/tree/main/apps/docs)\n- 🔧 [Submit PRs](https://github.com/abhay-ramesh/notebook-mdx/pulls)\n\n## 🙏 Acknowledgments\n\n- [Jupyter Project](https://jupyter.org/) for the amazing notebook format\n- [Highlight.js](https://highlightjs.org/) for syntax highlighting\n- [MDX](https://mdxjs.com/) for making this integration possible\n\n## 📄 License\n\nMIT © [Abhay Ramesh](https://github.com/abhay-ramesh)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[⭐ Star this repo](https://github.com/abhay-ramesh/notebook-mdx) if notebook-mdx helped you!**\n\nMade with ❤️ by [@abhay-ramesh](https://github.com/abhay-ramesh)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhay-ramesh%2Fnotebook-mdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhay-ramesh%2Fnotebook-mdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhay-ramesh%2Fnotebook-mdx/lists"}