Вопрос

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top