Project Description
Syntax Highlighter module for Orchard
Uses excellent javascript based Syntax Highlighter written by Alex Gorbatchev http://alexgorbatchev.com/SyntaxHighlighter/

Orchard http://orchardproject.net

Latest Sources:

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

Installation

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.

Usage

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");
</pre>

JavaScript sample

<pre class="brush: js;">
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</pre>

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

http://www.heikura.info/blog/orchard-module-development-setup

Last edited Wed at 10:01 AM by pekkah, version 14