Skip to content

Commit f7c7a91

Browse files
committed
2 parents a644c33 + ff1b10d commit f7c7a91

6 files changed

Lines changed: 19 additions & 9 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
2-
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
3-
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
2+
<link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
3+
<link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">

README.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Octopress is [Jekyll](https://github.com/mojombo/jekyll) blogging at its finest.
1313
## Documentation
1414

1515
Check out [Octopress.org](http://octopress.org/docs) for guides and documentation.
16-
16+
It should all apply to our current stable version (found in the `master`
17+
branch). If this is not the case, [please submit a
18+
fix to our docs repo](https://github.com/octopress/docs).
1719

1820
## Contributing
1921

Rakefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ new_post_ext = "markdown" # default new post file extension when using the n
2727
new_page_ext = "markdown" # default new page file extension when using the new_page task
2828
server_port = "4000" # port for preview server eg. localhost:4000
2929

30+
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
31+
puts '## Set the codepage to 65001 for Windows machines'
32+
`chcp 65001`
33+
end
3034

3135
desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
3236
task :install, :theme do |t, args|
@@ -183,8 +187,8 @@ task :update_style, :theme do |t, args|
183187
end
184188
mv "sass", "sass.old"
185189
puts "## Moved styles into sass.old/"
186-
cp_r "#{themes_dir}/"+theme+"/sass/", "sass"
187-
cp_r "sass/custom/.", "sass.old/custom"
190+
cp_r "#{themes_dir}/"+theme+"/sass/", "sass", :remove_destination=>true
191+
cp_r "sass.old/custom/.", "sass/custom/", :remove_destination=>true
188192
puts "## Updated Sass ##"
189193
end
190194

@@ -257,8 +261,8 @@ multitask :push do
257261
cp_r "#{public_dir}/.", deploy_dir
258262
cd "#{deploy_dir}" do
259263
system "git add -A"
260-
puts "\n## Commiting: Site updated at #{Time.now.utc}"
261264
message = "Site updated at #{Time.now.utc}"
265+
puts "\n## Committing: #{message}"
262266
system "git commit -m \"#{message}\""
263267
puts "\n## Pushing generated #{deploy_dir} website"
264268
system "git push origin #{deploy_branch}"

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ url: http://yoursite.com
66
title: My Octopress Blog
77
subtitle: A blogging framework for hackers.
88
author: Your Name
9-
simple_search: http://google.com/search
9+
simple_search: https://www.google.com/search
1010
description:
1111

1212
# Default date format is "ordinal" (resulting in "July 22nd 2007")

plugins/gist_tag.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ def get_gist_from_web(gist, file)
7878
gist_url = get_gist_url_for(gist, file)
7979
data = get_web_content(gist_url)
8080

81-
if data.code.to_i == 302
81+
locations = Array.new
82+
while (data.code.to_i == 301 || data.code.to_i == 302)
8283
data = handle_gist_redirecting(data)
84+
break if locations.include? data.header['Location']
85+
locations << data.header['Location']
8386
end
8487

8588
if data.code.to_i != 200
@@ -95,6 +98,7 @@ def handle_gist_redirecting(data)
9598
if redirected_url.nil? || redirected_url.empty?
9699
raise ArgumentError, "GitHub replied with a 302 but didn't provide a location in the response headers."
97100
end
101+
98102
get_web_content(redirected_url)
99103
end
100104

plugins/octopress_filters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def cdata_escape(input)
7878
# Replaces relative urls with full urls
7979
def expand_urls(input, url='')
8080
url ||= '/'
81-
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\"'>]*)/ do
81+
input.gsub /(\s+(href|src)\s*=\s*["|']{1})(\/[^\/>]{1}[^\"'>]*)/ do
8282
$1+url+$3
8383
end
8484
end

0 commit comments

Comments
 (0)