From 5108e0f28994c13c92ff6d6f5f835f0d05164bb9 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Mon, 27 Jan 2020 12:09:05 -0500 Subject: [PATCH 1/3] Updated note about public and pages overlap --- docs/basic-features/static-file-serving.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basic-features/static-file-serving.md b/docs/basic-features/static-file-serving.md index 6f58b8b034a2b20..35ee8bf5caa7ab5 100644 --- a/docs/basic-features/static-file-serving.md +++ b/docs/basic-features/static-file-serving.md @@ -18,4 +18,4 @@ 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. -> 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`. +> Make sure you don’t have static assets in conflict with files in the `pages` directory, as this will result in an error. From 9e3bd3746df5939a379ac8be7b94dc627ec93d2c Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 30 Jan 2020 00:54:46 -0500 Subject: [PATCH 2/3] Update static-file-serving.md --- docs/basic-features/static-file-serving.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/basic-features/static-file-serving.md b/docs/basic-features/static-file-serving.md index 35ee8bf5caa7ab5..7d80662ea94f5e3 100644 --- a/docs/basic-features/static-file-serving.md +++ b/docs/basic-features/static-file-serving.md @@ -18,4 +18,4 @@ 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. -> Make sure you don’t have static assets in conflict with files in the `pages` directory, as this will result in an error. +> 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. From 19f6364dc659fe0b733103c12ce2d0f3284e9b0e Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 30 Jan 2020 00:59:36 -0500 Subject: [PATCH 3/3] Update static-file-serving.md --- 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 7d80662ea94f5e3..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`)! -> 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. +> **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: