Community / Contribute
This article explains how to contribute to MDX. Please read through the following guidelines.
Important: before participating in our community, please read our code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
There’s several ways to contribute, not just by writing code. If you have questions, see § Support. If you can provide financial support, see § Sponsor.
As a user you’re perfect for helping us improve our docs. Typo corrections, error fixes, better explanations, new examples, etcetera. All MDX docs live in docs/
.
You can run the docs locally by following those steps:
npm install -g npm
npm install
npm run docs
npx serve public
Some issues lack information, aren’t reproducible, or are just incorrect. You can help by trying to make them easier to resolve. Existing issues might benefit from your unique experience or opinions.
Code contributions are very welcome. It’s probably a good idea to first post a question or open an issue to report a bug or suggest a new feature before creating a pull request.
npm test
MDX is a monorepo. All packages are in packages/
. Documentation is in docs/
.
To run the tests, first do npm install
, then do npm test
. This ensures everything is okay, from code style to unit tests to types.
To build the site, first do npm install
, then do npm run docs
. This produces the website in public/
.
Important: the site uses several experimental packages. They require Node.js 14, and don’t work in earlier or later versions. To build the site, please use Node.js 14 (with nvm
: nvm use 14
).
To release a new version, do:
version
s of packages with a patch, minor, or major (make sure to update dependency ranges on monorepo packages when needed):npm version minor --workspaces --no-git-tag-version
v
) as the message:git commit --all --message 1.2.3 && git tag 1.2.3 && git push && git push --tags
npm publish --workspaces
open https://github.com/mdx-js/mdx/releases