小编Wes*_*lle的帖子

内联图像未从 GatsbyJS 中的 Markdown 文件正文加载

我正在尝试使用 gatsby-remark-images 在我的降价文件中使用内联图像。不幸的是,图像不会加载到我的本地主机上。我不知道这是否只是错误的语法,或者我遗漏了一些严重的东西。

这是配置:(我怀疑我在某处做错了什么,它在这里。)

module.exports = {
  siteMetadata: {
    title: ``,
    description: `A blog where code is written about`,
    author: `@wesley`,
  },

  plugins: [
    `gatsby-plugin-sass`,
    `gatsby-plugin-styled-components`,
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-catch-links`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/images`,
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/pages`,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          {
            resolve: `gatsby-remark-images`,
            options: {
              // It's important to specify the maxWidth (in pixels) of
              // the content container as this plugin uses …
Run Code Online (Sandbox Code Playgroud)

javascript markdown reactjs graphql gatsby

3
推荐指数
1
解决办法
1218
查看次数

标签 统计

gatsby ×1

graphql ×1

javascript ×1

markdown ×1

reactjs ×1