Unverified Commit 59c742ee authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Add instructions on how to add nextjs.org/docs/messages urls (#26865)

Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 27706194
......@@ -8,6 +8,7 @@ Choose the right checklist for the change that you're making:
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
......@@ -16,6 +17,7 @@ Choose the right checklist for the change that you're making:
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
......
......@@ -14,6 +14,20 @@ Read about our [Commitment to Open Source](https://vercel.com/oss).
To contribute to [our examples](examples), take a look at the [“Adding examples” section](#adding-examples).
## Adding warning/error descriptions
In Next.js we have a system to add helpful links to warnings and errors.
This allows for the logged message to be short while giving a broader description and instructions on how to solve the warning/error.
In general all warnings and errors added should have these links attached.
Below are the steps to add a new link:
- Create a new markdown file under the `errors` directory based on `errors/template.md`: `cp errors/template.md errors/<error-file-name>.md`
- Add the newly added file to `errors/manifest.json`
- Add the following url to your warning/error: `https://nextjs.org/docs/messages/<file-path-without-dotmd>`. For example to link to `errors/api-routes-static-export.md` you use the url: `https://nextjs.org/docs/messages/api-routes-static-export`
## To run tests
Make sure you have `chromedriver` installed for your Chrome version. You can install it with
......@@ -158,4 +172,4 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut
## Publishing
Repo maintainers can use `yarn publish-canary` to publish a new version of all packages to npm.
Repository maintainers can use `yarn publish-canary` to publish a new version of all packages to npm.
# <!-- INSERT TITLE HERE -->
#### Why This Error Occurred
<!-- Explain why the error occured. Ensure the description makes it clear why the warning/error exists -->
#### Possible Ways to Fix It
<!-- Explain how to fix the warning/error, potentially by providing alternative approaches. Ensure this section is actionable by users -->
### Useful Links
<!-- Add links to relevant documentation -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment