mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Clarify documentation regarding the static folder (#4340)
This commit is contained in:
parent
4df7e48f94
commit
a806c16713
|
@ -118,7 +118,7 @@ So far, we get:
|
||||||
- Automatic transpilation and bundling (with webpack and babel)
|
- Automatic transpilation and bundling (with webpack and babel)
|
||||||
- Hot code reloading
|
- Hot code reloading
|
||||||
- Server rendering and indexing of `./pages`
|
- Server rendering and indexing of `./pages`
|
||||||
- Static file serving. `./static/` is mapped to `/static/`
|
- Static file serving. `./static/` is mapped to `/static/` (given you [create a `./static/` directory](#static-file-serving-eg-images) inside your project)
|
||||||
|
|
||||||
To see how simple this is, check out the [sample app - nextgram](https://github.com/zeit/nextgram)
|
To see how simple this is, check out the [sample app - nextgram](https://github.com/zeit/nextgram)
|
||||||
|
|
||||||
|
@ -208,6 +208,8 @@ Create a folder called `static` in your project root directory. From your code y
|
||||||
export default () => <img src="/static/my-image.png" alt="my image" />
|
export default () => <img src="/static/my-image.png" alt="my image" />
|
||||||
```
|
```
|
||||||
|
|
||||||
|
_Note: Don't name the `static` directory anything else. The name is required and is the only directory that Next.js uses for serving static assets._
|
||||||
|
|
||||||
### Populating `<head>`
|
### Populating `<head>`
|
||||||
|
|
||||||
<p><details>
|
<p><details>
|
||||||
|
|
Loading…
Reference in a new issue