mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Add alt attributes to examples in readme.md (#4053)
This commit is contained in:
parent
14a16924c5
commit
7cf9199a5f
|
@ -178,7 +178,7 @@ To support importing `.css` `.scss` or `.less` files you can use these modules,
|
||||||
Create a folder called `static` in your project root directory. From your code you can then reference those files with `/static/` URLs:
|
Create a folder called `static` in your project root directory. From your code you can then reference those files with `/static/` URLs:
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
export default () => <img src="/static/my-image.png" />
|
export default () => <img src="/static/my-image.png" alt="my image" />
|
||||||
```
|
```
|
||||||
|
|
||||||
### Populating `<head>`
|
### Populating `<head>`
|
||||||
|
@ -405,7 +405,7 @@ export default () =>
|
||||||
<div>
|
<div>
|
||||||
Click{' '}
|
Click{' '}
|
||||||
<Link href="/about">
|
<Link href="/about">
|
||||||
<img src="/static/image.png" />
|
<img src="/static/image.png" alt="image" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
@ -1191,7 +1191,7 @@ console.log(serverRuntimeConfig.mySecret) // Will only be available on the serve
|
||||||
console.log(publicRuntimeConfig.staticFolder) // Will be available on both server and client
|
console.log(publicRuntimeConfig.staticFolder) // Will be available on both server and client
|
||||||
|
|
||||||
export default () => <div>
|
export default () => <div>
|
||||||
<img src={`${publicRuntimeConfig.staticFolder}/logo.png`} />
|
<img src={`${publicRuntimeConfig.staticFolder}/logo.png`} alt="logo" />
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue