Unverified Commit eebad9c9 authored by Michael H's avatar Michael H Committed by GitHub

docs: Add media example for icon metadata (#56141)

Co-authored-by: 's avatarLee Robinson <me@leerob.io>
parent a0b661de
...@@ -598,7 +598,11 @@ export const metadata = { ...@@ -598,7 +598,11 @@ export const metadata = {
```jsx filename="layout.js | page.js" ```jsx filename="layout.js | page.js"
export const metadata = { export const metadata = {
icons: { icons: {
icon: [{ url: '/icon.png' }, new URL('/icon.png', 'https://example.com')], icon: [
{ url: '/icon.png' },
new URL('/icon.png', 'https://example.com'),
{ url: '/icon-dark.png', media: '(prefers-color-scheme: dark)' },
],
shortcut: ['/shortcut-icon.png'], shortcut: ['/shortcut-icon.png'],
apple: [ apple: [
{ url: '/apple-icon.png' }, { url: '/apple-icon.png' },
...@@ -617,12 +621,13 @@ export const metadata = { ...@@ -617,12 +621,13 @@ export const metadata = {
```html filename="<head> output" hideLineNumbers ```html filename="<head> output" hideLineNumbers
<link rel="shortcut icon" href="/shortcut-icon.png" /> <link rel="shortcut icon" href="/shortcut-icon.png" />
<link rel="icon" href="/icon.png" /> <link rel="icon" href="/icon.png" />
<link rel="icon" href="https://example.com/icon.png" />
<link rel="icon" href="/icon-dark.png" media="(prefers-color-scheme: dark)" />
<link rel="apple-touch-icon" href="/apple-icon.png" /> <link rel="apple-touch-icon" href="/apple-icon.png" />
<link <link
rel="apple-touch-icon-precomposed" rel="apple-touch-icon-precomposed"
href="/apple-touch-icon-precomposed.png" href="/apple-touch-icon-precomposed.png"
/> />
<link rel="icon" href="https://example.com/icon.png" />
<link <link
rel="apple-touch-icon" rel="apple-touch-icon"
href="/apple-icon-x3.png" href="/apple-icon-x3.png"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment