Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line number is not displayed. #131

Open
mkt-engr opened this issue Jul 24, 2020 · 0 comments
Open

Line number is not displayed. #131

mkt-engr opened this issue Jul 24, 2020 · 0 comments

Comments

@mkt-engr
Copy link

Hi !
I'm in trouble. Line number is not displayed.

In gatsby-config.js, I write the following code.

plugins: [
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          `gatsby-remark-images`,
          {
            resolve: `gatsby-remark-prismjs`,
            options: {
              showLineNumbers: true,
            },
          },
        ],
      },
    },

And in gatsby-blowser.js

require('prismjs/plugins/line-numbers/prism-line-numbers.css')

And in index.md

for(let i=0;i++,i<10){
  if(i%2===1){
  console.log(i);
  }
}

If I write {numberLines: true} in markdown , line number is displayed. However I don't want to write {numberLines: true} over again and again .

Please tell me how to set up showing line number globally .

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant