盖茨比乔布斯_盖茨比,如何更改图标

盖茨比乔布斯

I created a site using Gatsby 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 gatsby-plugin-sharp plugin, the favicon by default is the image src/images/gatsby-icon.png.

如果您使用的是gatsby-plugin-sharp插件 ,则默认情况下,图标图标为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图像:

翻译自: https://flaviocopes.com/gatsby-change-favicon/

盖茨比乔布斯

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值