Github pages Modelica language syntax highlighting not working - jekyll

I tried a simple test in Github pages to be able to include Modelica language but the highlight does not work on github pages whereas it is working in github markdown rendering
Working here :
https://github.com/gautierbureau/gautierbureau.github.io/blob/master/index.md
Not working here :
https://gautierbureau.github.io/
I read some stuff abut backtick and tilde and used both but did not change anything... Then I also read some stuff about rouge syntax highlighter but it dit not work either (maybe my configuration was not good but I couln't find any simple solution...)

Related

Rouge Syntax Highlighting in GitHub Pages

I have been using Rouge and Kramdown to properly format syntax since I've been using Jekyll. I haven't looked in awhile, but recently noticed that the syntax highlighting doesn't appear to be working properly. I noticed that the change broke when GitHub pages started supporting Jekyll 3.9 (was 3.8.5 for the longest time) and the latest version of Rouge. Anyone else find a solution to this? It appears to be broken on many sites that use GitHub Pages and I cannot find a site where it's working.
Here is a URL that does not work: https://www.jasongaylord.com/blog/embed-javascript-in-custom-aspnet-server-controls
The URL in question that is supposed to show syntax highlighting not working, does in fact appear to have syntax highlighting working correctly.
Section of your site with syntax highlighting, highlighted by Chrome dev tools. Shows syntax highlighting CSS class provided by Rouge and data-lang attribute

Jekyll render same template in multiple languages

I have a template page with a number of labels. I would like to produce several html's from this template, say one per each language. Is this possible using Jekyll?
I have seen a multi-language-plugin, however it seems not working anymore.
Can Jekyll produce more pages from a single template?
If the answer is negative, do you know any other static site generator that can handle multi language?
A good way to implement multi-language sites in Jekyll is via jekyll-multiple-languages-plugin that also works with Jekyll v3.x
You can find an useful tutorials on how to install and configure the plugin here and here.
As an alternative, you can try to implement multi-language without any plugin, using this tutorial.

custom rouge lexar in github pages?

This might be a yes/no question, because it's still not clear to me what level of Jekyll customization is allowed in Github pages. I've been tinkering a lot with code blocks and syntax highlighting and it seems since sometime in the last 9 months, the options for syntax highlighting in Github pages has been limited to rouge, which I think works pretty well. The documentation on this is brief and I've been getting more details scattered around the web. I was going to go to the trouble of making a custom lexar, following the wiki instructions, but if there's nowhere to slot this into my Github page, maybe it isn't worth the trouble. (Actually making the lexar probably wouldn't take very long... I'd just be simplifying another one).
My question is this: would my hypothetical custom lexar have to be implemented through a Jekyll plugin and thus not allowed on Github pages? Or is there another way? Thanks.

Regarding conversion of Ghost blog to static pages and Prismjs

I have a Ghost blog. I would like to host it using Jekyll etc. using static pages that I would be generating.
I use Prismjs for syntax highlighting.
How is Jekyll going to handle this situation considering that static pages will have no Javascript support?
Do I need to make changes from my side?
Thanks.
Static pages will have no JavaScript support.
Wrong. Static page doesn't have database support, but it supports JavaScript (quite obvious actually).
Jekyll has built-in syntax highlight engines with Pygments or Rouge. Pygments needs Python, while Rouge is pure Ruby based. Please have a look at documentation here.
If you don't want to use built-in engine, yes, Prism is also possible. You can totally follow the usual usage like this, or use this Jekyll Prism Plugin. For example, this article in my blog uses both built-in Pygments highlighting (for Ruby and Python code) and JavaScript Google prettify highlighting (for C# code).
If you don't know how to use JavaScript in your Jekyll project, please post your repository link, so we can help out.

Octopress and jsMath together

I'm moving my blog to Octopress. I have a small niggle with the interaction between Octopress and MathJax, in that the markdown parsing in Octopress happens first, and it tramples all over the MathJax code.
For an example of what I mean, you can see my raw .md file here and the result after processing here.
I need some way of telling Octopress to ignore a chunk of text, so that it is passed through processing unchanged, and the MathJax script can correctly render it as mathematics.
I've tried surrounding the math with <pre> and <span> tags, and surrounding it with backticks, none of which have helped.
It turns out that if you search hard enough on Google, this is a known and solved problem. One approach is detailed on chico's blog, and involves switching the markdown parser to kramdown.
A simpler solution, which only allows for display math (no inline math) can be found on Gregory Lussier's blog and involves using a , which stops markdown processing.
The solution I've decided to go with is detailed on Luikore's blog and involves a custom markdown processor, which is a fork of rdiscount. It also solves several other niggling problems at the same time.