https://github.com/md2docx/md2docx-plugin-template
This repository serves as a starting point for building plugins that extend the functionality of mdast2docx and @m2d/remark-docx.
https://github.com/md2docx/md2docx-plugin-template
javascript markdown md2docx md2docx-plugin mdast2docx nodejs plugin remark-docx remark-plugin template typescript
Last synced: 2 months ago
JSON representation
This repository serves as a starting point for building plugins that extend the functionality of mdast2docx and @m2d/remark-docx.
- Host: GitHub
- URL: https://github.com/md2docx/md2docx-plugin-template
- Owner: md2docx
- License: mpl-2.0
- Created: 2025-03-25T11:34:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-10T02:39:34.000Z (2 months ago)
- Last Synced: 2026-04-10T04:26:21.997Z (2 months ago)
- Topics: javascript, markdown, md2docx, md2docx-plugin, mdast2docx, nodejs, plugin, remark-docx, remark-plugin, template, typescript
- Language: TypeScript
- Homepage:
- Size: 1.45 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
## π§© Plugin Template for `mdast2docx` & `@m2d/remark-docx` 
[](https://github.com/md2docx/md2docx-plugin-template/actions/workflows/test.yml) [](https://codeclimate.com/github/md2docx/md2docx-plugin-template/maintainability) [](https://codecov.io/gh/md2docx/md2docx-plugin-template) [](https://www.npmjs.com/package/@m2d/emoji) [](https://www.npmjs.com/package/@m2d/emoji) 
> This repository serves as a starting point for building plugins that extend the functionality of [`mdast2docx`](https://www.npmjs.com/package/mdast2docx), [`@m2d/core`](https://www.npmjs.com/package/@m2d/core) and [`@m2d/remark-docx`](https://www.npmjs.com/package/@m2d/remark-docx).
Features
This template offers the following pre-configured features. Additionally, your repository will automatically be re-branded with the help of workflows and post-install scripts.
β
Monorepo powered by Turborepo and GitHub actions for automating building, testing, and deploying your plugin library
β
Examples with Next.js, and Vite to showcase how your library can be utilized, also helps in quick manual testing
β
Examples pre-configured for Light/Dark theme based on user preference
β
Examples ready to be deployed to Vercel
β
Code of Conduct and contributing files, ready for customization
β
Prettier and linter configured according to modern best practices (Feel free to add your flavor)
β
Recommended VSCode extensions - Prettier and [Kanban board](https://github.com/mayank1513/vscode-extension-trello-kanban-board) for code formatting and project management directly within your IDE
β
Test setup with Vitest - A modern and fast testing framework supporting Jest-like APIs
β
Workflows to automate testing on every pull-request or code push event
β
Workflow to automatically publish and create GitHub releases when you update your library's `package.json` file.
β
Workflow to automatically rebrand the entire template based on your repository name. (Refer [TODO.md](./TODO.md))
β
Plus, this repo includes a quick checklist for configuring Codecov and other badges, setting up your docs website on GitHub pages, and more. See [Checklist](./TODO.md) or open TKB(Workspace) if you have installed the Trello-Kanban-Board extension.
>
Star [this repository](https://github.com/md2docx/md2docx-plugin-template) and share it with your friends.
---
## Getting Started:
This template is based on [Turborepo Template](https://github.com/react18-tools/turborepo-template/). But this one is optimized for md2docx plugins. It includes pre-configured unit-tests, a lot of extra stuff provided by the turborepo-template is removed, and comes with dependencies and scripts optimized for md2docx plugin development.
To get started, simply click on the `"Use this template"` button to create a new repository based on this template, and install dependencies. Customize it according to your requirements for your next md2docx plugin.
For detailed instructions and a checklist, please refer to [TODO.md](./TODO.md).
### π€© Don't forget to star [this repository](https://github.com/react18-tools/turborepo-template)!
Looking for a hands-on course to get started with Turborepo? Check out [React and Next.js with TypeScript](https://mayank-chaudhari.vercel.app/courses/react-and-next-js-with-typescript) and [The Game of Chess with Next.js, React, and TypeScript](https://www.udemy.com/course/game-of-chess-with-nextjs-react-and-typescript/?referralCode=851A28F10B254A8523FE)
---
### π§° Helpful References
- [`@m2d/core`](https://www.npmjs.com/package/@m2d/core) β Core MDAST to DOCX engine
- [`@m2d/remark-docx`](https://www.npmjs.com/package/@m2d/remark-docx) β Remark plugin
- [Unified Ecosystem](https://unifiedjs.com) β AST-based processors for markdown, html, etc.
- [MDAST Spec](https://github.com/syntax-tree/mdast) β Markdown Abstract Syntax Tree
---
### π‘ Derive Ideas from existing Plugins
- `@m2d/math`: Parse math blocks and convert to equation DOCX
- `@m2d/image`: Convert Markdown/HTML images to inline DOCX images
- `@m2d/html`: Parse raw HTML into extended MDAST with styles
- `@m2d/table`: Advanced table support with merged cells, widths, styles
---
### π Contribute
If youβre building a plugin you'd like to share, let us know or open a PR in the [mdast2docx plugins repo](https://github.com/m2djs/mdast2docx)!
>
Enrolling in [our courses](https://mayank-chaudhari.vercel.app/courses) or [sponsor](https://github.com/sponsors/mayank1513) our work.
with π by Mayank Kumar Chaudhari