Could you turn this into a gem that just adds rake tasks to your jekyll site? You could also use the markdown gem to read the markdown directly, turn it to HTML, and do your parsing all in one step. That way it could be as simple as<p><pre><code> gem install jekyll-seo
rake seo[post title]</code></pre>