aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.themes/classic/sass/base/_theme.scss2
-rw-r--r--.themes/classic/sass/base/_typography.scss7
-rw-r--r--.themes/classic/source/_includes/asides/recent_posts.html2
-rw-r--r--.themes/classic/source/_includes/post/sharing.html2
-rw-r--r--.themes/classic/source/_includes/twitter_sharing.html2
-rw-r--r--.themes/classic/source/javascripts/octopress.js38
-rw-r--r--Gemfile8
-rw-r--r--Gemfile.lock24
-rw-r--r--Rakefile25
-rw-r--r--_config.yml5
-rw-r--r--config.ru2
-rw-r--r--plugins/code_block.rb4
-rw-r--r--plugins/gist_tag.rb2
-rw-r--r--plugins/include_code.rb4
-rw-r--r--plugins/jsfiddle.rb2
15 files changed, 68 insertions, 61 deletions
diff --git a/.themes/classic/sass/base/_theme.scss b/.themes/classic/sass/base/_theme.scss
index 1a43a03d..20dcd24e 100644
--- a/.themes/classic/sass/base/_theme.scss
+++ b/.themes/classic/sass/base/_theme.scss
@@ -1,5 +1,5 @@
$noise-bg: image-url('noise.png') top left !default;
-$img-border: inline-image('dotted-border.png');
+$img-border: inline-image('dotted-border.png') !default;
// Main Link Colors
$link-color: lighten(#165b94, 3) !default;
diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss
index 85256f0b..9a6bbacd 100644
--- a/.themes/classic/sass/base/_typography.scss
+++ b/.themes/classic/sass/base/_typography.scss
@@ -80,10 +80,12 @@ strong { font-weight: bold; }
em { font-style: italic; }
-sup, sub { font-size: 0.8em; position: relative; display: inline-block; }
+sup, sub { font-size: 0.75em; position: relative; display: inline-block; padding: 0 .2em; line-height: .8em;}
sup { top: -.5em; }
sub { bottom: -.5em; }
+a[rev='footnote']{ font-size: .75em; padding: 0 .3em; line-height: 1; }
+
q { font-style: italic;
&:before { content: "\201C"; }
&:after { content: "\201D"; }
@@ -99,8 +101,6 @@ abbr, acronym { border-bottom: 1px dotted; cursor: help; }
pre, code, tt { @extend .mono; }
-sub, sup { line-height: 0; }
-
hr { margin-bottom: 0.2em; }
small { font-size: .8em; }
@@ -161,3 +161,4 @@ article blockquote {
white-space: pre-wrap;
word-wrap: break-word;
}
+
diff --git a/.themes/classic/source/_includes/asides/recent_posts.html b/.themes/classic/source/_includes/asides/recent_posts.html
index cc628145..4b108474 100644
--- a/.themes/classic/source/_includes/asides/recent_posts.html
+++ b/.themes/classic/source/_includes/asides/recent_posts.html
@@ -3,7 +3,7 @@
<ul id="recent_posts">
{% for post in site.posts limit: site.recent_posts %}
<li class="post">
- <a href="{{ root_url }}{{ post.url }}">{{ post.title }}</a>
+ <a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a>
</li>
{% endfor %}
</ul>
diff --git a/.themes/classic/source/_includes/post/sharing.html b/.themes/classic/source/_includes/post/sharing.html
index e32500d0..d639faa1 100644
--- a/.themes/classic/source/_includes/post/sharing.html
+++ b/.themes/classic/source/_includes/post/sharing.html
@@ -1,6 +1,6 @@
<div class="sharing">
{% if site.twitter_tweet_button %}
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a>
+ <a href="//twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a>
{% endif %}
{% if site.google_plus_one %}
<div class="g-plusone" data-size="{{ site.google_plus_one_size }}"></div>
diff --git a/.themes/classic/source/_includes/twitter_sharing.html b/.themes/classic/source/_includes/twitter_sharing.html
index 687e77de..7cd5fbc2 100644
--- a/.themes/classic/source/_includes/twitter_sharing.html
+++ b/.themes/classic/source/_includes/twitter_sharing.html
@@ -4,7 +4,7 @@
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
- twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
+ twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
diff --git a/.themes/classic/source/javascripts/octopress.js b/.themes/classic/source/javascripts/octopress.js
index c3f59156..218a0a1a 100644
--- a/.themes/classic/source/javascripts/octopress.js
+++ b/.themes/classic/source/javascripts/octopress.js
@@ -1,17 +1,15 @@
function getNav() {
- var mobileNav = $('nav[role=navigation] fieldset[role=search]').after('<fieldset class="mobile-nav"></fieldset>').next().append('<select></select>');
- mobileNav.children('select').append('<option value="">Navigate&hellip;</option>');
- $('ul[role=main-navigation]').addClass('main-navigation');
- $('ul.main-navigation a').each(function(i, link) {
- mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
- });
- $('ul.subscription a').each(function(i, link) {
- mobileNav.children('select').append('<option value="'+link.href+'">&raquo; '+link.text+'</option>');
- });
- mobileNav.children('select').bind('change', function(event) {
+ var mainNav = $('ul.main-navigation, ul[role=main-navigation]').before('<fieldset class="mobile-nav">')
+ var mobileNav = $('fieldset.mobile-nav').append('<select>');
+ mobileNav.find('select').append('<option value="">Navigate&hellip;</option>');
+ var addOption = function(i, option) {
+ mobileNav.find('select').append('<option value="' + this.href + '">&raquo; ' + $(this).text() + '</option>');
+ }
+ mainNav.find('a').each(addOption);
+ $('ul.subscription a').each(addOption);
+ mobileNav.find('select').bind('change', function(event) {
if (event.target.value) { window.location.href = event.target.value; }
});
- mobileNav.children('select').val('');
}
function addSidebarToggler() {
@@ -74,10 +72,10 @@ function addCodeLineNumbers() {
function flashVideoFallback(){
var flashplayerlocation = "/assets/jwplayer/player.swf",
flashplayerskin = "/assets/jwplayer/glow/glow.xml";
- $('video').each(function(video){
+ $('video').each(function(i, video){
video = $(video);
if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){
- video.children('source[src$=mp4]').first().map(function(i, source){
+ video.children('source[src$=mp4]').first().map(i, function(source){
var src = $(source).attr('src'),
id = 'video_'+Math.round(1 + Math.random()*(100000)),
width = video.attr('width'),
@@ -94,18 +92,12 @@ function flashVideoFallback(){
}
function wrapFlashVideos() {
- $('object').each(function(object) {
- object = $(object);
- if ( $('param[name=movie]', object).length ) {
- var wrapper = object.before('<div class="flash-video"><div>').previous();
- $(wrapper).children().append(object);
+ $('object').each(function(i, object) {
+ if( $(object).find('param[name=movie]').length ){
+ $(object).wrap('<div class="flash-video">')
}
});
- $('iframe[src*=vimeo],iframe[src*=youtube]').each(function(iframe) {
- iframe = $(iframe);
- var wrapper = iframe.before('<div class="flash-video"><div>').previous();
- $(wrapper).children().append(iframe);
- });
+ $('iframe[src*=vimeo],iframe[src*=youtube]').wrap('<div class="flash-video">')
}
function renderDeliciousLinks(items) {
diff --git a/Gemfile b/Gemfile
index dc2b5cc6..9c178727 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,14 +1,14 @@
-source "http://rubygems.org"
+source "https://rubygems.org"
group :development do
gem 'rake', '~> 0.9'
- gem 'rack', '~> 1.4.1'
gem 'jekyll', '~> 0.12'
- gem 'rdiscount', '~> 1.6.8'
+ gem 'rdiscount', '~> 2.0.7'
gem 'pygments.rb', '~> 0.3.4'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 3.1.7'
gem 'compass', '~> 0.12.2'
+ gem 'sass', '~> 3.2'
gem 'sass-globbing', '~> 1.0.0'
gem 'rubypants', '~> 0.2.0'
gem 'rb-fsevent', '~> 0.9'
@@ -16,4 +16,4 @@ group :development do
gem 'liquid', '~> 2.3.0'
end
-gem 'sinatra', '~> 1.3.5'
+gem 'sinatra', '~> 1.4.2'
diff --git a/Gemfile.lock b/Gemfile.lock
index 02f10736..3ba43eff 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -28,23 +28,23 @@ GEM
pygments.rb (0.3.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
- rack (1.4.5)
- rack-protection (1.3.2)
+ rack (1.5.2)
+ rack-protection (1.5.0)
rack
rake (0.9.2.2)
rb-fsevent (0.9.1)
- rdiscount (1.6.8)
+ rdiscount (2.0.7.3)
rubypants (0.2.0)
- sass (3.1.20)
+ sass (3.2.9)
sass-globbing (1.0.0)
sass (>= 3.1)
- sinatra (1.3.5)
- rack (~> 1.4)
- rack-protection (~> 1.3)
- tilt (~> 1.3, >= 1.3.3)
+ sinatra (1.4.2)
+ rack (~> 1.5, >= 1.5.2)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
stringex (1.4.0)
syntax (1.0.0)
- tilt (1.3.3)
+ tilt (1.3.7)
yajl-ruby (1.1.0)
PLATFORMS
@@ -57,11 +57,11 @@ DEPENDENCIES
jekyll (~> 0.12)
liquid (~> 2.3.0)
pygments.rb (~> 0.3.4)
- rack (~> 1.4.1)
rake (~> 0.9)
rb-fsevent (~> 0.9)
- rdiscount (~> 1.6.8)
+ rdiscount (~> 2.0.7)
rubypants (~> 0.2.0)
+ sass (~> 3.2)
sass-globbing (~> 1.0.0)
- sinatra (~> 1.3.5)
+ sinatra (~> 1.4.2)
stringex (~> 1.4.0)
diff --git a/Rakefile b/Rakefile
index 471b2277..f3ada93d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -247,18 +247,21 @@ end
desc "deploy public directory to github pages"
multitask :push do
puts "## Deploying branch to Github Pages "
+ puts "## Pulling any updates from Github Pages "
+ cd "#{deploy_dir}" do
+ system "git pull"
+ end
(Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }
Rake::Task[:copydot].invoke(public_dir, deploy_dir)
- puts "\n## copying #{public_dir} to #{deploy_dir}"
+ puts "\n## Copying #{public_dir} to #{deploy_dir}"
cp_r "#{public_dir}/.", deploy_dir
cd "#{deploy_dir}" do
- system "git add ."
- system "git add -u"
+ system "git add -A"
puts "\n## Commiting: Site updated at #{Time.now.utc}"
message = "Site updated at #{Time.now.utc}"
system "git commit -m \"#{message}\""
puts "\n## Pushing generated #{deploy_dir} website"
- system "git push origin #{deploy_branch} --force"
+ system "git push origin #{deploy_branch}"
puts "\n## Github Pages deploy complete"
end
end
@@ -304,11 +307,17 @@ task :setup_github_pages, :repo do |t, args|
repo_url = args.repo
else
puts "Enter the read/write url for your repository"
- puts "(For example, 'git@github.com:your_username/your_username.github.com)"
+ puts "(For example, 'git@github.com:your_username/your_username.github.io)"
+ puts " or 'https://github.com/your_username/your_username.github.io')"
repo_url = get_stdin("Repository url: ")
end
- user = repo_url.match(/:([^\/]+)/)[1]
- branch = (repo_url.match(/\/[\w-]+\.github\.com/).nil?) ? 'gh-pages' : 'master'
+ protocol = (repo_url.match(/(^git)@/).nil?) ? 'https' : 'git'
+ if protocol == 'git'
+ user = repo_url.match(/:([^\/]+)/)[1]
+ else
+ user = repo_url.match(/github\.com\/([^\/]+)/)[1]
+ end
+ branch = (repo_url.match(/\/[\w-]+\.github\.(?:io|com)/).nil?) ? 'gh-pages' : 'master'
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
unless (`git remote -v` =~ /origin.+?octopress(?:\.git)?/).nil?
# If octopress is still the origin remote (from cloning) rename it to octopress
@@ -328,7 +337,7 @@ task :setup_github_pages, :repo do |t, args|
end
end
end
- url = "http://#{user}.github.com"
+ url = "http://#{user}.github.io"
url += "/#{project}" unless project == ''
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^url:.*$/, "url: #{url}")
diff --git a/_config.yml b/_config.yml
index 1397f8d3..74d35bad 100644
--- a/_config.yml
+++ b/_config.yml
@@ -34,6 +34,11 @@ plugins: plugins
code_dir: downloads/code
category_dir: blog/categories
markdown: rdiscount
+rdiscount:
+ extensions:
+ - autolink
+ - footnotes
+ - smart
pygments: false # default python pygments have been replaced by pygments.rb
paginate: 10 # Posts per page on the blog index
diff --git a/config.ru b/config.ru
index fddabac2..8e3dc08a 100644
--- a/config.ru
+++ b/config.ru
@@ -11,7 +11,7 @@ class SinatraStaticServer < Sinatra::Base
end
not_found do
- send_sinatra_file('404.html') {"Sorry, I cannot find #{request.path}"}
+ send_file(File.join(File.dirname(__FILE__), 'public', '404.html'), {:status => 404})
end
def send_sinatra_file(path, &missing_file_block)
diff --git a/plugins/code_block.rb b/plugins/code_block.rb
index 660f73d7..c70e181e 100644
--- a/plugins/code_block.rb
+++ b/plugins/code_block.rb
@@ -56,9 +56,9 @@ module Jekyll
@caption = nil
@filetype = nil
@highlight = true
- if markup =~ /\s*lang:(\w+)/i
+ if markup =~ /\s*lang:(\S+)/i
@filetype = $1
- markup = markup.sub(/lang:\w+/i,'')
+ markup = markup.sub(/\s*lang:(\S+)/i,'')
end
if markup =~ CaptionUrlTitle
@file = $1
diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb
index 2549ea7a..16203450 100644
--- a/plugins/gist_tag.rb
+++ b/plugins/gist_tag.rb
@@ -21,7 +21,7 @@ module Jekyll
end
def render(context)
- if parts = @text.match(/([\d]*) (.*)/)
+ if parts = @text.match(/([a-zA-Z\d]*) (.*)/)
gist, file = parts[1].strip, parts[2].strip
script_url = script_url_for gist, file
code = get_cached_gist(gist, file) || get_gist_from_web(gist, file)
diff --git a/plugins/include_code.rb b/plugins/include_code.rb
index fc6daa36..220466b6 100644
--- a/plugins/include_code.rb
+++ b/plugins/include_code.rb
@@ -32,9 +32,9 @@ module Jekyll
def initialize(tag_name, markup, tokens)
@title = nil
@file = nil
- if markup.strip =~ /\s*lang:(\w+)/i
+ if markup.strip =~ /\s*lang:(\S+)/i
@filetype = $1
- markup = markup.strip.sub(/lang:\w+/i,'')
+ markup = markup.strip.sub(/lang:\S+/i,'')
end
if markup.strip =~ /(.*)?(\s+|^)(\/*\S+)/i
@title = $1 || nil
diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb
index a80becb3..0046f9b5 100644
--- a/plugins/jsfiddle.rb
+++ b/plugins/jsfiddle.rb
@@ -18,7 +18,7 @@
module Jekyll
class JsFiddle < Liquid::Tag
def initialize(tag_name, markup, tokens)
- if /(?<fiddle>\w+)(?:\s+(?<sequence>[\w,]+))?(?:\s+(?<skin>\w+))?(?:\s+(?<height>\w+))?(?:\s+(?<width>\w+))?/ =~ markup
+ if /(?<fiddle>\w+\/?\d?)(?:\s+(?<sequence>[\w,]+))?(?:\s+(?<skin>\w+))?(?:\s+(?<height>\w+))?(?:\s+(?<width>\w+))?/ =~ markup
@fiddle = fiddle
@sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result'
@skin = (skin unless skin == 'default') || 'light'