From d0d1e2a98d6a1cd57dd8e4c18ac80be5776c34ce Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Thu, 29 Sep 2011 16:05:43 -0500 Subject: [PATCH 01/84] updated github.js to use reqwest.js with Ender --- .themes/classic/source/javascripts/github.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js index 0187743..82e1160 100644 --- a/.themes/classic/source/javascripts/github.js +++ b/.themes/classic/source/javascripts/github.js @@ -9,12 +9,11 @@ var github = (function(){ } return { showRepos: function(options){ - var feed = new jXHR(); - feed.onerror = function (msg,url) { - $(options.target + ' li.loading').addClass('error').text("Error loading feed"); - }; - feed.onreadystatechange = function(data) { - if (feed.readyState === 4) { + $.ajax({ + url: "http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?" + , type: 'jsonp' + , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); } + , success: function(data) { var repos = []; for (var i = 0; i < data.repositories.length; i++){ if (options.skip_forks && data.repositories[i].fork) { continue; } @@ -31,9 +30,7 @@ var github = (function(){ if (options.count) { repos.splice(options.count); } render(options.target, repos); } - }; - feed.open("GET","http://github.com/api/v2/json/repos/show/"+options.user+"?callback=?"); - feed.send(); + }) } }; -})(); \ No newline at end of file +})(); From 579142c28b498cdfda5c1c2ae87da737846097ae Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Thu, 29 Sep 2011 19:55:11 -0500 Subject: [PATCH 02/84] fixed issue with expanded twitter urls, fixed issue where twitter would report seven day old tweets as "false" --- .themes/classic/source/javascripts/twitter.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js index b6fb0d8..27afb43 100644 --- a/.themes/classic/source/javascripts/twitter.js +++ b/.themes/classic/source/javascripts/twitter.js @@ -1,12 +1,12 @@ // JSON-P Twitter fetcher for Octopress -// (c) Brandon Mathis // MIT Lisence +// (c) Brandon Mathis // MIT License /* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */ function prettyDate(time) { if (navigator.appName === 'Microsoft Internet Explorer') { return ""; // because IE date parsing isn't fun. } - + console.log(time); var say = { just_now: " now", minute_ago: "1m", @@ -15,6 +15,7 @@ function prettyDate(time) { hours_ago: "h", yesterday: "1d", days_ago: "d", + last_week: "1w", weeks_ago: "w" }; @@ -35,6 +36,7 @@ function prettyDate(time) { diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) || day_diff === 1 && say.yesterday || day_diff < 7 && day_diff + say.days_ago || + day_diff === 7 && say.last_week || day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago; } @@ -47,8 +49,10 @@ function linkifyTweet(text, url) { // Use twitter's api to replace t.co shortened urls with expanded ones. for (var u in url) { if(url[u].expanded_url != null){ - var shortUrl = new RegExp( url[u].url.replace(/https?:\/\//, ''), 'g'); - text = text.replace(shortUrl, url[u].display_url); + var shortUrl = new RegExp(url[u].url, 'g'); + text = text.replace(shortUrl, url[u].expanded_url); + var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g'); + text = text.replace(shortUrl, ">"+url[u].display_url); } } return text From 898b149dda088ef18832f04bd005acf7efc995d3 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Thu, 29 Sep 2011 19:58:53 -0500 Subject: [PATCH 03/84] removed console.log from twitter.js #facepalm --- .themes/classic/source/javascripts/twitter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js index 27afb43..c9b7519 100644 --- a/.themes/classic/source/javascripts/twitter.js +++ b/.themes/classic/source/javascripts/twitter.js @@ -6,7 +6,6 @@ function prettyDate(time) { if (navigator.appName === 'Microsoft Internet Explorer') { return ""; // because IE date parsing isn't fun. } - console.log(time); var say = { just_now: " now", minute_ago: "1m", From bdf904adfff7c1ca0c340dbc36bd9ccff05513ee Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Fri, 30 Sep 2011 08:08:07 -0500 Subject: [PATCH 04/84] Retains customized favicon on update_source fixes #189, Copies index.* from source.old fixes #188 --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 1c7dc87..0358009 100644 --- a/Rakefile +++ b/Rakefile @@ -188,8 +188,9 @@ task :update_source, :theme do |t, args| puts "## Copied #{source_dir} into #{source_dir}.old/" cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true + cp "#{source_dir}.old/favicon.png", source_dir mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir - cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir + cp "#{source_dir}.old/index.*", source_dir if blog_index_dir != source_dir puts "## Updated #{source_dir} ##" end From 2f7d9f3896801adfd80376144daa2d7d7fa24d55 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Fri, 30 Sep 2011 15:26:48 +0200 Subject: [PATCH 05/84] Fixes flow for sidebar three column mode --- .themes/classic/sass/base/_layout.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.themes/classic/sass/base/_layout.scss b/.themes/classic/sass/base/_layout.scss index c347af1..40240ff 100644 --- a/.themes/classic/sass/base/_layout.scss +++ b/.themes/classic/sass/base/_layout.scss @@ -32,7 +32,10 @@ $indented-lists: false !default; &.thirds section { width: 30%; margin-left: 5%; - &.first { margin-left: 0; } + &.first { + margin-left: 0; + clear: both; + } } } From ff2009577d22dca8cdc31353f3c8cdb386eaafd1 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 1 Oct 2011 15:57:02 -0500 Subject: [PATCH 06/84] improved support for solarized light theme --- .themes/classic/sass/base/_solarized.scss | 34 +++++++++++++++------- .themes/classic/sass/custom/_colors.scss | 4 +-- .themes/classic/sass/partials/_syntax.scss | 13 +++++---- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.themes/classic/sass/base/_solarized.scss b/.themes/classic/sass/base/_solarized.scss index 30cceb8..8903887 100644 --- a/.themes/classic/sass/base/_solarized.scss +++ b/.themes/classic/sass/base/_solarized.scss @@ -4,8 +4,8 @@ $base01: #586e75 !default; //darkest gray $base00: #657b83 !default; //dark gray $base0: #839496 !default; //medium gray $base1: #93a1a1 !default; //medium light gray -$base2: #eee8d5 !default; //cream -$base3: #fdf6e3 !default; //white +$base2: #f2f2f2 !default; //cream +$base3: #ffffff !default; //white $solar-yellow: #b58900 !default; $solar-orange: #cb4b16 !default; $solar-red: #dc322f !default; @@ -18,17 +18,29 @@ $solar-green: #859900 !default; $solarized: dark !default; @if $solarized == light { - $base03: #fdf6e3; - $base02: #eee8d5; - $base01: #93a1a1; - $base00: #839496; - $base0: #657b83; - $base1: #586e75; - $base2: #073642; - $base3: #002b36; + + $_base03: $base03; + $_base02: $base02; + $_base01: $base01; + $_base00: $base00; + $_base0: $base0; + $_base1: $base1; + $_base2: $base2; + $_base3: $base3; + + $base03: $_base3; + $base02: $_base2; + $base01: $_base1; + $base00: $_base0; + $base0: $_base00; + $base1: $_base01; + $base2: $_base02; + $base3: $_base03; } /* non highlighted code colors */ $pre-bg: $base03 !default; -$pre-border: $base02 !default; +$pre-border: darken($base02, 5) !default; $pre-color: $base1 !default; + + diff --git a/.themes/classic/sass/custom/_colors.scss b/.themes/classic/sass/custom/_colors.scss index 9a34404..cf0ab29 100644 --- a/.themes/classic/sass/custom/_colors.scss +++ b/.themes/classic/sass/custom/_colors.scss @@ -11,7 +11,7 @@ /* To use the light Solarized highlighting theme uncomment the following line */ -//$solarized: light +//$solarized: light; /* If you want to tweak the Solarized colors you can do that here */ //$base03: #002b36; //darkest blue @@ -34,5 +34,5 @@ /* Non highlighted code colors */ //$pre-bg: $base03; -//$pre-border: $base02; +//$pre-border: darken($base02, 5); //$pre-color: $base1; diff --git a/.themes/classic/sass/partials/_syntax.scss b/.themes/classic/sass/partials/_syntax.scss index 2ae6164..77ac8d7 100644 --- a/.themes/classic/sass/partials/_syntax.scss +++ b/.themes/classic/sass/partials/_syntax.scss @@ -21,17 +21,19 @@ } border: 1px solid $pre-border !important; } +figure.code, .gist-file, pre { + @include box-shadow(rgba(#000, .06) 0 0 10px); + .highlight pre { @include box-shadow(none); } +} + html .gist .gist-file { margin-bottom: 1.8em; position: relative; border: none; padding-top: image-height("code_bg.png") !important; .gist-syntax { - @if $solarized == dark { - border-bottom: 1px solid $base03 !important; - } @else if $solarized == light { - border-bottom: 0px; - } + border-bottom: 0 !important; + background: none !important; .gist-highlight{ background: $base03 !important; pre { @@ -46,6 +48,7 @@ html .gist .gist-file { font-size: .7em !important; @if $solarized == light { background: lighten($base03, 2) $noise-bg; + border: 1px solid $pre-border !important; border-top: 1px solid lighten($base03, 2) !important; } @else { background: $base02 $noise-bg; From d833d9fe7809468431f2044ac84b9fa85ff2472d Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 1 Oct 2011 21:42:24 -0500 Subject: [PATCH 07/84] wildcards broke rake update_source. fixes that --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 0358009..1336669 100644 --- a/Rakefile +++ b/Rakefile @@ -190,7 +190,7 @@ task :update_source, :theme do |t, args| cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true cp "#{source_dir}.old/favicon.png", source_dir mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir - cp "#{source_dir}.old/index.*", source_dir if blog_index_dir != source_dir + cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir puts "## Updated #{source_dir} ##" end From 09057190d974d071750e28ac9b329a1549fbbef2 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 1 Oct 2011 23:36:52 -0500 Subject: [PATCH 08/84] fixed issue where update_source failed if source/index was any extension other than .html --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 1336669..c1594c7 100644 --- a/Rakefile +++ b/Rakefile @@ -184,13 +184,14 @@ task :update_source, :theme do |t, args| puts "## Removed existing #{source_dir}.old directory" rm_r "#{source_dir}.old", :secure=>true end + mkdir "#{source_dir}.old" cp_r "#{source_dir}/.", "#{source_dir}.old" puts "## Copied #{source_dir} into #{source_dir}.old/" cp_r "#{themes_dir}/"+theme+"/source/.", source_dir, :remove_destination=>true cp_r "#{source_dir}.old/_includes/custom/.", "#{source_dir}/_includes/custom/", :remove_destination=>true cp "#{source_dir}.old/favicon.png", source_dir mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir - cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir + cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html") puts "## Updated #{source_dir} ##" end From 63c3ba651414a292b9de29a258d7179ec2f54816 Mon Sep 17 00:00:00 2001 From: Aleksey Gureiev Date: Sun, 2 Oct 2011 09:05:54 +0300 Subject: [PATCH 09/84] Proper atom feed xml escaping --- .themes/classic/source/atom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.themes/classic/source/atom.xml b/.themes/classic/source/atom.xml index 693f397..e92514b 100644 --- a/.themes/classic/source/atom.xml +++ b/.themes/classic/source/atom.xml @@ -4,21 +4,21 @@ layout: nil - {{ site.title }} + {{ site.title | xml_escape }} {{ site.time | date_to_xmlschema }} {{ site.url }}/ - {{ site.author }} + {{ site.author | xml_escape }} {% if site.email %} - {{ site.email }} + {{ site.email | xml_escape }} {% endif %} {% for post in site.posts limit: 20 %} - {{ post.title }} + {{ post.title | xml_escape }} {{ post.date | date_to_xmlschema }} {{ site.url }}{{ post.id }} From f4a6bd2a68b155f912c936554a4f496c6afdd9c2 Mon Sep 17 00:00:00 2001 From: Mikkel Hoegh Date: Tue, 4 Oct 2011 00:24:16 +0200 Subject: [PATCH 10/84] Add generator tag to Atom feed. generator is an optional element, but let's give credit where it's due. Besides, it can be helpful to feed consumers to know what tool generated the file. --- .themes/classic/source/atom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/.themes/classic/source/atom.xml b/.themes/classic/source/atom.xml index e92514b..ff8d259 100644 --- a/.themes/classic/source/atom.xml +++ b/.themes/classic/source/atom.xml @@ -15,6 +15,7 @@ layout: nil {{ site.email | xml_escape }} {% endif %} + Octopress {% for post in site.posts limit: 20 %} From 6315527b2f7676ae4afa1ce5cb78e11d25917f23 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Tue, 4 Oct 2011 19:18:40 +0200 Subject: [PATCH 11/84] Adds CDATA sections to atom.xml, fixes #198 --- .themes/classic/source/atom.xml | 12 +++++------- plugins/octopress_filters.rb | 5 +++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.themes/classic/source/atom.xml b/.themes/classic/source/atom.xml index ff8d259..83af3f8 100644 --- a/.themes/classic/source/atom.xml +++ b/.themes/classic/source/atom.xml @@ -4,26 +4,24 @@ layout: nil - {{ site.title | xml_escape }} + <![CDATA[{{ site.title }}]]> {{ site.time | date_to_xmlschema }} {{ site.url }}/ - {{ site.author | xml_escape }} - {% if site.email %} - {{ site.email | xml_escape }} - {% endif %} + + {% if site.email %}{% endif %} Octopress {% for post in site.posts limit: 20 %} - {{ post.title | xml_escape }} + <![CDATA[{{ post.title | cdata_escape }}]]> {{ post.date | date_to_xmlschema }} {{ site.url }}{{ post.id }} - {{ post.content | expand_urls: site.url | xml_escape }} + {% endfor %} diff --git a/plugins/octopress_filters.rb b/plugins/octopress_filters.rb index 7eaaaa7..ef8c1fb 100644 --- a/plugins/octopress_filters.rb +++ b/plugins/octopress_filters.rb @@ -63,6 +63,11 @@ module OctopressLiquidFilters return (content.nil?) ? input : content end + # Escapes CDATA sections in post content + def cdata_escape(input) + input.gsub(//, ']]>') + end + # Replaces relative urls with full urls def expand_urls(input, url='') url ||= '/' From 8c2532e5bfa3a519bd14711c84f0a6d8ffbbd628 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Tue, 4 Oct 2011 20:34:55 +0200 Subject: [PATCH 12/84] Updates README --- README.markdown | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index 84f0e18..c181401 100644 --- a/README.markdown +++ b/README.markdown @@ -3,15 +3,22 @@ Octopress is [Jekyll](https://github.com/mojombo/jekyll) blogging at its finest. 1. **Octopress sports a clean responsive theme** written in semantic HTML5, focused on readability and friendliness toward mobile devices. -2. **Code blogging is easy and beautiful.** Embed code (with [Solarized](http://ethanschoonover.com/solarized) styling) in your posts from gists or from your filesystem. -3. **Third party integration is simple** with built-in support for Twitter, Pinboard, Delicious, Disqus Comments, and Google Analytics. +2. **Code blogging is easy and beautiful.** Embed code (with [Solarized](http://ethanschoonover.com/solarized) styling) in your posts from gists, jsFiddle or from your filesystem. +3. **Third party integration is simple** with built-in support for Twitter, Pinboard, Delicious, GitHub Repositories, Disqus Comments and Google Analytics. 4. **It's easy to use.** A collection of rake tasks simplifies development and makes deploying a cinch. -5. **Ships with great plugins** some original and others from the Jekyll community — tested and improved. +5. **Ships with great plug-ins** some original and others from the Jekyll community — tested and improved. + ## Documentation Check out [Octopress.org](http://octopress.org/docs) for guides and documentation. + +## 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. + + ## License (The MIT License) @@ -23,6 +30,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + #### If you want to be awesome. - Proudly display the 'Powered by Octopress' credit in the footer. -- Add your site to the wiki so we can watch the community grow. +- Add your site to the Wiki so we can watch the community grow. From 66916f57a71b3d7aeb1465b049ed701fbf65a68c Mon Sep 17 00:00:00 2001 From: Mikkel Hoegh Date: Wed, 5 Oct 2011 00:24:13 +0200 Subject: [PATCH 13/84] First attempt at creating per-category Atom feeds. --- .../source/_includes/custom/category_feed.xml | 28 +++++++++++++++ plugins/category_generator.rb | 36 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .themes/classic/source/_includes/custom/category_feed.xml diff --git a/.themes/classic/source/_includes/custom/category_feed.xml b/.themes/classic/source/_includes/custom/category_feed.xml new file mode 100644 index 0000000..616642f --- /dev/null +++ b/.themes/classic/source/_includes/custom/category_feed.xml @@ -0,0 +1,28 @@ +--- +layout: nil +--- + + + + {{ page.title | xml_escape }} | {{ site.title | xml_escape }} + <![CDATA[{{ page.title }} | {{ site.title }}]]> + + + {{ site.time | date_to_xmlschema }} + {{ site.url }}/ + + + {% if site.email %}{% endif %} + + Octopress + + {% for post in site.categories[page.category] limit: 5 %} + + <![CDATA[{{ post.title | cdata_escape }}]]> + + {{ post.date | date_to_xmlschema }} + {{ site.url }}{{ post.id }} + + + {% endfor %} + diff --git a/plugins/category_generator.rb b/plugins/category_generator.rb index d9357bc..bb5fd32 100644 --- a/plugins/category_generator.rb +++ b/plugins/category_generator.rb @@ -48,6 +48,35 @@ module Jekyll end + # The CategoryFeed class creates an Atom feed for the specified category. + class CategoryFeed < Page + + # Initializes a new CategoryFeed. + # + # +base+ is the String path to the . + # +category_dir+ is the String path between and the category folder. + # +category+ is the category currently being processed. + def initialize(site, base, category_dir, category) + @site = site + @base = base + @dir = category_dir + @name = 'atom.xml' + self.process(@name) + # Read the YAML data from the layout page. + self.read_yaml(File.join(base, '_includes/custom'), 'category_feed.xml') + self.data['category'] = category + # Set the title for this page. + title_prefix = site.config['category_title_prefix'] || 'Category: ' + self.data['title'] = "#{title_prefix}#{category}" + # Set the meta-description for this page. + meta_description_prefix = site.config['category_meta_description_prefix'] || 'Category: ' + self.data['description'] = "#{meta_description_prefix}#{category}" + + # Set the correct feed URL. + self.data['feed_url'] = "#{category_dir}/#{name}" + end + + end # The Site class is a built-in Jekyll class with access to global site config information. class Site @@ -63,6 +92,13 @@ module Jekyll index.write(self.dest) # Record the fact that this page has been added, otherwise Site::cleanup will remove it. self.pages << index + + # Create an Atom-feed for each index. + feed = CategoryFeed.new(self, self.source, category_dir, category) + feed.render(self.layouts, site_payload) + feed.write(self.dest) + # Record the fact that this page has been added, otherwise Site::cleanup will remove it. + self.pages << feed end # Loops through the list of category pages and processes each one. From e1d680ff112952d88f9b9f5fd92d33f9a9b739db Mon Sep 17 00:00:00 2001 From: Mikkel Hoegh Date: Thu, 6 Oct 2011 11:54:03 +0200 Subject: [PATCH 14/84] Fixed duplicate title. --- .themes/classic/source/_includes/custom/category_feed.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/.themes/classic/source/_includes/custom/category_feed.xml b/.themes/classic/source/_includes/custom/category_feed.xml index 616642f..f47c553 100644 --- a/.themes/classic/source/_includes/custom/category_feed.xml +++ b/.themes/classic/source/_includes/custom/category_feed.xml @@ -4,7 +4,6 @@ layout: nil - {{ page.title | xml_escape }} | {{ site.title | xml_escape }} <![CDATA[{{ page.title }} | {{ site.title }}]]> From e4df98317ae07b2df8b6b00e2874742f218a70e8 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Thu, 6 Oct 2011 18:31:49 +0200 Subject: [PATCH 15/84] Fixes delicious API url after moving from Yahoo! to AVOS, fixes #179 --- .themes/classic/source/_includes/asides/delicious.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.themes/classic/source/_includes/asides/delicious.html b/.themes/classic/source/_includes/asides/delicious.html index 8c75b82..115cdcb 100644 --- a/.themes/classic/source/_includes/asides/delicious.html +++ b/.themes/classic/source/_includes/asides/delicious.html @@ -2,7 +2,7 @@

