Skip to content

Commit

Permalink
Update note about public and pages overlap (vercel#10287)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and chibicode committed Feb 11, 2020
1 parent dec7dbd commit 716c983
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/basic-features/static-file-serving.md
Expand Up @@ -16,6 +16,10 @@ function MyImage() {
export default MyImage
```

> 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.
This folder is also useful for `robots.txt`, Google Site Verification, and any other static files (including `.html`)!

> 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`.
> **Note**: Don't name the `public` directory anything else. The name cannot be changed and is the only directory used to serve static assets.
> **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.
>
> Read more: <http://err.sh/next.js/conflicting-public-file-page>

0 comments on commit 716c983

Please sign in to comment.