whiteplain icon indicating copy to clipboard operation
whiteplain copied to clipboard

Change the font of code

Open yo80106 opened this issue 6 years ago • 2 comments

Is there any way to change the font style of code? I am recently using this theme in R blogdown. I am looking for the way that could make the font of my R codes look better.

yo80106 avatar Jul 17 '18 14:07 yo80106

Thank you for using this theme!

If you create a custom.css file, that setting will be overwritten. For example, please write as follows.

{your_hugo_site_root}/static/css/custom.css

pre, code {
  font-family: Meiriyo;
  font-size: 9pt;
}

To change the style of syntax highlighting, please create Chroma's Syntax Highlighter CSS as below. https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css

$ hugo gen chromastyles --style=manni > {your_hugo_site_root}/static/css/syntax.css

Unfortunately, Pygments (Chroma) does not seem to support R.

taikii avatar Jul 18 '18 04:07 taikii

Thank you for your suggestions. I'll give a try.

yo80106 avatar Jul 18 '18 12:07 yo80106