design

主题图标

使您的图标与主题匹配

要在 Next.js 中实现此功能,您可以使用根布局中的 metadata 对象。

js
export const metadata = {
	title: "fooo",
	description: "bar",
	icons: {
		icon: [
			{
				url: "/icon-light.svg",
				media: "(prefers-color-scheme: light)",
			},
			{
				url: "/icon-dark.svg",
				media: "(prefers-color-scheme: dark)",
			},
		],
	},
};

相关细节

Rene WangRene Wang·

继续探索

描述链接操作

Safari 比 Chrome 更出色的一件事

可访问性
We Regulary Update this List

You can get notified by subscribing to our biweekly newsletter. No ads, no spam, just new content.

Profile banner
Detail

Detail

@detaildotdesign

about.x.bio

10+about.x.exclusiveContent
160+about.x.followers