本文共 1210 字,大约阅读时间需要 4 分钟。
盖茨比乔布斯
I created a site using and I wanted to change the favicon.
我使用创建了一个网站,我想更改网站图标。
I quickly looked at how to change it, and the process was very simple.
我Swift研究了如何更改它,过程非常简单。
The favicon by default is the image static/favicon.ico
. Just change that, and you’re set.
默认情况下,图标图标为static/favicon.ico
图像。 只需更改它,就可以设置。
If you’re using the , the favicon by default is the image src/images/gatsby-icon.png
.
如果您使用的是 ,则默认情况下,图标图标为src/images/gatsby-icon.png
。
You don’t have to use that path, or the same format - the image can also be an SVG image, for example: open the gatsby-config.js
file and change the plugins.gatsby-plugin-sharp.options.icon
property from src/images/gatsby-icon.png
to the one you want.
您不必使用该路径或相同格式-该图像也可以是SVG图像,例如:打开gatsby-config.js
文件并更改plugins.gatsby-plugin-sharp.options.icon
属性从src/images/gatsby-icon.png
到您想要的那个。
For example I put my new favicon image in src/images/logo-small.svg
and I changed that configuration property to point to it.
例如,我将新src/images/logo-small.svg
图像放在src/images/logo-small.svg
并更改了该配置属性以指向它。
I ran gatsby develop
and I could immediately see Gatsby updated all the favicon images, in different sizes:
我运行了gatsby develop
,我立即可以看到Gatsby更新了所有不同尺寸的favicon图像:
翻译自:
盖茨比乔布斯
转载地址:http://zamgb.baihongyu.com/