This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example Jekyll generator. Utilizes the new plugin system. | |
# | |
# 1. Make a _plugins directory in your jekyll site, and put this class in a file there. | |
# 2. Upon site generation, version.html will be created in your root destination with | |
# # the version of Jekyll that generated it | |
module Jekyll | |
class VersionReporter < Generator | |
safe true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImageElement : Element { | |
// The original ImageElement didn't scale the picture that was displayed as the thumbnail properly | |
// this code probably needs lots of refactoring but I needed a quick solution. | |
public UIImage Value; | |
static RectangleF rect = new RectangleF (0, 0, dimx, dimy); | |
static NSString ikey = new NSString ("ikey"); | |
UIImage scaled; | |
// Apple leaks this one, so share across all. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "export" the working-copy to a place we can "jekyll" it. | |
# this can probably be done better. | |
git --bare --git-dir=/home/ryanbriones/sites/ryanbriones/source.git archive master | tar xC /home/ryanbriones/sites/ryanbriones/source | |
jekyll /home/ryanbriones/sites/ryanbriones/source /home/ryanbriones/sites/ryanbriones/public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
class Jekyll < Thor | |
include FileUtils | |
method_options :format => :optional | |
def draft(name) | |
format = options[:format] || "markdown" | |
slug = name.downcase.gsub(/ +/,'-').gsub(/[^-\w]/,'').sub(/-+$/,'') | |
filename = slug + ".#{format}" |
NewerOlder