简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM