hugo-casper-two icon indicating copy to clipboard operation
hugo-casper-two copied to clipboard

Syntax highlighting

Open emoro opened this issue 5 years ago • 5 comments

Hi Love the theme! Thanks. I've been trying to change the syntax highlighting in the R code chunks, but no luck. I have modified the head.html file to include

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />

(note the "github" instead of the "default"), but it isn't working.

Any idea why?

emoro avatar Jan 30 '19 20:01 emoro

I have the same issue. @emoro did you find a solution?

ceessay avatar Feb 14 '19 20:02 ceessay

@ceessay @emoro If you are sill looking for the solution, i have something that worked for me. What I did was:

  • First: Stop hugo server
  • Second: On themes/casper-two/layout/partials/head.html, line 26 you can change the hightlight theme from this website: https://highlightjs.org
  • Third: Go to themes/casper-two/static/built/screen.css and search for .post-full-content pre code *{ and delete that style.

Everything should be ok, just restart hugo server and check again. This worked for me, but I'm not 100% sure about this trick.

rafatrace avatar Mar 05 '19 12:03 rafatrace

Thank @rafaelsnts. It's working!

ceessay avatar Mar 05 '19 15:03 ceessay

Thanks @rafaelsnts, it worked!!

emoro avatar Mar 05 '19 17:03 emoro

Nice work @rafaelsnts Thx a lot!

rguske avatar Mar 14 '19 20:03 rguske