bencentra / centrarium

A simple yet classy theme for your Jekyll website or blog.
http://bencentra.com/centrarium/
MIT License
430 stars 654 forks source link

Seeking help: using standard github pages syntax highlighting #49

Open oliviervaillancourt opened 6 years ago

oliviervaillancourt commented 6 years ago

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

I'm always getting no highlighting at all

Any help would be greatly appreciated

Thanks, Olivier

snoopysecurity commented 2 years ago

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>