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
Update note about public and pages overlap (vercel#10287)
* Updated note about public and pages overlap
* Update static-file-serving.md
* Update static-file-serving.md
Co-authored-by: Joe Haddad <timer150@gmail.com>
Copy file name to clipboardExpand all lines: docs/basic-features/static-file-serving.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ function MyImage() {
16
16
exportdefaultMyImage
17
17
```
18
18
19
-
> Don't name the `public` directory anything else. The name can't be changed and is the only directory that **Next.js** uses to serve static assets.
19
+
This folder is also useful for `robots.txt`, Google Site Verification, and any other static files (including `.html`)!
20
20
21
-
> If you ever add a static asset that conflicts with the name of a page in the `pages` directory, the public file will be ignored in favor of the file in `pages`.
21
+
> **Note**: Don't name the `public` directory anything else. The name cannot be changed and is the only directory used to serve static assets.
22
+
23
+
> **Note**: Be sure to not have a static file with the same name as a file in the `pages/` directory, as this will result in an error.
0 commit comments