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.
Quick Start
Section titled “Quick Start”Clone the source
Section titled “Clone the source”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:
git clone https://github.com/cppdoc-cc/cppdoc.gitStart the development server
Section titled “Start the development server”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:
npm inpm run devAdd content and make changes
Section titled “Add content and make changes”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.
Next steps
Section titled “Next steps”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.
Build Static Website
Section titled “Build Static Website”CppDoc is a static website. To build a static site from the source code, run the following commands in the project directory:
npm inpm run buildTroubleshooting
Section titled “Troubleshooting”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.