Skip to content

Commit 90015e3

Browse files
Luis Alvarez DTimer
andauthored
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>
1 parent e35005c commit 90015e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/basic-features/static-file-serving.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ function MyImage() {
1616
export default MyImage
1717
```
1818

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`)!
2020

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.
24+
>
25+
> Read more: <http://err.sh/next.js/conflicting-public-file-page>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy