-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a09000
commit 099898e
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Contributing | ||
|
||
Contributing to the docs is pretty easy. | ||
|
||
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: | ||
|
||
1. Find the page you're looking for. Example: https://mithril.js.org/animation.html | ||
2. Go to the same-named path in the `docs/` directory here. Example: https://github.com/MithrilJS/docs/blob/main/docs/animation.md | ||
3. Click the pencil icon to edit. | ||
4. Make the changes you want. | ||
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. | ||
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. | ||
|
||
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. | ||
|
||
## Scripts, or how to view the docs as you're editing them locally | ||
|
||
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. | ||
|
||
> 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. | ||
- `npm run lint:docs`: Lint just the docs. | ||
- `npm run lint`: Lint the docs and scripts. | ||
- `npm run build`: Build the docs. | ||
- `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/`. |