Crayon can be used in any PHP environment so it’s possible to extend to another CMS other than Wordpress. Here’s a sample of how you’d do that. This script works from the Crayon plugin directory, so you’d need to update any paths. Also make sure you reference correct urls and paths for the defined settings.

require_once ('global.php');

// These will depend on your framework
CrayonGlobalSettings::site_path(dirname(__FILE__)); // For WP, this is ABSPATH

// Should be in the header

$crayon = new CrayonHighlighter();
$crayon->code('some code');
$crayon->title('the title');

// Settings
$settings = array(
	// Just regular settings
	CrayonSettings::NUMS => FALSE,
	CrayonSettings::TOOLBAR => TRUE,
	// Enqueue supported only for WP
	CrayonSettings::ENQUEUE_THEMES => FALSE,
	CrayonSettings::ENQUEUE_FONTS => FALSE);
$settings = CrayonSettings::smart_settings($settings);

// Print the Crayon
$crayon_formatted = $crayon->output(TRUE, FALSE);
echo $crayon_formatted;

// Utility Functions

function crayon_print_style($id, $url, $version) {
	echo '',"\n";

function crayon_print_script($id, $url, $version) {
	echo '',"\n";

function crayon_resources() {
	$plugin_url = 'http://localhost/crayon/wp-content/plugins/crayon-syntax-highlighter/';
	// jQuery only needed once! Don't have two jQuerys, so remove if you've already got one in your header :)
	crayon_print_script('jquery', '', $CRAYON_VERSION);
	crayon_print_style('crayon-style', $plugin_url.CRAYON_STYLE, $CRAYON_VERSION);
	crayon_print_script('crayon_util_js', $plugin_url.CRAYON_JS_UTIL, $CRAYON_VERSION);
	crayon_print_script('crayon-js', $plugin_url.CRAYON_JS, $CRAYON_VERSION);
	crayon_print_script('crayon-jquery-popup', $plugin_url.CRAYON_JQUERY_POPUP, $CRAYON_VERSION);