即使在gatsby配置文件中的gatsby hello world starter项目中添加了favicon之后,它也不起作用。 我尝试了Google搜索,并在stackoverflow中搜索了类似的问题How do i add favicon gatsby-config.js?。但这无济于事,或者我可能在某个地方错了。
请纠正我!
GATSBY CONFIG.JS
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
module.exports = {
/* Your site config here */
siteMetadata: {
title: "xxxxxxx",author: "Subin",},plugins: [
"gatsby-plugin-react-helmet",{
resolve: "gatsby-source-contentful",options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,accessToken: process.env.CONTENTFUL_accESS_TOKEN,"gatsby-plugin-sass",// this plugin will pull all the files in our project system
{
resolve: "gatsby-source-filesystem",options: {
name: "src",path: `${__dirname}/src/`,icon: `../src/images/favicon-32x32.png`,"gatsby-plugin-sharp",// REMARK plugin needed to extract the markdown files and parses
{
resolve: "gatsby-transformer-remark",options: {
plugins: [
"gatsby-remark-relative-images",{
resolve: "gatsby-remark-images",options: {
maxWidth: 750,linkImagesOriginal: false,],}
项目目录图像