You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,20 @@ Read about our [Commitment to Open Source](https://vercel.com/oss).
14
14
15
15
To contribute to [our examples](examples), take a look at the [“Adding examples” section](#adding-examples).
16
16
17
+
## Adding warning/error descriptions
18
+
19
+
In Next.js we have a system to add helpful links to warnings and errors.
20
+
21
+
This allows for the logged message to be short while giving a broader description and instructions on how to solve the warning/error.
22
+
23
+
In general all warnings and errors added should have these links attached.
24
+
25
+
Below are the steps to add a new link:
26
+
27
+
- Create a new markdown file under the `errors` directory based on `errors/template.md`: `cp errors/template.md errors/<error-file-name>.md`
28
+
- Add the newly added file to `errors/manifest.json`
29
+
- 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`
30
+
17
31
## To run tests
18
32
19
33
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
158
172
159
173
## Publishing
160
174
161
-
Repo maintainers can use `yarn publish-canary` to publish a new version of all packages to npm.
175
+
Repository maintainers can use `yarn publish-canary` to publish a new version of all packages to npm.
0 commit comments