|
| 1 | +# nodejs-loaders.github.io Contributing Guide |
| 2 | + |
| 3 | +Thank you for considering contributing to Node.js Loaders website! Contributions welcome, be they bug reports, feature requests, pull requests, or just questions. |
| 4 | + |
| 5 | +## Getting started |
| 6 | + |
| 7 | +Commands specifically relevant to this project are: |
| 8 | + |
| 9 | +Run the frontend unit tests: |
| 10 | +```bash |
| 11 | +node --run test:unit |
| 12 | +``` |
| 13 | + |
| 14 | +Lint, format, and check types can be handled by: |
| 15 | +```bash |
| 16 | +node --run pre-commit |
| 17 | +``` |
| 18 | + |
| 19 | +## Writing Content (Posts) |
| 20 | + |
| 21 | +To contribute a new post, create a new `.mdx` file in the `content/post/` directory. The file should include the following frontmatter: |
| 22 | + |
| 23 | +- `title`: The title of the post (string). |
| 24 | +- `description`: A brief description of the post (string). |
| 25 | +- `authors`: An array of author names (string). |
| 26 | +- `date`: The date of the post in `YYYY-MM-DD` format (string). |
| 27 | +- `category`: The category of the post (string). |
| 28 | + |
| 29 | +Here's an example: |
| 30 | + |
| 31 | +```mdx |
| 32 | +--- |
| 33 | +title: Your Post Title |
| 34 | +description: A brief description of your post. |
| 35 | +authors: YourName |
| 36 | +date: 2025-02-07 |
| 37 | +category: example |
| 38 | +--- |
| 39 | +``` |
| 40 | + |
| 41 | +Your post content goes here. You can use Markdown and JSX. |
| 42 | + |
| 43 | +## Pull Requests |
| 44 | + |
| 45 | +Changes should be atomic; do not combine multiple, discrete changes within a single PR. |
| 46 | + |
| 47 | +We use [squash merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits) to create a single fresh commit based on PR title. The PR title should follow [Conventional Commit guidelines](https://www.conventionalcommits.org/en/v1.0.0/). Acceptable "types" are: |
| 48 | + |
| 49 | +Before a pull request is merged, the following requirements should be met: |
| 50 | + |
| 51 | +- The pull request has a descriptive title and follows the commit message guidelines. |
| 52 | +- An approval is valid if there have been no major changes since it was granted. |
| 53 | +- 24 hours after approval and no objections, the pull request can be merged. |
| 54 | +- All tests pass (Github actions). |
| 55 | + |
| 56 | +## [Developer's Certificate of Origin 1.1](https://developercertificate.org) |
| 57 | + |
| 58 | +```txt |
| 59 | +By contributing to this project, I certify that: |
| 60 | +
|
| 61 | +- (a) The contribution was created in whole or in part by me and I have the right to |
| 62 | + submit it under the open source license indicated in the file; or |
| 63 | +- (b) The contribution is based upon previous work that, to the best of my knowledge, |
| 64 | + is covered under an appropriate open source license and I have the right under that |
| 65 | + license to submit that work with modifications, whether created in whole or in part |
| 66 | + by me, under the same open source license (unless I am permitted to submit under a |
| 67 | + different license), as indicated in the file; or |
| 68 | +- (c) The contribution was provided directly to me by some other person who certified |
| 69 | + (a), (b) or (c) and I have not modified it. |
| 70 | +- (d) I understand and agree that this project and the contribution are public and that |
| 71 | + a record of the contribution (including all personal information I submit with it, |
| 72 | + including my sign-off) is maintained indefinitely and may be redistributed consistent |
| 73 | + with this project or the open source license(s) involved. |
| 74 | +``` |
0 commit comments