From 1a1c8681a43b205f9ef8912f15f7f0f6e33ee3ea Mon Sep 17 00:00:00 2001 From: Joel Clermont Date: Fri, 22 Mar 2013 22:57:55 -0300 Subject: Enable inline PHP syntax highlighting Pygments has a "startinline" option which is only relevant for the PhpLexer. It allows syntax highlighting without the opening lang, :formatter => 'html', :options => {:encoding => 'utf-8'}) + highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8', :startinline => true}) rescue MentosError raise "Pygments can't parse unknown language: #{lang}." end File.open(path, 'w') {|f| f.print(highlighted_code) } end else - highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8'}) + highlighted_code = Pygments.highlight(code, :lexer => lang, :formatter => 'html', :options => {:encoding => 'utf-8', :startinline => true}) end highlighted_code end -- cgit v1.2.1 From 6d3eb3fed6755f5ede69ac287d4e2452bfc3a824 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Thu, 23 May 2013 21:43:18 +0200 Subject: Added !default to $img-border --- .themes/classic/sass/base/_theme.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1 From f5bb4dd89ea64181910acb8ef0df5ae84644b75d Mon Sep 17 00:00:00 2001 From: erizhang Date: Fri, 31 May 2013 11:19:47 +0800 Subject: add https protocol supporting during rake setup_github_pages --- Rakefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index a57a56f6..b9daf00c 100644 --- a/Rakefile +++ b/Rakefile @@ -305,9 +305,15 @@ task :setup_github_pages, :repo do |t, args| else puts "Enter the read/write url for your repository" 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] + 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? -- cgit v1.2.1 From 46be4c8fc4948f3050a20de59376d46276f9673e Mon Sep 17 00:00:00 2001 From: Michael Buffington Date: Tue, 11 Jun 2013 15:37:15 -0700 Subject: Adjusted JsFiddle plugin to detect jsFiddle versions. Prior to this change, {% jsFiddle ccWP7/5 result,js,html %} wouldn't render the desired tab order properly since the regex pattern was being capturing the /5 as part of the first of the tabs. --- plugins/jsfiddle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb index a80becb3..9dcf57e8 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 /(?\w+)(?:\s+(?[\w,]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup + if /(?\w+)(?:\s+(?[\w,\/]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup @fiddle = fiddle @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' @skin = (skin unless skin == 'default') || 'light' -- cgit v1.2.1 From a2ee7a0af13216e8c68882460350680d7048bb7e Mon Sep 17 00:00:00 2001 From: Michael Buffington Date: Tue, 11 Jun 2013 16:00:14 -0700 Subject: Revised the regex for JsFiddle plugin after further testing. --- plugins/jsfiddle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jsfiddle.rb b/plugins/jsfiddle.rb index 9dcf57e8..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 /(?\w+)(?:\s+(?[\w,\/]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup + if /(?\w+\/?\d?)(?:\s+(?[\w,]+))?(?:\s+(?\w+))?(?:\s+(?\w+))?(?:\s+(?\w+))?/ =~ markup @fiddle = fiddle @sequence = (sequence unless sequence == 'default') || 'js,resources,html,css,result' @skin = (skin unless skin == 'default') || 'light' -- cgit v1.2.1 From 3cac6b9a16cc0527661ca2de59977cac3bbede6e Mon Sep 17 00:00:00 2001 From: Marcus Young Date: Sat, 15 Jun 2013 12:58:52 -0400 Subject: The gist hashes have changed. They include letters now --- plugins/gist_tag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1 From bc674751486a2a5d423e6c6a0aa8778da3c73231 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 23 Jun 2013 18:05:40 -0500 Subject: Github Pages deployment is now using `git add -A` for compatability with Git 1.8.2+ --- Rakefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index b9daf00c..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 -- cgit v1.2.1 From 27dcfa1a510cece7ede8ad26fd0cfa475552b7ea Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Tue, 25 Jun 2013 18:29:28 -0400 Subject: Use protocol relative URL for Twitter --- .themes/classic/source/_includes/twitter_sharing.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); })(); -- cgit v1.2.1 From 09789773eb0fc4691c6054d5f2b16d0f3b16776a Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Tue, 25 Jun 2013 18:34:06 -0400 Subject: Fix second Twitter URL to be protocol relative --- .themes/classic/source/_includes/post/sharing.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@