Showing C# tags in Jekyll Github pages using Highlight.js

Jekyll has highlight tag and css (_sass/_syntax-highlighting.scss) onboard.

{% highlight csharp %}
/// <summary>
/// Main class of the project
/// </summary>
class Program
{
    /// <summary>
    /// Main entry point of the program
    /// </summary>
    /// <param name="args">Command line args</param>
    static void Main(string[] args)
    {
        //Do stuff
    }
}
{% endhighlight %}

This works out of the box with no need to client side overload.
All Pygment lexers available are here.

Leave a Comment