Skip to content

Commit

Permalink
Merge pull request #657 from zaaakher/patch-1
Browse files Browse the repository at this point in the history
Add docs section in CONTRIBUTING.md
  • Loading branch information
davidjerleke authored Dec 26, 2023
2 parents 77d6ec4 + b4986db commit 5e09aa8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Thank you for considering contributing to Embla Carousel, contributions are welc
All bug reports require a reduced test case. Providing a test case is the best way to get any issue addressed. It helps us all to understand the problem. Without this, your issue **may be closed**. Please follow this checklist:

- **`Test case:`** Create one by forking one of the CodeSandboxes on the [examples page](https://www.embla-carousel.com/examples/). If applicable, choose the most relevant one.
- **`Test case exceptions:`** In rare cases a CodeSandbox might not be possible to provide. If this is the case, make sure to provide an alternative source like a GitHub repository or similar.
- **`Demonstrate:`** Make sure the test case clearly demonstrates the issue.
- **`Do not:`** Provide a link to a production site. That's not a test case.
- **`Create a Pull Request:`** If you want to solve the bug yourself, please make sure the branch name follows this pattern `bug/branchname-goes-here`.
Expand All @@ -24,6 +25,29 @@ For any new features it's important to follow this checklist:
- **`Code style:`** Follow the current code style as described [here](#code-style).
- **`Create a Pull Request:`** Please make sure the branch name follows this pattern `feature/branchname-goes-here`.

### Documentation

The documentation website is generated using [gatsby](https://github.com/gatsbyjs/gatsby). All the content of the docs lives inside [`/packages/embla-carousel-docs`](https://github.com/davidjerleke/embla-carousel/tree/master/packages/embla-carousel-docs).

> [!IMPORTANT]
> Make sure your node version is equal to the one in [.nvmrc](https://github.com/davidjerleke/embla-carousel/blob/master/.nvmrc). You can use [`nvm`](https://github.com/nvm-sh/nvm) to easily install different node versions and switch between them with ease.
To develop the docs locally follow these steps:

- Run `yarn install`in the root directory to install dependencies.
- Run `yarn build` to build the docs (and all other packages).
- Run `yarn start` to start the dev environment of the docs at `localhost:8000`.
- Make sure the `.mdx` file you're working on has a header formatted like this:

```
---
title: [Page title here]
description: [Page description here].
order: [Page order here (a number)]
date: [Page last updated date (e.g. 2023-12-20)]
---
```

### Code style

All code contributions should follow the current `code style`. Please take your time to understand the current setup and don't introduce new styles that clearly deviates from the project `code style`.

0 comments on commit 5e09aa8

Please sign in to comment.