|
1 | | -# How to Contribute |
| 1 | +# Contributing to Capa Documentation |
2 | 2 |
|
3 | | -We'd love to accept your patches and contributions to this project. There are |
4 | | -just a few small guidelines you need to follow. |
| 3 | +Thank you for improving the Capa website and documentation. Contributions are reviewed through GitHub pull requests in [capa-cloud/capa.io](https://github.com/capa-cloud/capa.io). |
5 | 4 |
|
6 | | -## Contributor License Agreement |
| 5 | +## Set up the site |
7 | 6 |
|
8 | | -Contributions to this project must be accompanied by a Contributor License |
9 | | -Agreement. You (or your employer) retain the copyright to your contribution; |
10 | | -this simply gives us permission to use and redistribute your contributions as |
11 | | -part of the project. Head over to <https://cla.developers.google.com/> to see |
12 | | -your current agreements on file or to sign a new one. |
| 7 | +```bash |
| 8 | +git clone --recurse-submodules https://github.com/capa-cloud/capa.io.git |
| 9 | +cd capa.io |
| 10 | +npm ci |
| 11 | +npm --prefix themes/docsy install |
| 12 | +make dev |
| 13 | +``` |
13 | 14 |
|
14 | | -You generally only need to submit a CLA once, so if you've already submitted one |
15 | | -(even if it was for a different project), you probably don't need to do it |
16 | | -again. |
| 15 | +Hugo Extended `0.145.0` is preferred. If it is not installed, `scripts/hugo.sh` uses the pinned Docker image. |
17 | 16 |
|
18 | | -## Code reviews |
| 17 | +## Make a documentation change |
19 | 18 |
|
20 | | -All submissions, including submissions by project members, require review. We |
21 | | -use GitHub pull requests for this purpose. Consult |
22 | | -[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more |
23 | | -information on using pull requests. |
| 19 | +1. Create a branch from `master`. |
| 20 | +2. Edit the appropriate file under `content/zh/` or `content/en/`. |
| 21 | +3. Add the corresponding translation when the same workflow is available in both languages. |
| 22 | +4. Put unfinished pages behind `draft: true`; never publish Docsy template content. |
| 23 | +5. Use repository-relative links for files in this repository and canonical HTTPS links for external resources. |
| 24 | +6. Run `make check` before opening a pull request. |
24 | 25 |
|
25 | | -## Community Guidelines |
| 26 | +For website code or build changes, also run: |
26 | 27 |
|
27 | | -This project follows |
28 | | -[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). |
| 28 | +```bash |
| 29 | +npm test |
| 30 | +make build |
| 31 | +``` |
| 32 | + |
| 33 | +## Pull request checklist |
| 34 | + |
| 35 | +- The page explains what the reader can accomplish and includes prerequisites where needed. |
| 36 | +- Commands and dependency versions match the source repositories. |
| 37 | +- All links and images resolve. |
| 38 | +- Chinese and English navigation remain usable. |
| 39 | +- Examples contain no credentials, private endpoints, customer data, or personal identifiers. |
| 40 | +- Generated `docs/`, `public/`, and `resources/` files are not committed. |
| 41 | + |
| 42 | +## Reporting problems |
| 43 | + |
| 44 | +Use [GitHub Issues](https://github.com/capa-cloud/capa.io/issues) for broken pages, incorrect examples, translation gaps, and build failures. Security-sensitive reports should not include secrets or exploit data in a public issue. |
| 45 | + |
| 46 | +## License |
| 47 | + |
| 48 | +By contributing, you agree that your contribution is licensed under the repository's [Apache License 2.0](LICENSE). |
0 commit comments