Search code examples
githubjekyllbackticks

single backtick code not shown in jekyll github blog


i'm trying to display a code block with a grey background on sudo visudo and /etc/visudo.
i think it's working on github page, but when take a look in jekyll it is not working as the way i expected.

this is my code in .md file:

type `sudo visudo` to enter `/etc/visudo`.

```
User privilege specification  
root    ALL=(ALL:ALL) ALL  
hadoop ALL=(ALL:ALL) ALL  
sparkuser ALL=(ALL:ALL) ALL  
```

shown in github

shown on jekyll blog

and my _config.yml file:

markdown: kramdown  
kramdown:  
  input: GFM  
  syntax_highlighter: rouge  
  syntax_highlighter_opts:  
        css_class: 'highlight'  

what can i do to make a grey background on sudo visudo and /etc/visudo? thanks


Solution

  • What looks like is happening here is that your specific Jekyll theme doesn't put a background behind sudo visudo or /etc/visudo. Since the font is changing to a monospaced font in your Jekyll example picture, it is properly parsing the markdown, it's just that the theme isn't set to display a background behind it.