<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.7.3">Jekyll</generator><link href="https://mitmaro.ca/feed.xml" rel="self" type="application/atom+xml" /><link href="https://mitmaro.ca/" rel="alternate" type="text/html" /><updated>2018-08-16T21:35:35-02:30</updated><id>https://mitmaro.ca/</id><title type="html">Tim Oram’s Developer Blog</title><subtitle>The blog and personal website of Tim Oram.</subtitle><author><name>Tim Oram</name><email>me@mitmaro.ca</email></author><entry><title type="html">Welcome to Jekyll!</title><link href="https://mitmaro.ca/jekyll/update/welcome-to-jekyll/" rel="alternate" type="text/html" title="Welcome to Jekyll!" /><published>2018-08-12T22:35:39-02:30</published><updated>2018-08-12T22:35:39-02:30</updated><id>https://mitmaro.ca/jekyll/update/welcome-to-jekyll</id><content type="html" xml:base="https://mitmaro.ca/jekyll/update/welcome-to-jekyll/">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;To add new posts, simply add a file in the &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory that follows the convention &lt;code class=&quot;highlighter-rouge&quot;&gt;YYYY-MM-DD-name-of-post.ext&lt;/code&gt; and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;</content><author><name>Tim Oram</name><email>me@mitmaro.ca</email></author><summary type="html">You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.</summary></entry><entry><title type="html">Jekyll plugin for Prism</title><link href="https://mitmaro.ca/development/jekyll-prisim-plugin/" rel="alternate" type="text/html" title="Jekyll plugin for Prism" /><published>2014-10-04T08:30:00-02:30</published><updated>2014-10-04T08:30:00-02:30</updated><id>https://mitmaro.ca/development/jekyll-prisim-plugin</id><content type="html" xml:base="https://mitmaro.ca/development/jekyll-prisim-plugin/">&lt;p class=&quot;notice--warning&quot;&gt;This post was migrated from an older version of the blog.&lt;/p&gt;

&lt;p&gt;As a software developer, I require excellent support for syntax highlighting in a blogging platform. This blog uses
&lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; as a platform and it has two options for syntax highlighting, &lt;a href=&quot;http://pygments.org/&quot;&gt;Pygments&lt;/a&gt; and &lt;a href=&quot;https://github.com/jneen/rouge&quot;&gt;Rouge&lt;/a&gt;. Pygments is written in
Python and supports over 100 languages but it didn’t have a few of the features I was looking for in syntax
highlighting. The Ruby-based Rouge seems to have many features but was very limited by Jekyll’s implementation. Given
that the defaults of Jekyll didn’t work for me I decided to go with what I was familiar with: a Javascript based syntax
highlighter. Specifically, I decided to use &lt;a href=&quot;http://prismjs.com/&quot;&gt;Prism&lt;/a&gt;, which has hooks for plugins, uses standard markup and support for
all the languages I would need. Since I try my best to not mix HTML into the Markdown these posts are written in, I
decided to write a small plugin to add support for Prism to Jekyll.&lt;/p&gt;

&lt;p&gt;There are a few existing plugins that already try to add Prism support to Jekyll, most notably a
&lt;a href=&quot;https://github.com/gmurphey/jekyll-prism-plugin&quot;&gt;plugin&lt;/a&gt; by &lt;a href=&quot;https://github.com/gmurphey&quot;&gt;Garrett Murphey&lt;/a&gt;. At the time of this post, Garrett’s plugin hasn’t been updated for
well over two years (aside from README updates) and also didn’t support the plugins that can be downloaded with Prism.
I started trying to extend upon Garrett’s work to add the extra features but ended up writing the whole plugin from
scratch. His plugin wasn’t written as a Ruby gem and I didn’t particularly like the HTML he generated.  The plugin I
developed supports all the plugins from the Prism website, is available as a gem, includes tests and since it’s going to
be used on this blog will be kept up to date.&lt;/p&gt;

&lt;p&gt;As I am new to development in Ruby and it is only the second time I have written a Ruby gem, I am sure there are many
things I did poorly or just wrong. Most notably, I am fairly sure I didn’t do the dependencies correctly in my gemspec.
As I stated above the plugin is available on &lt;a href=&quot;https://rubygems.org/gems/mm-jekyll-prism&quot;&gt;RubyGems&lt;/a&gt; if you want to try it out. There is documentation on the
&lt;a href=&quot;https://github.com/MitMaro/jekyll-prism-plugin&quot;&gt;GitHub project page&lt;/a&gt;, where you can also grab the code. Feel free to fix any issues and send me a pull request and I
will be glad to include it. Please leave any criticism about the plugin below in the comments section and I will do my
best to respond.&lt;/p&gt;</content><author><name>Tim Oram</name><email>me@mitmaro.ca</email></author><category term="Jekyll" /><category term="Ruby" /><category term="Prism.js" /><summary type="html">This post was migrated from an older version of the blog.</summary></entry></feed>