centrarium icon indicating copy to clipboard operation
centrarium copied to clipboard

Seeking help: using standard github pages syntax highlighting

Open oliviervaillancourt opened this issue 8 years ago • 1 comments

Hi,

First off, great theme and I'm trying to use it for my blog hosted on github pages (https://oliviervaillancourt.com). So far, pretty good success. My first blog post has javascript fenced code blocks and it works great as far as syntax highlighting goes.

However, my second blog post (currently in the works) as c# fenced block. I would prefer to be able to apply the standard Rouge syntax highlighting.

I've tried the following so far without success. Note that I am running these tests locally and not as a github pages deployment

  • comment out the #highlightjs_theme: "monokai-sublime" from _config.yml
  • add highlighter: rouge in _config.yml
  • remove the <link> tag that is is pulling down the monokay-sublime css

I'm always getting no highlighting at all

Any help would be greatly appreciated

Thanks, Olivier

oliviervaillancourt avatar Dec 30 '17 01:12 oliviervaillancourt

I did the same thing but couldn't get it working. i ended up using highlightjs and added the below to _includes/head.html which works

  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/styles/default.min.css">
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/highlight.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>

snoopysecurity avatar Oct 01 '22 20:10 snoopysecurity