On Delicious

- +

My Delicious Bookmarks »

{% endif %} \ No newline at end of file From 734ee1f31e3aa48d5e4c283f8a82f9c07c577bed Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Sun, 9 Oct 2011 04:14:27 -0300 Subject: [PATCH 16/84] As other things rely on these variables, they need to be global. Fixes issues with comments not loading on the blog. Semicolons non-optional due to SAFE function http://twitter.com/#!/elijahmanor/status/121980870428069890 --- .themes/classic/source/_includes/disqus.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.themes/classic/source/_includes/disqus.html b/.themes/classic/source/_includes/disqus.html index 4b91353..a58512b 100644 --- a/.themes/classic/source/_includes/disqus.html +++ b/.themes/classic/source/_includes/disqus.html @@ -1,19 +1,19 @@ {% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %} {% if site.disqus_short_name and page.comments != false %} diff --git a/.themes/classic/source/_includes/post/sharing.html b/.themes/classic/source/_includes/post/sharing.html index f0f9b9d..e32500d 100644 --- a/.themes/classic/source/_includes/post/sharing.html +++ b/.themes/classic/source/_includes/post/sharing.html @@ -5,4 +5,7 @@ {% if site.google_plus_one %}
{% endif %} + {% if site.facebook_like %} +
+ {% endif %} diff --git a/_config.yml b/_config.yml index f40ccf1..26881bc 100644 --- a/_config.yml +++ b/_config.yml @@ -80,3 +80,6 @@ disqus_show_comment_count: false # Google Analytics google_analytics_tracking_id: + +# Facebook Like +facebook_like: true From 35ebe0d647dd1775a99ba476f5f26958003c951e Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Tue, 11 Oct 2011 14:20:52 +0200 Subject: [PATCH 18/84] Allows '-' in deployment branch names, fixes #213 --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index c1594c7..1206787 100644 --- a/Rakefile +++ b/Rakefile @@ -283,7 +283,7 @@ desc "Set up _deploy folder and deploy branch for Github Pages deployment" task :setup_github_pages do repo_url = get_stdin("Enter the read/write url for your repository: ") user = repo_url.match(/:([^\/]+)/)[1] - branch = (repo_url.match(/\/\w+.github.com/).nil?) ? 'gh-pages' : 'master' + branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master' project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : '' unless `git remote -v`.match(/origin.+?octopress.git/).nil? # If octopress is still the origin remote (from cloning) rename it to octopress From 9909f16d80ae0a7a64f829ece84a60948ae9b5a5 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Tue, 11 Oct 2011 15:46:20 +0200 Subject: [PATCH 19/84] Codeblock: Output source even if 'pygments_prefix' or 'pygments_suffix' is nil. Fixes #182 --- plugins/code_block.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/code_block.rb b/plugins/code_block.rb index bf89fea..e175d44 100644 --- a/plugins/code_block.rb +++ b/plugins/code_block.rb @@ -90,6 +90,7 @@ module Jekyll source = safe_wrap(source) source = context['pygments_prefix'] + source if context['pygments_prefix'] source = source + context['pygments_suffix'] if context['pygments_suffix'] + source end end end From 86c72a4ca6355813677335351b6fce2d82d55a46 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 11 Oct 2011 15:14:41 -0500 Subject: [PATCH 20/84] ensures compiled /source/stylesheets/screen.css exists before running watch and preview tasks, fixes #214 --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rakefile b/Rakefile index 1206787..234e65a 100644 --- a/Rakefile +++ b/Rakefile @@ -58,6 +58,7 @@ desc "Watch the site and regenerate when it changes" task :watch do raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) puts "Starting to watch source with Jekyll and Compass." + system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") jekyllPid = Process.spawn("jekyll --auto") compassPid = Process.spawn("compass watch") @@ -73,6 +74,7 @@ desc "preview the site in a web browser" task :preview do raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}" + system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") jekyllPid = Process.spawn("jekyll --auto") compassPid = Process.spawn("compass watch") rackupPid = Process.spawn("rackup --port #{server_port}") From 8897083cf7b90c0f8e08d0b0932eed2c3baf9684 Mon Sep 17 00:00:00 2001 From: strand Date: Tue, 11 Oct 2011 15:59:25 -0700 Subject: [PATCH 21/84] Implemented pullquoteleft functionality --- plugins/pullquote.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 03e307a..6d175e8 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -1,10 +1,10 @@ # # Author: Brandon Mathis -# Based on the sematic pullquote technique by Maykel Loomans at http://miekd.com/articles/pull-quotes-with-html5-and-css/ +# Based on the semantic pullquote technique by Maykel Loomans at http://miekd.com/articles/pull-quotes-with-html5-and-css/ # # Outputs a span with a data-pullquote attribute set from the marked pullquote. Example: # -# {% pullquote %} +# {% pullquote %} # When writing longform posts, I find it helpful to include pullquotes, which help those scanning a post discern whether or not a post is helpful. # It is important to note, {" pullquotes are merely visual in presentation and should not appear twice in the text. "} That is why it is prefered # to use a CSS only technique for styling pullquotes. @@ -17,11 +17,13 @@ # #

