I am trying to make syntax highlighting on my jekyll site work with the syntax for syntax highlighting that is also supported by github. Currently, I use this syntax to highlight my code:
{% highlight css %}
/* code */
{% endhighlight %}
Which does work fine on my site, but is not working on github. Instead, I need it to work with this supported syntax:
´´´ css
/* code */
´´´
It is a requirement that the syntax is also being highlighted on github. So I found this blogpost and followed it along. But it is not working. I don't get any errors, this part is just not interpreted by kramdown and is instead just turned into a <p>
.
I tried installing an older version of jekyll 3.0 which also did not make any difference. I googled the problem and found many people having the same issues, but they got turned down rather fiercely by the people on github which is the reason why I am asking the question here instead of opening an issue on github. They say that this is a known bug resolved in 3.1, but I have 3.1.2 and it is not resolved for me.
I have also installed the rouge and kramdown gems (1.10.1 and 1.10). I believe, that jekyll just straight up ignores these settings in my _config.yml
:
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter: rouge
If anyone could maybe help on this, that would be great.
Gemfile
file with the following contentgem 'github-pages'
and runbundle install
. Now you should have the same gems as on Github Pages and see if it works. – Alex Palcuiebundle exec jekyll serve
just to be sure jekyll runs with the correct gems? Or can you isolate those gems in a fresh environment usingrvm
orrbenv
? – Alex Palcuiebundle exec jekyll serve
tells meCould not locate Gemfile or .bundle/ directory
. Im just a Frontend Designer and I know just enough to get my tools working with the commandline, so I have unfortunately no idea what you mean by > can you isolate those gems in a fresh environment using rvm or rbenv? – Nachtfunke