Project Description
Syntax Highlighter module for Orchard
Uses excellent javascript based Syntax Highlighter written by Alex Gorbatchev


Latest Sources:

I haven't maintained this project for years. No sure if it works with latest version of Orchard anymore.


It is recommended that you download and install the latest version trough Orchard gallery feed. You can find it under the name Syntax Highlighter for Orchard.


You can change the settings in Admin->Themes->Syntax Highlighter. Currently you can only change the theme used by syntax highlighter.

When writing a blog post or editing a page content you can use following syntax to get highlighted code snippets:

C# sample

<pre class="brush: csharp;">
Html.RegisterScript("sh/shCore.js", "1");
Html.RegisterStyle("sh/shCore.css", "1");
Html.RegisterStyle("sh/shThemeDefault.css", "2");
Html.RegisterScript("sh/shBrushCSharp.js", "2");
Html.RegisterScript("sh/shBrushJScript.js", "2");

JavaScript sample

<pre class="brush: js;">
<script type="text/javascript">

Supported brushes (as of 0.6 version)

  • applescript
  • actionscript3 as3
  • bash shell
  • coldfusion cf
  • cpp c
  • c# c-sharp csharp
  • css
  • delphi pascal
  • diff patch pas
  • erl erlang
  • groovy
  • java
  • jfx javafx
  • js jscript javascript
  • perl pl
  • php
  • text plain
  • ps powershell
  • py python
  • ruby rails ror rb
  • sass scss
  • scala
  • sql
  • vb vbnet
  • xml xhtml xslt html

Development setup

Last edited Oct 29, 2014 at 11:01 AM by pekkah, version 14