Skip to content

Commit 099898e

Browse files
committed
Add a basic contributing guide
1 parent 1a09000 commit 099898e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CONTRIBUTING.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributing
2+
3+
Contributing to the docs is pretty easy.
4+
5+
If it's just a single typo fix or similar in just one file, you can just do it straight from the web interface or the GitHub app:
6+
7+
1. Find the page you're looking for. Example: https://mithril.js.org/animation.html
8+
2. Go to the same-named path in the `docs/` directory here. Example: https://github.com/MithrilJS/docs/blob/main/docs/animation.md
9+
3. Click the pencil icon to edit.
10+
4. Make the changes you want.
11+
5. Click "Commit changes" and fill out that mini form. Description is optional, but helpful if you need more explanation than the title can afford.
12+
6. Click "Propose changes" and go through the form to create a pull request. Make sure the checkbox to allow maintainer edits is checked, so we can more easily merge it if it can't be merged cleanly.
13+
14+
If it's something bigger, you can roughly follow [these instructions here](https://mithril.js.org/contributing.html#how-do-i-send-a-pull-request?). For the docs, there really isn't anything to test, so you can skip that step for those. Elsewhere, testing is all manual.
15+
16+
## Scripts, or how to view the docs as you're editing them locally
17+
18+
There's a few commands you can use to help hash out larger changes. The last command is the one you'll likely be using the most.
19+
20+
> Note that you'll need to run `npm install` to run any of these (and obviously, you'll need to have Node installed). Also, you'll need Node v20.12.2 or later.
21+
22+
- `npm run lint:docs`: Lint just the docs.
23+
- `npm run lint`: Lint the docs and scripts.
24+
- `npm run build`: Build the docs.
25+
- `npm run watch`: Build the docs on change, lint the docs on change, and start a local server to view the generated docs at `http://localhost:8080/`.

0 commit comments

Comments
 (0)