diff options
-rw-r--r-- | .powrc | 5 | ||||
-rw-r--r-- | .rbenv-version | 2 | ||||
-rw-r--r-- | .rvmrc | 2 | ||||
-rw-r--r-- | .themes/classic/sass/base/_layout.scss | 8 | ||||
-rw-r--r-- | .themes/classic/sass/partials/_navigation.scss | 5 | ||||
-rw-r--r-- | .themes/classic/sass/partials/_syntax.scss | 64 | ||||
-rw-r--r-- | .themes/classic/source/_includes/article.html | 2 | ||||
-rw-r--r-- | .themes/classic/source/_includes/head.html | 2 | ||||
-rw-r--r-- | .themes/classic/source/javascripts/github.js | 12 | ||||
-rw-r--r-- | .themes/classic/source/javascripts/pinboard.js | 4 | ||||
-rw-r--r-- | .themes/classic/source/javascripts/twitter.js | 8 | ||||
-rw-r--r-- | Gemfile | 26 | ||||
-rw-r--r-- | Gemfile.lock | 94 | ||||
-rw-r--r-- | README.markdown | 2 | ||||
-rw-r--r-- | Rakefile | 11 | ||||
-rw-r--r-- | plugins/backtick_code_block.rb | 2 | ||||
-rw-r--r-- | plugins/blockquote.rb | 4 | ||||
-rw-r--r-- | plugins/category_generator.rb | 16 | ||||
-rw-r--r-- | plugins/code_block.rb | 10 | ||||
-rw-r--r-- | plugins/gist_tag.rb | 4 | ||||
-rw-r--r-- | plugins/octopress_filters.rb | 8 | ||||
-rw-r--r-- | plugins/pullquote.rb | 6 | ||||
-rw-r--r-- | source/images/icon-sdc231d6676.png | bin | 0 -> 1513 bytes |
23 files changed, 160 insertions, 137 deletions
@@ -0,0 +1,5 @@ +if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ] ; then + source "$rvm_path/scripts/rvm" + source ".rvmrc" +fi +
\ No newline at end of file diff --git a/.rbenv-version b/.rbenv-version index 0a95b9f5..f3a9c9a8 100644 --- a/.rbenv-version +++ b/.rbenv-version @@ -1 +1 @@ -1.9.2-p290 +1.9.3-p194 @@ -1 +1 @@ -rvm use 1.9.2 +rvm use 1.9.3 diff --git a/.themes/classic/sass/base/_layout.scss b/.themes/classic/sass/base/_layout.scss index ad99c6a2..81903428 100644 --- a/.themes/classic/sass/base/_layout.scss +++ b/.themes/classic/sass/base/_layout.scss @@ -127,16 +127,17 @@ body.sidebar-footer { @media only screen and (min-width: 750px) { aside.sidebar { @include collapse-sidebar; } } +#main, #content, .sidebar { + @extend .group; +} @media only screen and (min-width: 768px) { body { -webkit-text-size-adjust: auto; } body > header { font-size: $header-font-size * 1.2; } #main { - @extend .group; padding: 0; margin: 0 auto; } #content { - @extend .group; overflow: visible; margin-right: $sidebar-width-medium; position: relative; @@ -149,7 +150,6 @@ body.sidebar-footer { } } aside.sidebar { - @extend .group; width: $sidebar-width-medium - $sidebar-pad-medium*2; padding: 0 $sidebar-pad-medium $sidebar-pad-medium; background: none; @@ -180,7 +180,6 @@ body.sidebar-footer { padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide; .collapse-sidebar & { padding: { left: $pad-wide; right: $pad-wide; } - @extend .group; } } } @@ -190,3 +189,4 @@ body.sidebar-footer { ul, ol { margin-left: 0; } } } + diff --git a/.themes/classic/sass/partials/_navigation.scss b/.themes/classic/sass/partials/_navigation.scss index 68a15ce0..30fa011d 100644 --- a/.themes/classic/sass/partials/_navigation.scss +++ b/.themes/classic/sass/partials/_navigation.scss @@ -13,7 +13,7 @@ body > nav { .search { padding: .3em .5em 0; font-size: .85em; - @extend .sans; + font-family: $sans; line-height: 1.1em; width: 95%; @include border-radius(.5em); @@ -54,7 +54,7 @@ body > nav { } a { @include link-colors($nav-color, $nav-color-hover, $visited: $nav-color); - @extend .sans; + font-family: $sans; text-shadow: lighten($nav-bg, 12) 0 1px; float: left; text-decoration: none; @@ -134,3 +134,4 @@ body > nav { a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); } a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); } } + diff --git a/.themes/classic/sass/partials/_syntax.scss b/.themes/classic/sass/partials/_syntax.scss index 77ac8d78..5465286f 100644 --- a/.themes/classic/sass/partials/_syntax.scss +++ b/.themes/classic/sass/partials/_syntax.scss @@ -1,44 +1,52 @@ .highlight, html .gist .gist-file .gist-syntax .gist-highlight { table td.code { width: 100%; } - .line-numbers { - text-align: right; - font-size: 13px; - line-height: 1.45em; - @if $solarized == light { - background: lighten($base03, 1) $noise-bg !important; - border-right: 1px solid darken($base02, 2) !important; - @include box-shadow(lighten($base03, 2) -1px 0 inset); - text-shadow: lighten($base02, 2) 0 -1px; - } @else { - background: $base02 $noise-bg !important; - border-right: 1px solid darken($base03, 2) !important; - @include box-shadow(lighten($base02, 2) -1px 0 inset); - text-shadow: darken($base02, 10) 0 -1px; - } - span { color: $base01 !important; } - padding: .8em !important; - @include border-radius(0); - } border: 1px solid $pre-border !important; } +.highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers { + text-align: right; + font-size: 13px; + line-height: 1.45em; + @if $solarized == light { + background: lighten($base03, 1) $noise-bg !important; + border-right: 1px solid darken($base02, 2) !important; + @include box-shadow(lighten($base03, 2) -1px 0 inset); + text-shadow: lighten($base02, 2) 0 -1px; + } @else { + background: $base02 $noise-bg !important; + border-right: 1px solid darken($base03, 2) !important; + @include box-shadow(lighten($base02, 2) -1px 0 inset); + text-shadow: darken($base02, 10) 0 -1px; + } + span { color: $base01 !important; } + padding: .8em !important; + @include border-radius(0); +} + figure.code, .gist-file, pre { @include box-shadow(rgba(#000, .06) 0 0 10px); .highlight pre { @include box-shadow(none); } } +.gist .highlight, figure.code .highlight { + @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px); +} html .gist .gist-file { margin-bottom: 1.8em; position: relative; border: none; padding-top: image-height("code_bg.png") !important; + .highlight { + margin-bottom: 0; + } .gist-syntax { border-bottom: 0 !important; background: none !important; - .gist-highlight{ + .gist-highlight { background: $base03 !important; - pre { - @extend .pre-code; - } + } + .highlight pre { + @extend .pre-code; + padding: 0; } } .gist-meta { @@ -107,12 +115,11 @@ p, li { } .pre-code { - @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px); font-family: $mono !important; overflow: scroll; overflow-y: hidden; display: block; - padding: .8em !important; + padding: .8em; overflow-x: auto; line-height: 1.45em; background: $base03 $noise-bg !important; @@ -187,7 +194,7 @@ p, li { } .highlight, .gist-highlight { - pre { background: none; @include border-radius(none); border: none; padding: 0; margin-bottom: 0; } + pre { background: none; @include border-radius(0px); border: none; padding: 0; margin-bottom: 0; } margin-bottom: 1.8em; background: $base03; overflow-y: hidden; @@ -206,7 +213,9 @@ pre, .highlight, .gist-highlight { &::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px } } -.highlight code { @extend .pre-code; background: #000;} +.highlight code { + @extend .pre-code; background: #000; +} figure.code { background: none; padding: 0; @@ -250,4 +259,3 @@ figure.code { text-shadow: #cbcccc 0 1px 0; padding-left: 3em; } - diff --git a/.themes/classic/source/_includes/article.html b/.themes/classic/source/_includes/article.html index 9db07455..23f48844 100644 --- a/.themes/classic/source/_includes/article.html +++ b/.themes/classic/source/_includes/article.html @@ -8,7 +8,7 @@ {% unless page.meta == false %} <p class="meta"> {% include post/date.html %}{{ time }} - {% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %} + {% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %} | <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">Comments</a> {% endif %} </p> diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index 0fdc4019..d7abd6fd 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -16,7 +16,7 @@ <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1"> - {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} <link rel="canonical" href="{{ canonical }}"> <link href="{{ root_url }}/favicon.png" rel="icon"> <link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js index 678775a9..9e98b8c2 100644 --- a/.themes/classic/source/javascripts/github.js +++ b/.themes/classic/source/javascripts/github.js @@ -3,22 +3,22 @@ var github = (function(){ var i = 0, fragment = '', t = $(target)[0]; for(i = 0; i < repos.length; i++) { - fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>'; + fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+(repos[i].description||'')+'</p></li>'; } t.innerHTML = fragment; } return { showRepos: function(options){ $.ajax({ - url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?" + url: "https://api.github.com/users/"+options.user+"/repos?callback=?" , type: 'jsonp' , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); } , success: function(data) { var repos = []; - if (!data || !data.repositories) { return; } - for (var i = 0; i < data.repositories.length; i++) { - if (options.skip_forks && data.repositories[i].fork) { continue; } - repos.push(data.repositories[i]); + if (!data || !data.data) { return; } + for (var i = 0; i < data.data.length; i++) { + if (options.skip_forks && data.data[i].fork) { continue; } + repos.push(data.data[i]); } repos.sort(function(a, b) { var aDate = new Date(a.pushed_at).valueOf(), diff --git a/.themes/classic/source/javascripts/pinboard.js b/.themes/classic/source/javascripts/pinboard.js index 52577e2c..a97df03d 100644 --- a/.themes/classic/source/javascripts/pinboard.js +++ b/.themes/classic/source/javascripts/pinboard.js @@ -44,7 +44,7 @@ function Pinboard_Linkroll() { if (it.t.length > 0) { for (var i = 0; i < it.t.length; i++) { var tag = it.t[i]; - str += " <a class=\"pin-tag\" href=\"http://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> "; + str += " <a class=\"pin-tag\" href=\"https://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> "; } } str += "</p></li>\n"; @@ -52,5 +52,5 @@ function Pinboard_Linkroll() { } } Pinboard_Linkroll.prototype = new Pinboard_Linkroll(); -pinboardNS_fetch_script("http://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count); +pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count); diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js index c9b7519d..3e2dd0d7 100644 --- a/.themes/classic/source/javascripts/twitter.js +++ b/.themes/classic/source/javascripts/twitter.js @@ -42,8 +42,8 @@ function prettyDate(time) { function linkifyTweet(text, url) { // Linkify urls, usernames, hashtags text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>') - .replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>') - .replace(/(^|\W)#(\w+)/g, '$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>'); + .replace(/(^|\W)@(\w+)/g, '$1<a href="https://twitter.com/$2">@$2</a>') + .replace(/(^|\W)#(\w+)/g, '$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>'); // Use twitter's api to replace t.co shortened urls with expanded ones. for (var u in url) { @@ -62,7 +62,7 @@ function showTwitterFeed(tweets, twitter_user) { content = ''; for (var t in tweets) { - content += '<li>'+'<p>'+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>'; + content += '<li>'+'<p>'+'<a href="https://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'), tweets[t].entities.urls)+'</p>'+'</li>'; } timeline.innerHTML = content; } @@ -70,7 +70,7 @@ function showTwitterFeed(tweets, twitter_user) { function getTwitterFeed(user, count, replies) { count = parseInt(count, 10); $.ajax({ - url: "http://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?" + url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?" , type: 'jsonp' , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); } , success: function(data) { showTwitterFeed(data.slice(0, count), user); } @@ -1,18 +1,18 @@ source "http://rubygems.org" group :development do - gem 'rake' - gem 'rack' - gem 'jekyll' - gem 'rdiscount' - gem 'pygments.rb' - gem 'RedCloth' - gem 'haml', '>= 3.1' - gem 'compass', '>= 0.11' - gem 'rubypants' - gem 'rb-fsevent' - gem 'stringex' - gem 'liquid', '2.2.2' + gem 'rake', '~> 0.9' + gem 'rack', '~> 1.4.1' + gem 'jekyll', '~> 0.12' + gem 'rdiscount', '~> 1.6.8' + gem 'pygments.rb', '~> 0.3.4' + gem 'RedCloth', '~> 4.2.9' + gem 'haml', '~> 3.1.7' + gem 'compass', '~> 0.12.2' + gem 'rubypants', '~> 0.2.0' + gem 'rb-fsevent', '~> 0.9' + gem 'stringex', '~> 1.4.0' + gem 'liquid', '~> 2.3.0' end -gem 'sinatra', '1.2.6' +gem 'sinatra', '~> 1.3.3' diff --git a/Gemfile.lock b/Gemfile.lock index 63506982..c235b2cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,66 +1,64 @@ GEM remote: http://rubygems.org/ specs: - RedCloth (4.2.8) - albino (1.3.3) - posix-spawn (>= 0.3.6) - blankslate (2.1.2.4) - chunky_png (1.2.1) + RedCloth (4.2.9) + chunky_png (1.2.5) classifier (1.3.3) fast-stemmer (>= 1.0.0) - compass (0.11.5) + compass (0.12.2) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) - directory_watcher (1.4.0) - fast-stemmer (1.0.0) - ffi (1.0.9) - fssm (0.2.7) - haml (3.1.2) - jekyll (0.11.0) - albino (>= 1.3.2) - classifier (>= 1.3.1) - directory_watcher (>= 1.1.1) - kramdown (>= 0.13.2) - liquid (>= 1.9.0) - maruku (>= 0.5.9) - kramdown (0.13.3) - liquid (2.2.2) - maruku (0.6.0) + directory_watcher (1.4.1) + fast-stemmer (1.0.1) + fssm (0.2.9) + haml (3.1.7) + jekyll (0.12.0) + classifier (~> 1.3) + directory_watcher (~> 1.1) + kramdown (~> 0.13.4) + liquid (~> 2.3) + maruku (~> 0.5) + pygments.rb (~> 0.3.2) + kramdown (0.13.8) + liquid (2.3.0) + maruku (0.6.1) syntax (>= 1.0.0) posix-spawn (0.3.6) - pygments.rb (0.1.3) - rubypython (>= 0.5.1) - rack (1.3.2) - rake (0.9.2) - rb-fsevent (0.4.3.1) + pygments.rb (0.3.4) + posix-spawn (~> 0.3.6) + yajl-ruby (~> 1.1.0) + rack (1.4.1) + rack-protection (1.3.2) + rack + rake (0.9.2.2) + rb-fsevent (0.9.1) rdiscount (1.6.8) rubypants (0.2.0) - rubypython (0.5.1) - blankslate (>= 2.1.2.3) - ffi (~> 1.0.7) - sass (3.1.5) - sinatra (1.2.6) - rack (~> 1.1) - tilt (>= 1.2.2, < 2.0) - stringex (1.3.0) + sass (3.1.20) + sinatra (1.3.3) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + stringex (1.4.0) syntax (1.0.0) - tilt (1.3.2) + tilt (1.3.3) + yajl-ruby (1.1.0) PLATFORMS ruby DEPENDENCIES - RedCloth - compass (>= 0.11) - haml (>= 3.1) - jekyll - liquid (= 2.2.2) - pygments.rb - rack - rake - rb-fsevent - rdiscount - rubypants - sinatra (= 1.2.6) - stringex + RedCloth (~> 4.2.9) + compass (~> 0.12.2) + haml (~> 3.1.7) + 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) + rubypants (~> 0.2.0) + sinatra (~> 1.3.3) + stringex (~> 1.4.0) diff --git a/README.markdown b/README.markdown index c181401c..06ea4232 100644 --- a/README.markdown +++ b/README.markdown @@ -16,7 +16,7 @@ Check out [Octopress.org](http://octopress.org/docs) for guides and documentatio ## Contributing -We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plug-ins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases. +We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plugins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases. ## License @@ -7,7 +7,8 @@ require "stringex" ssh_user = "user@domain.com" ssh_port = "22" document_root = "~/website.com/" -rsync_delete = true +rsync_delete = false +rsync_args = "" # Any extra arguments to pass to rsync deploy_default = "rsync" # This will be configured for you when you run config_deploy @@ -151,7 +152,7 @@ task :new_page, :filename do |t, args| end # usage rake isolate[my-post] -desc "Move all other posts than the one currently being worked on to a temporary stash location (stash) so regenerating the site happens much quicker." +desc "Move all other posts than the one currently being worked on to a temporary stash location (stash) so regenerating the site happens much more quickly." task :isolate, :filename do |t, args| stash_dir = "#{source_dir}/#{stash_dir}" FileUtils.mkdir(stash_dir) unless File.exist?(stash_dir) @@ -237,7 +238,7 @@ task :rsync do exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'" end puts "## Deploying website via Rsync" - ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}") + ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{rsync_args} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}") end desc "deploy public directory to github pages" @@ -299,7 +300,9 @@ task :setup_github_pages, :repo do |t, args| if args.repo repo_url = args.repo else - repo_url = get_stdin("Enter the read/write url for your repository: ") + puts "Enter the read/write url for your repository" + puts "(For example, 'git@github.com:your_username/your_username.github.com)" + repo_url = get_stdin("Repository url: ") end user = repo_url.match(/:([^\/]+)/)[1] branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master' diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb index 40e7900b..8e2c1141 100644 --- a/plugins/backtick_code_block.rb +++ b/plugins/backtick_code_block.rb @@ -2,7 +2,7 @@ require './plugins/pygments_code' module BacktickCodeBlock include HighlightCode - AllOptions = /([^\s]+)\s+(.+?)(https?:\/\/\S+)\s*(.+)?/i + AllOptions = /([^\s]+)\s+(.+?)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i LangCaption = /([^\s]+)\s*(.+)?/i def render_code_block(input) @options = nil diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index 7fb8c261..62e7d143 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -46,7 +46,7 @@ module Jekyll end def render(context) - quote = paragraphize(super.map(&:strip).join) + quote = paragraphize(super) author = "<strong>#{@by.strip}</strong>" if @by if @source url = @source.match(/https?:\/\/(.+)/)[1].split('/') @@ -75,7 +75,7 @@ module Jekyll end def paragraphize(input) - "<p>#{input.gsub(/\n\n/, '</p><p>').gsub(/\n/, '<br/>')}</p>" + "<p>#{input.lstrip.rstrip.gsub(/\n\n/, '</p><p>').gsub(/\n/, '<br/>')}</p>" end end end diff --git a/plugins/category_generator.rb b/plugins/category_generator.rb index bb5fd329..77e06afb 100644 --- a/plugins/category_generator.rb +++ b/plugins/category_generator.rb @@ -141,10 +141,7 @@ module Jekyll # Returns string # def category_links(categories) - dir = @context.registers[:site].config['category_dir'] - categories = categories.sort!.map do |item| - "<a class='category' href='/#{dir}/#{item.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase}/'>#{item}</a>" - end + categories = categories.sort!.map { |c| category_link c } case categories.length when 0 @@ -156,6 +153,17 @@ module Jekyll end end + # Outputs a single category as an <a> link. + # + # +category+ is a category string to format as an <a> link + # + # Returns string + # + def category_link(category) + dir = @context.registers[:site].config['category_dir'] + "<a class='category' href='/#{dir}/#{category.gsub(/_|\P{Word}/, '-').gsub(/-{2,}/, '-').downcase}/'>#{category}</a>" + end + # Outputs the post.date as formatted html, with hooks for CSS styling. # # +date+ is the date object to format as HTML. diff --git a/plugins/code_block.rb b/plugins/code_block.rb index e175d445..660f73d7 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -49,8 +49,7 @@ module Jekyll class CodeBlock < Liquid::Block include HighlightCode include TemplateWrapper - CaptionUrlTitle = /(\S[\S\s]*)\s+(https?:\/\/)(\S+)\s+(.+)/i - CaptionUrl = /(\S[\S\s]*)\s+(https?:\/\/)(\S+)/i + CaptionUrlTitle = /(\S[\S\s]*)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i Caption = /(\S[\S\s]*)/ def initialize(tag_name, markup, tokens) @title = nil @@ -63,10 +62,7 @@ module Jekyll end if markup =~ CaptionUrlTitle @file = $1 - @caption = "<figcaption><span>#{$1}</span><a href='#{$2 + $3}'>#{$4}</a></figcaption>" - elsif markup =~ CaptionUrl - @file = $1 - @caption = "<figcaption><span>#{$1}</span><a href='#{$2 + $3}'>link</a></figcaption>" + @caption = "<figcaption><span>#{$1}</span><a href='#{$2}'>#{$3 || 'link'}</a></figcaption>" elsif markup =~ Caption @file = $1 @caption = "<figcaption><span>#{$1}</span></figcaption>\n" @@ -79,7 +75,7 @@ module Jekyll def render(context) output = super - code = super.join + code = super source = "<figure class='code'>" source += @caption if @caption if @filetype diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb index 74dd3b37..5f590e96 100644 --- a/plugins/gist_tag.rb +++ b/plugins/gist_tag.rb @@ -40,7 +40,9 @@ module Jekyll end def script_url_for(gist_id, filename) - "https://gist.github.com/#{gist_id}.js?file=#{filename}" + url = "https://gist.github.com/#{gist_id}.js" + url = "#{url}?file=#{filename}" unless filename.nil? or filename.empty? + url end def get_gist_url_for(gist, file) diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index a5bb235c..091f75aa 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -24,10 +24,14 @@ module Jekyll class ContentFilters < PostFilter include OctopressFilters def pre_render(post) - post.content = pre_filter(post.content) + if post.ext.match('html|textile|markdown|md|haml|slim|xml') + post.content = pre_filter(post.content) + end end def post_render(post) - post.content = post_filter(post.content) + if post.ext.match('html|textile|markdown|md|haml|slim|xml') + post.content = post_filter(post.content) + end end end end diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 2b59bad6..3c65e66e 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -32,11 +32,9 @@ module Jekyll def render(context) output = super - if output.join =~ /\{"\s*(.+)\s*"\}/ - #@quote = $1 + if output =~ /\{"\s*(.+?)\s*"\}/m @quote = RubyPants.new($1).to_html - #@quote = CGI.escape($1) - "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" + "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.gsub(/\{"\s*|\s*"\}/, '')}</span>" else return "Surround your pullquote like this {\" text to be quoted \"}" end diff --git a/source/images/icon-sdc231d6676.png b/source/images/icon-sdc231d6676.png Binary files differnew file mode 100644 index 00000000..38ef928f --- /dev/null +++ b/source/images/icon-sdc231d6676.png |