This repository powers Semgrep’s documentation. Docs are built using Docusaurus 3.
Contributions to the docs are welcome! To start contributing, first please make sure you read and agree with the Semgrep’s Contributor Covenant Code of Conduct.
- Clone the repository.
- Install:
yarn install. - On a clean git state, enter
yarn build. - Enter
git checkout .The previous commandyarn buildoverwrites some placeholders with exact values and these should not be committed. In most cases, there is no need to runyarn buildafter this initial set up process. - There are two options to run the docs locally:
- Enter
yarn devand then go to<http://localhost:3000/>. This option is for contributors and writers. - Enter
yarn startand then go to:<http://localhost:3000/>. This option is for displaying an accurate preview of the live documentation. It runs a script that replaces certain identifiers with code or file templates. These replacements ensure that certain code or file templates are up-to-date.
- Enter
Congratulations. You have set up your local repository for development.
yarn buildThis command generates static content into the build directory. Preview the production build by running:
yarn serveNote: Production build allows you to test redirects. Manage redirects in docusaurus.config.js.
Content is written in regular Markdown or MDX files. Markdown and MDX files optionally contain YAML style metadata (front matter) at the top of the file. You can use front matter to override attributes like the slug and other things.
Read more about creating documentation using Docusaurus here.
Please submit suggested changes via PRs made against this repository’s main branch.