Project: Open Policy Agent (OPA) (Provisioning / Security & Compliance)
File: contrib-docs.md

title: Contributing Docs kind: contrib weight: 2 Contributing to our docs is one of the best ways to get started contributing to the OPA project. The OPA docs are one of the first places most people go for help, so any changes are impactful for the community. Thanks in advance for contributing to the docs. Docs for the OPA sub-projects each have their own home. Check out their docs to see how to contribute. docs for Kubernetes Admission Control docs for validating your structured configuration data, like YAML and HCL files - Developer documentation for OPA (not part of the website) - This directory contains all of the Markdown, HTML, Sass/CSS, and other assets needed to build the website. See the section below for steps to build the site and test documentation changes locally. This content is not versioned for each release, it is common scaffolding for the website. - The raw OPA documentation can be found under the directory. This content is versioned for each release and should have all images and code snippets alongside the markdown content files. - the source for data used to generate the Each page starts with a Frontmatter block that provides the necessary metadata to format the Docs website. For example, the frontmatter for this page is as follows: ```YAML title: Contributing Docs #Title of the page kind: contrib #Section the page belongs to weight: 2 #Order the page should appear in the left hand nav ``` After the Frontmatter block, each page uses standard markdown formatting. For a primer on Markdown, check out the . To get started, fork the OPA repository and create a local branch for your Docs changes. Check out the if you need some help setting this up. Navigate to the folder in your local environment. Each top level item in the documentation nav will have an associated markdown file in the content folder. Locate the file you wish to update and confirm the title in the Frontmatter matches. Once you've located the correct page, edit the markdown page as necessary. In the case where you want to add a topic that doesn't fit nicely into any of the existing pages, it may make sense to add a new page. Create a markdown file in the content folder and add the appropriate Frontmatter heading. Aside from the title, you will need to specify the `kind` (section in the docs) and `weight` (order the page appears). Once you have made your updates, the next step is to test that they look as expected. To test your changes, generate a local preview with your updated files and preview them with Netlify. Summary of steps: Install dependencies: , , and Build artifacts: `make build` Generate HTML files: `make docs-serve-local` (This can take up to 5 min) Start preview server: `netlify dev` For detailed instructions on setting up local preview, and remote previews with Netlify, check out the docs . Once you've tested your changes and you're happy with how they look, commit them to your branch and open a pull request. If this is your first time opening a pull request with the OPA repository, check out the . Once your PR has been received a Netlify preview will be automatically created, check the PR for a unique link. Reach out in the channel to ask for help.