From 716c9830ca8413fa259bf93d33500915568f7a52 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Thu, 30 Jan 2020 01:13:55 -0500 Subject: [PATCH] Update note about public and pages overlap (#10287) * Updated note about public and pages overlap * Update static-file-serving.md * Update static-file-serving.md Co-authored-by: Joe Haddad --- docs/basic-features/static-file-serving.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/basic-features/static-file-serving.md b/docs/basic-features/static-file-serving.md index 6f58b8b034a2b20..ffc0525641e82cf 100644 --- a/docs/basic-features/static-file-serving.md +++ b/docs/basic-features/static-file-serving.md @@ -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: