Use assets from gems with jekyll-assets

# Add gems to asset path
# Based on https://github.com/ejholmes/sprockets-gem-paths

require "sprockets"

@gems = if ::Gem::Specification.respond_to? :latest_specs
    ::Gem::Specification.latest_specs
else
    ::Gem.source_index.latest_specs
end

try_paths = [
    %w{ assets },
    %w{ app },
    %w{ app assets },
    %w{ vendor },
    %w{ vendor assets },
    %w{ lib },
    %w{ lib assets }
].inject([]) do |sum, v|
    sum + [
        File.join(v, 'javascripts'),
        File.join(v, 'stylesheets'),
        File.join(v, 'images'),
        File.join(v, 'fonts')
    ]
end

@gems.map(&:full_gem_path).each do |root_path|
    try_paths.map {|p| File.join(root_path, p) }.
        select {|p| File.directory?(p) }.
        each {|path| Sprockets.append_path(path) }
end

Deploy using git hook

#!/bin/sh
#

cd ..
unset GIT_DIR
export LANG=en_US.utf8
git reset --hard
bundle check || bundle
bundle exec jekyll build