
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mental Pandiculation &#187; syntax highlighting</title>
	<atom:link href="http://mentalpandiculation.com/tag/syntax-highlighting/feed/" rel="self" type="application/rss+xml" />
	<link>http://mentalpandiculation.com</link>
	<description>One Man's Attempt To Find Elegant Code Through Big Words</description>
	<lastBuildDate>Mon, 27 Jun 2011 23:31:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Clojure Highlighting On WordPress</title>
		<link>http://mentalpandiculation.com/2010/05/clojure-highlighting-on-wordpress/</link>
		<comments>http://mentalpandiculation.com/2010/05/clojure-highlighting-on-wordpress/#comments</comments>
		<pubDate>Tue, 04 May 2010 16:24:20 +0000</pubDate>
		<dc:creator>Niklaus Wirth's Ghost</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[syntax highlighting]]></category>

		<guid isPermaLink="false">http://mentalpandiculation.com/?p=276</guid>
		<description><![CDATA[I&#8217;ve spent the morning getting highlighting working with WordPress and thought it might be worth the writeup to detail my steps since there was one significant gotcha when using published information. I&#8217;m using the SyntaxHighlighter Evolved plugin which you can search for on the Plugins page of your WordPress installation. Install that plugin first. Once [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the morning getting highlighting working with WordPress and thought it might be worth the writeup to detail my steps since there was one significant gotcha when using published information.</p>
<p>I&#8217;m using the <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/">SyntaxHighlighter Evolved</a> plugin which you can search for on the Plugins page of your WordPress installation.  Install that plugin first.</p>
<p>Once that&#8217;s done, you&#8217;ll need to <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/adding-a-new-brush-language/">follow the directions</a> for creating third party brushes for Syntax Highlighter.  Specifically, you&#8217;re going to need to create your own plugin, which is pretty simple to do.  Here&#8217;s what I did.</p>
<p>First, create a new folder in your plugins folder called clojurebrush.  In that folder, create a php file with the following code (feel free to change the details at the top):</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
/*
Plugin Name: SyntaxHighlighter Evolved: Clojure Brush
Description: Adds support for the Clojure language to the SyntaxHighlighter Evolved plugin.
Author: Brett Bim
Version: 1.1.0
Author URI: http://yourblog.com/
*/

// SyntaxHighlighter Evolved doesn't do anything until early in the &quot;init&quot; hook, so best to wait until after that
add_action( 'init', 'syntaxhighlighter_clojure_regscript' );

// Tell SyntaxHighlighter Evolved about this new language/brush
add_filter( 'syntaxhighlighter_brushes', 'syntaxhighlighter_clojure_addlang' );

// Register the brush file with WordPress
function syntaxhighlighter_clojure_regscript() {
    wp_register_script( 'syntaxhighlighter-brush-clojure', plugins_url( 'shBrushClojure.js', __FILE__ ), array('syntaxhighlighter-core'));
}

// Filter SyntaxHighlighter Evolved's language array
function syntaxhighlighter_clojure_addlang( $brushes ) {
    $brushes['clojure'] = 'clojure';
    $brushes['clj'] = 'clojure';

    return $brushes;
}

?&gt;</pre>
<p>Note that this is the same file structure as the directions from the previous link with the exception of removing the version number from the wp_register_script() function call.  That&#8217;s the thing that ate up a good chunk of my morning.</p>
<p>Once that&#8217;s done, you&#8217;ll need the <a href="http://travis-whitton.blogspot.com/2009/06/syntaxhighlighter-for-clojure.html">JavaScript brush file for Clojure</a> from Travis Whitton.  Dump that into the clojurebrush folder that you created above.  Go to your Plugins in WordPress and activate your new plugin.  Once that&#8217;s done, you should have syntax highlighting in WordPress enabled.</p>
]]></content:encoded>
			<wfw:commentRss>http://mentalpandiculation.com/2010/05/clojure-highlighting-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