# +# Strand's modification adds the ability to call this plugin with {% pullquote align:left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. module Jekyll class PullquoteTag < Liquid::Block def initialize(tag_name, markup, tokens) + markup =~ /align:left/i ? @align = "left" : @align = "" super end @@ -29,7 +31,7 @@ module Jekyll output = super if output.join =~ /\{"\s*(.+)\s*"\}/ @quote = $1 - "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" + "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. else return "Surround your pullquote like this {\" text to be quoted \"}" end From ce6604a15e61c1bf931b2d094c5cf30804414fa6 Mon Sep 17 00:00:00 2001 From: strand Date: Tue, 11 Oct 2011 16:09:38 -0700 Subject: [PATCH 22/84] Edited .themes/classic/sass/base/_typography.scss via GitHub --- .themes/classic/sass/base/_typography.scss | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss index ef83065..d4b59ad 100644 --- a/.themes/classic/sass/base/_typography.scss +++ b/.themes/classic/sass/base/_typography.scss @@ -115,7 +115,7 @@ blockquote { } } -.has-pullquote:before { +.has-pullquote:before, .has-pullquoteleft:before { /* Reset metrics. */ padding: 0; border: none; @@ -134,6 +134,15 @@ blockquote { font-size: 1.4em; line-height: 1.45em; } + +.has-pullquoteleft:before { + + /* Make left pullquotes align properly. */ + float: left; + margin: .5em 1.5em 1em 0; + +} + /* @extend this to force long lines of continuous text to wrap */ .force-wrap { white-space: -moz-pre-wrap; From cae964e87513a5afc9763a83c21bbe59159d4acb Mon Sep 17 00:00:00 2001 From: B Strand Date: Wed, 12 Oct 2011 11:14:07 -0700 Subject: [PATCH 23/84] Updated pullquote.rb to use a vernacular similar to the image tag. --- plugins/pullquote.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 6d175e8..5dd6a55 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -17,13 +17,14 @@ # #

