Skip to content

Getting Started

Thanks for your interest in contributing to CppDoc!

CppDoc is an open documentation for the C/C++ programming languages and their standard libraries. It is built on top of the Starlight Astro theme, and maintained by C/C++ enthusiasts in an open community.

The source code of CppDoc is hosted on GitHub. You can clone the repository to your local by running the following command in your terminal:

Terminal window
git clone https://github.com/cppdoc-cc/cppdoc.git

When working locally, a development server allows you to preview your changes and automatically refreshes your browser when you make changes.

Inside the cppdoc project directory, run the following command to start the development server:

Terminal window
npm i
npm run dev

Documentation pages are typically written in MDX files. All these files are kept under the src/content/docs directory, which has a directory hierarchy as follows:

  • Directorysrc/content/docs
    • Directoryc
      • Directorylanguage Documentation for the C programming language
      • Directorylibrary Documentation for the C standard library
    • Directorycpp
      • Directorylanguage Documentation for the C++ programming language
      • Directorylibrary Documentation for the C++ standard library

Read more about our documentation development guidelines in the Development Guideline section.

Once you have made a change, you can issue a pull request to submit your change to the CppDoc community. Community members will review your change, and deploy it to the live CppDoc site.

CppDoc is a static website. To build a static site from the source code, run the following commands in the project directory:

Terminal window
npm i
npm run build

If you met any problems, please check out our Development Guideline. If you cannot find what you’re looking for, feel free to ask for help in our community.