Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 棱镜语法高照明在盖茨比减价中不起作用_Reactjs_Markdown_Gatsby_Bulma - Fatal编程技术网

Reactjs 棱镜语法高照明在盖茨比减价中不起作用

Reactjs 棱镜语法高照明在盖茨比减价中不起作用,reactjs,markdown,gatsby,bulma,Reactjs,Markdown,Gatsby,Bulma,我的语法高亮显示无法正常工作。带编号的行显示出来,背景工作正常,但语法没有突出显示 我也在使用Bulma,如果这有区别的话。我不知道样式是否相互覆盖 下面是我在盖茨比博客上看到的屏幕截图: 盖茨比浏览器: require('prismjs/themes/prism.css'); 要求('prismjs/plugins/line number/prism line number.css') 这是我的插件 plugins: [ `gatsby-plugin-sass`, `gats

我的语法高亮显示无法正常工作。带编号的行显示出来,背景工作正常,但语法没有突出显示

我也在使用Bulma,如果这有区别的话。我不知道样式是否相互覆盖

下面是我在盖茨比博客上看到的屏幕截图:

盖茨比浏览器:

require('prismjs/themes/prism.css');
要求('prismjs/plugins/line number/prism line number.css')

这是我的插件

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-prismjs`,
            options: {
              classPrefix: 'language-',

              inlineCodeMarker: null,

              aliases: { sh: 'bash', js: 'javascript' },

              showLineNumbers: true,

              noInlineHighlight: false,

              languageExtensions: [
                {
                  language: 'superscript',
                  extend: 'javascript',
                  definition: {
                    superscript_types: /(SuperType)/,
                  },
                  insertBefore: {
                    function: {
                      superscript_keywords: /(superif|superelse)/,
                    },
                  },
                },
              ],
              // Customize the prompt used in shell output
              // Values below are default
              prompt: {
                user: 'root',
                host: 'localhost',
                global: false,
              },
            },
          },
          {
            resolve: `gatsby-remark-images`,
            options: {
              maxWidth: 1200,
            },
          },
        ],
      },
    },

    // `gatsby-transformer-remark` -- this overrides previous config
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `src/images/mt.png`, // This path is relative to the root of the site.
      },
    },
    // this (optional) plugin enables Progressive Web App + Offline functionality
    // To learn more, visit: https://gatsby.dev/offline
    // `gatsby-plugin-offline`,
  ],

这是我的回购协议。有人知道我做错了什么吗

这在当地行吗?我也有同样的问题,我不断收到
警告无法找到prism语言“.”用于突出显示。应用通用代码块
,但所有“我的代码块”都标记为与单行代码块不同。虽然我的设置在本地工作,但不在Prod中。这在本地工作吗?我也有同样的问题,我不断收到
警告无法找到prism语言“.”用于突出显示。应用通用代码块
,但所有“我的代码块”都标记为与单行代码块不同。虽然我的设置在本地工作,但不在prod中