# -# Strand's modification adds the ability to call this plugin with {% pullquote align:left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. +# Strand's modification adds the ability to call this plugin with {% pullquote left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. +# Note: this version of the plugin now creates pullquotes with the class of pullquote-right by default module Jekyll class PullquoteTag < Liquid::Block def initialize(tag_name, markup, tokens) - markup =~ /align:left/i ? @align = "left" : @align = "" + markup =~ /left/i ? @align = "left" : @align = "right" super end @@ -31,7 +32,7 @@ module Jekyll output = super if output.join =~ /\{"\s*(.+)\s*"\}/ @quote = $1 - "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. + "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. else return "Surround your pullquote like this {\" text to be quoted \"}" end From 490b2593ec8e912b042f49966a80c37f0026e0d9 Mon Sep 17 00:00:00 2001 From: B Strand Date: Wed, 12 Oct 2011 11:17:24 -0700 Subject: [PATCH 24/84] Renamed has-pullquote and has-pullquoteleft classes to pullquote-right and pullquote-left (I suppose a less stylistic naming convention might pullquote-default and pullquote-alternate.) --- .themes/classic/sass/base/_typography.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss index d4b59ad..f248c2e 100644 --- a/.themes/classic/sass/base/_typography.scss +++ b/.themes/classic/sass/base/_typography.scss @@ -115,7 +115,7 @@ blockquote { } } -.has-pullquote:before, .has-pullquoteleft:before { +.pullquote-right:before, .pullquote-left:before { /* Reset metrics. */ padding: 0; border: none; @@ -135,7 +135,7 @@ blockquote { line-height: 1.45em; } -.has-pullquoteleft:before { +.pullquote-left:before { /* Make left pullquotes align properly. */ float: left; From f6fb11a37571b48844c488bc351dd78747ee99bd Mon Sep 17 00:00:00 2001 From: B Strand Date: Wed, 12 Oct 2011 13:25:51 -0700 Subject: [PATCH 25/84] Added class='citation' to blockquotes generated by the blockquote plugin to differentiate their style from the style of an html or markdown blockquote. --- plugins/blockquote.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index a0bf12c..f4f57da 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -71,7 +71,7 @@ module Jekyll else "#{quote}
#{author}
" end - "
#{blockquote}
" + "
#{blockquote}
" end def paragraphize(input) From 5b0486ced124c08ca017b20f584764bab4c5ff0e Mon Sep 17 00:00:00 2001 From: B Strand Date: Wed, 12 Oct 2011 13:28:58 -0700 Subject: [PATCH 26/84] Separated citation style from the general blockquote style. The general blockquote style is great for nesting and indentation, while the citation is excellent for quote attribution. --- .themes/classic/sass/base/_typography.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss index f248c2e..ec99288 100644 --- a/.themes/classic/sass/base/_typography.scss +++ b/.themes/classic/sass/base/_typography.scss @@ -96,13 +96,17 @@ small { font-size: .8em; } big { font-size: 1.2em; } -blockquote { +blockquote { $bq-margin: 1.2em; + padding-left: 1em; +} + +blockquote.citation { + font-style: italic; position: relative; font-size: 1.2em; - line-height: 1.5em; - padding-left: 1em; + line-height: 1.5em; border-left: 4px solid rgba($text-color-light, .5); cite { font-style: italic; From d983e3eb31cc80406a28ab566f78e52b90c56e93 Mon Sep 17 00:00:00 2001 From: B Strand Date: Thu, 13 Oct 2011 11:30:25 -0700 Subject: [PATCH 27/84] Reverted previous commit to separate that change to a different pull request. --- plugins/blockquote.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index f4f57da..a0bf12c 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -71,7 +71,7 @@ module Jekyll else "#{quote}
#{author}
" end - "
#{blockquote}
" + "
#{blockquote}
" end def paragraphize(input) From 2e7bc43cf7d3d0b11381ad131baae870f64f2d71 Mon Sep 17 00:00:00 2001 From: B Strand Date: Thu, 13 Oct 2011 11:32:58 -0700 Subject: [PATCH 28/84] Reverted previous commit. --- .themes/classic/sass/base/_typography.scss | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss index ec99288..f248c2e 100644 --- a/.themes/classic/sass/base/_typography.scss +++ b/.themes/classic/sass/base/_typography.scss @@ -96,17 +96,13 @@ small { font-size: .8em; } big { font-size: 1.2em; } -blockquote { +blockquote { $bq-margin: 1.2em; - padding-left: 1em; -} - -blockquote.citation { - font-style: italic; position: relative; font-size: 1.2em; - line-height: 1.5em; + line-height: 1.5em; + padding-left: 1em; border-left: 4px solid rgba($text-color-light, .5); cite { font-style: italic; From fe19c2aaae10c8e1029282a67d3dc268ce169fd0 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 11:43:55 +0200 Subject: [PATCH 29/84] Removes duplicate mkdir_p --- Rakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Rakefile b/Rakefile index 234e65a..fd0b58b 100644 --- a/Rakefile +++ b/Rakefile @@ -101,7 +101,6 @@ task :new_post, :title do |t, args| end puts "Creating new post: #{filename}" open(filename, 'w') do |post| - system "mkdir -p #{source_dir}/#{posts_dir}/"; post.puts "---" post.puts "layout: post" post.puts "title: \"#{title.gsub(/&/,'&').titlecase}\"" From 4b87a2fb7d08db399552bff7d1a574d7547c1664 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 11:49:18 +0200 Subject: [PATCH 30/84] Removes 'titlecase' from page name, fixes #202 --- Rakefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index fd0b58b..05b9c30 100644 --- a/Rakefile +++ b/Rakefile @@ -91,7 +91,6 @@ end desc "Begin a new post in #{source_dir}/#{posts_dir}" task :new_post, :title do |t, args| raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) - require './plugins/titlecase.rb' mkdir_p "#{source_dir}/#{posts_dir}" args.with_defaults(:title => 'new-post') title = args.title @@ -103,7 +102,7 @@ task :new_post, :title do |t, args| open(filename, 'w') do |post| post.puts "---" post.puts "layout: post" - post.puts "title: \"#{title.gsub(/&/,'&').titlecase}\"" + post.puts "title: \"#{title.gsub(/&/,'&')}\"" post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" post.puts "comments: true" post.puts "categories: " @@ -115,7 +114,6 @@ end desc "Create a new page in #{source_dir}/(filename)/index.#{new_page_ext}" task :new_page, :filename do |t, args| raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) - require './plugins/titlecase.rb' args.with_defaults(:filename => 'new-page') page_dir = source_dir if args.filename =~ /(^.+\/)?([\w_-]+)(\.)?(.+)?/ @@ -132,7 +130,7 @@ task :new_page, :filename do |t, args| open(file, 'w') do |page| page.puts "---" page.puts "layout: page" - page.puts "title: \"#{$2.gsub(/[-_]/, ' ').titlecase}\"" + page.puts "title: \"#{$2.gsub(/[-_]/, ' ')}\"" page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" page.puts "comments: true" page.puts "sharing: true" From d98a4de07ec8727b10c3f059c1fbee3e19d01761 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 11:57:29 +0200 Subject: [PATCH 31/84] Makes titlecase of page/post titles configurable --- .themes/classic/source/_includes/article.html | 4 ++-- .themes/classic/source/_layouts/page.html | 2 +- _config.yml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.themes/classic/source/_includes/article.html b/.themes/classic/source/_includes/article.html index 79e2652..9db0745 100644 --- a/.themes/classic/source/_includes/article.html +++ b/.themes/classic/source/_includes/article.html @@ -1,9 +1,9 @@ {% unless page.no_header %}
{% if index %} -

