Skip to main content

Contributing to the Website

This page shows you how to contribute to MNE-CPP's documentation website. As with other code contributions, you will need to fork MNE-CPP's repository on GitHub and then submit a pull request.

The documentation website is built with Docusaurus and lives inside the repository at doc/website/. Content pages are written in MDX (.mdx files) and can be found in doc/website/docs/.

Local Development

Prerequisites

Make sure you have Node.js (v18 or later) installed.

Install Dependencies

cd doc/website
npm install

Start a Local Development Server

npx docusaurus start

This launches a local server (typically at http://localhost:3000/) with hot-reload — any changes you save to .md or configuration files will be reflected in the browser immediately.

Build for Production

To verify your changes produce a clean production build:

npx docusaurus build

The build will catch broken links and other issues. Fix any errors before submitting your pull request.

Serve the Production Build

npx docusaurus serve

Making Changes

  1. Create a feature branch from main.
  2. Navigate to doc/website/docs/ and edit or add .mdx files.
  3. If you add a new page, register it in doc/website/sidebars.ts.
  4. Preview your changes locally with npx docusaurus start.
  5. Run npx docusaurus build to verify there are no broken links.
  6. Commit, push, and open a pull request.