首页 > 解决方案 > 将快捷方式图标添加到 Gatsby 站点

问题描述

出现错误的 Windows cmd 窗口

我正在创建一个网站,gatsby.js我几乎完成了,我想添加快捷方式图标,但我不知道如何。

标签: reactjsgatsby

解决方案


在文件中安装gatsby-plugin-manifest、添加和配置。gatsby-config.js

按照文档中的说明添加icon路径:

const config = require('./src/config');

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-manifest',
      options: {
        icon: './src/images/logo.png',
      },
    }
  ],
};

推荐阅读