{{ post.title | titlecase }}

+

{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}

{% else %} -

{{ page.title | titlecase }}

+

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

{% endif %} {% unless page.meta == false %}

diff --git a/.themes/classic/source/_layouts/page.html b/.themes/classic/source/_layouts/page.html index 4edd3ed..8ba6ec9 100644 --- a/.themes/classic/source/_layouts/page.html +++ b/.themes/classic/source/_layouts/page.html @@ -6,7 +6,7 @@ layout: default

{% if page.title %}
-

{{ page.title | titlecase }}

+

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

{% if page.date %}

{% include post/date.html %}{{ time }}

{% endif %}
{% endif %} diff --git a/_config.yml b/_config.yml index 26881bc..f90307a 100644 --- a/_config.yml +++ b/_config.yml @@ -34,6 +34,8 @@ pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/ recent_posts: 5 # Posts in the sidebar Recent Posts section excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles +titlecase: true # Converts page and post titles to tilecase + # list each of the sidebar modules you want to include, in the order you want them to appear. # To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html] From 1772a8af8f22f2f89d263285be2815ebad6189fa Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 12:02:14 +0200 Subject: [PATCH 32/84] Removes also leading tab from backtick codeblock --- plugins/backtick_code_block.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb index 6243de6..40e7900 100644 --- a/plugins/backtick_code_block.rb +++ b/plugins/backtick_code_block.rb @@ -10,7 +10,7 @@ module BacktickCodeBlock @lang = nil @url = nil @title = nil - input.gsub /^`{3} *([^\n]+)?\n(.+?)\n`{3}/m do + input.gsub(/^`{3} *([^\n]+)?\n(.+?)\n`{3}/m) do @options = $1 || '' str = $2 @@ -22,8 +22,8 @@ module BacktickCodeBlock @caption = "
#{$2}
" end - if str.match(/\A {4}/) - str = str.gsub /^ {4}/, '' + if str.match(/\A( {4}|\t)/) + str = str.gsub(/^( {4}|\t)/, '') end if @lang.nil? || @lang == 'plain' code = tableize_code(str.gsub('<','<').gsub('>','>')) From 82942bd0885afc343e8c6bd14fd3e117b2d6c05a Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 13:07:31 +0200 Subject: [PATCH 33/84] Replaces system call with cross-platform cp_r, fixes #200 --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 05b9c30..54f98d1 100644 --- a/Rakefile +++ b/Rakefile @@ -230,7 +230,7 @@ multitask :push do (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } Rake::Task[:copydot].invoke(public_dir, deploy_dir) puts "\n## copying #{public_dir} to #{deploy_dir}" - system "cp -R #{public_dir}/* #{deploy_dir}" + cp_r "#{public_dir}/*", deploy_dir cd "#{deploy_dir}" do system "git add ." system "git add -u" From 21803814bc2d30660fe7e83fb6894c37ea886201 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 13:37:06 +0200 Subject: [PATCH 34/84] Adds parameter for left aligned pullquotes, fixes #215 --- .themes/classic/sass/base/_typography.scss | 5 ++--- plugins/pullquote.rb | 12 +++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.themes/classic/sass/base/_typography.scss b/.themes/classic/sass/base/_typography.scss index f248c2e..6055675 100644 --- a/.themes/classic/sass/base/_typography.scss +++ b/.themes/classic/sass/base/_typography.scss @@ -115,7 +115,8 @@ blockquote { } } -.pullquote-right:before, .pullquote-left:before { +.pullquote-right:before, +.pullquote-left:before { /* Reset metrics. */ padding: 0; border: none; @@ -136,11 +137,9 @@ blockquote { } .pullquote-left:before { - /* Make left pullquotes align properly. */ float: left; margin: .5em 1.5em 1em 0; - } /* @extend this to force long lines of continuous text to wrap */ diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 5dd6a55..cf8d22f 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -13,18 +13,20 @@ #

# # When writing longform posts, I find it helpful to include pullquotes, which help those scanning a post discern whether or not a post is helpful. -# It is important to note, pullquotes are merely visual in presentation and should not appear twice in the text. This is why a CSS only approach # for styling pullquotes is prefered. +# It is important to note, pullquotes are merely visual in presentation and should not appear twice in the text. This is why a CSS only approach +# for styling pullquotes is prefered. # #

# -# Strand's modification adds the ability to call this plugin with {% pullquote left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. -# Note: this version of the plugin now creates pullquotes with the class of pullquote-right by default +# {% pullquote left %} will create a left-aligned pullquote instead. +# +# Note: this plugin now creates pullquotes with the class of pullquote-right by default module Jekyll class PullquoteTag < Liquid::Block def initialize(tag_name, markup, tokens) - markup =~ /left/i ? @align = "left" : @align = "right" + @align = (markup =~ /left/i) ? "left" : "right" super end @@ -32,7 +34,7 @@ module Jekyll output = super if output.join =~ /\{"\s*(.+)\s*"\}/ @quote = $1 - "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. + "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" else return "Surround your pullquote like this {\" text to be quoted \"}" end From 2812bf7c3e4a0496e48767f2368633b31a373e5f Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 14:27:21 +0200 Subject: [PATCH 35/84] Adds prev/next link below post, fixes #218 --- .themes/classic/sass/partials/_blog.scss | 4 +++- .themes/classic/source/_layouts/post.html | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.themes/classic/sass/partials/_blog.scss b/.themes/classic/sass/partials/_blog.scss index 88c71e9..63e4ee4 100644 --- a/.themes/classic/sass/partials/_blog.scss +++ b/.themes/classic/sass/partials/_blog.scss @@ -73,7 +73,9 @@ article { @extend .sans; p.meta { margin-bottom: .8em; - font-size: .85em; + font-size: .85em + clear: both; + overflow: hidden; } .byline + time:before, time +time:before, .comments:before, .byline ~ .categories:before { @extend .separator; diff --git a/.themes/classic/source/_layouts/post.html b/.themes/classic/source/_layouts/post.html index 3b1208d..f61d52a 100644 --- a/.themes/classic/source/_layouts/post.html +++ b/.themes/classic/source/_layouts/post.html @@ -15,6 +15,14 @@ single: true {% unless page.sharing == false %} {% include post/sharing.html %} {% endunless %} +

+ {% if page.previous.url %} + « {{page.previous.title}} + {% endif %} + {% if page.next.url %} + {{page.next.title}} » + {% endif %} +

{% if site.disqus_short_name and page.comments == true %} From b1ad2a3d8a82c6f0c4d15f2058d57cb51ec90b60 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 14:45:35 +0200 Subject: [PATCH 36/84] Fixes solarized colors, fixes #219 --- .themes/classic/sass/base/_solarized.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.themes/classic/sass/base/_solarized.scss b/.themes/classic/sass/base/_solarized.scss index 8903887..45d8fc5 100644 --- a/.themes/classic/sass/base/_solarized.scss +++ b/.themes/classic/sass/base/_solarized.scss @@ -4,8 +4,8 @@ $base01: #586e75 !default; //darkest gray $base00: #657b83 !default; //dark gray $base0: #839496 !default; //medium gray $base1: #93a1a1 !default; //medium light gray -$base2: #f2f2f2 !default; //cream -$base3: #ffffff !default; //white +$base2: #eee8d5 !default; //cream +$base3: #fdf6e3 !default; //white $solar-yellow: #b58900 !default; $solar-orange: #cb4b16 !default; $solar-red: #dc322f !default; From fc138b2e35c009df5fc84c361263172b5a867dc7 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 16:22:37 +0200 Subject: [PATCH 37/84] Adds more flexibility to :new_page task Page filenames/directories are lowercased and sanitized by default to allow a greater flexibility: - new_page["/path/to/file"] # => source/path/to/file/index.markdown - new_page["path/to/file"] # => source/path/to/file/index.markdown - new_page["my path/my file"] # => source/my-path/my-file/index.markdown - new_page["lorem.ipsum.dolor"] # => source/lorem-dot-ipsum.dolor - new_page["Questions & Answers"] # => source/questions-and-answers/index.markdown --- Rakefile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Rakefile b/Rakefile index 54f98d1..6f95581 100644 --- a/Rakefile +++ b/Rakefile @@ -115,14 +115,21 @@ desc "Create a new page in #{source_dir}/(filename)/index.#{new_page_ext}" task :new_page, :filename do |t, args| raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) args.with_defaults(:filename => 'new-page') - page_dir = source_dir - if args.filename =~ /(^.+\/)?([\w_-]+)(\.)?(.+)?/ - page_dir += $4 ? "/#{$1}" : "/#{$1}#{$2}/" - name = $4 ? $2 : "index" - extension = $4 || "#{new_page_ext}" - filename = "#{name}.#{extension}" + page_dir = [source_dir] + if args.filename.downcase =~ /(^.+\/)?(.+)/ + filename, dot, extension = $2.rpartition('.').reject(&:empty?) # Get filename and extension + title = filename + page_dir.concat($1.downcase.sub(/^\//, '').split('/')) unless $1.nil? # Add path to page_dir Array + if extension.nil? + page_dir << filename + filename = "index" + end + extension ||= new_page_ext + page_dir = page_dir.map! { |d| d = d.to_url }.join('/') # Sanitize path + filename = filename.downcase.to_url + mkdir_p page_dir - file = page_dir + filename + file = "#{page_dir}/#{filename}.#{extension}" if File.exist?(file) abort("rake aborted!") if ask("#{file} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' end @@ -130,7 +137,7 @@ task :new_page, :filename do |t, args| open(file, 'w') do |page| page.puts "---" page.puts "layout: page" - page.puts "title: \"#{$2.gsub(/[-_]/, ' ')}\"" + page.puts "title: \"#{title}\"" page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}" page.puts "comments: true" page.puts "sharing: true" From 6d0ee690911da58c1fc24aa11fa7cbf2cd12eeaf Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Sun, 16 Oct 2011 23:28:37 +0100 Subject: [PATCH 38/84] fix typo in scss template --- .themes/classic/sass/partials/_blog.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.themes/classic/sass/partials/_blog.scss b/.themes/classic/sass/partials/_blog.scss index 63e4ee4..2c1358d 100644 --- a/.themes/classic/sass/partials/_blog.scss +++ b/.themes/classic/sass/partials/_blog.scss @@ -73,7 +73,7 @@ article { @extend .sans; p.meta { margin-bottom: .8em; - font-size: .85em + font-size: .85em; clear: both; overflow: hidden; } From ffa68a1fe3585237f1a63fdffcd8d3d929e2b10e Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Mon, 17 Oct 2011 08:18:41 +0200 Subject: [PATCH 39/84] Fixes typo in :push task --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 54f98d1..7d7f6d8 100644 --- a/Rakefile +++ b/Rakefile @@ -230,7 +230,7 @@ multitask :push do (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } Rake::Task[:copydot].invoke(public_dir, deploy_dir) puts "\n## copying #{public_dir} to #{deploy_dir}" - cp_r "#{public_dir}/*", deploy_dir + cp_r "#{public_dir}/.", deploy_dir cd "#{deploy_dir}" do system "git add ." system "git add -u" From 1362e9d57bb936b4762aed946a7d51bf3ee3ac90 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Mon, 17 Oct 2011 18:50:28 +0200 Subject: [PATCH 40/84] Removes