From b5cec7d33569772b68d6148eb97894ac4b14ec81 Mon Sep 17 00:00:00 2001
From: Derek Gottlieb
Date: Sat, 28 May 2016 13:51:13 -0500
Subject: [PATCH 01/22] lib/jekyll/theme.rb passing rubocop
---
.rubocop.yml | 1 -
lib/jekyll/theme.rb | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.rubocop.yml b/.rubocop.yml
index 84c8d1b7..2665a743 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -16,7 +16,6 @@ AllCops:
- lib/jekyll/renderer.rb
- lib/jekyll/site.rb
- lib/jekyll/static_file.rb
- - lib/jekyll/theme.rb
- lib/jekyll/url.rb
- lib/jekyll/utils.rb
- lib/jekyll.rb
diff --git a/lib/jekyll/theme.rb b/lib/jekyll/theme.rb
index ed9cc68d..90536de7 100644
--- a/lib/jekyll/theme.rb
+++ b/lib/jekyll/theme.rb
@@ -27,7 +27,7 @@ module Jekyll
def configure_sass
return unless sass_path
- require 'sass'
+ require "sass"
Sass.load_paths << sass_path
end
@@ -38,7 +38,7 @@ module Jekyll
return unless resolved_dir
path = Jekyll.sanitized_path(root, resolved_dir)
- path if Dir.exists?(path)
+ path if Dir.exist?(path)
end
def realpath_for(folder)
@@ -50,7 +50,8 @@ module Jekyll
def gemspec
@gemspec ||= Gem::Specification.find_by_name(name)
rescue Gem::LoadError
- raise Jekyll::Errors::MissingDependencyException, "The #{name} theme could not be found."
+ raise Jekyll::Errors::MissingDependencyException,
+ "The #{name} theme could not be found."
end
end
end
From 03f7bc1a8c802e095aed58efe758bbc8b71e30ec Mon Sep 17 00:00:00 2001
From: Derek Gottlieb
Date: Sat, 28 May 2016 17:15:33 -0500
Subject: [PATCH 02/22] lib/jekyll/url.rb passing rubocop
---
.rubocop.yml | 1 -
lib/jekyll/url.rb | 24 ++++++++++++------------
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/.rubocop.yml b/.rubocop.yml
index 2665a743..8189e48e 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -16,7 +16,6 @@ AllCops:
- lib/jekyll/renderer.rb
- lib/jekyll/site.rb
- lib/jekyll/static_file.rb
- - lib/jekyll/url.rb
- lib/jekyll/utils.rb
- lib/jekyll.rb
- features/step_definitions.rb
diff --git a/lib/jekyll/url.rb b/lib/jekyll/url.rb
index 09975e3d..c736c0a6 100644
--- a/lib/jekyll/url.rb
+++ b/lib/jekyll/url.rb
@@ -1,4 +1,4 @@
-require 'uri'
+require "uri"
# Public: Methods that generate a URL for a resource such as a Post or a Page.
#
@@ -67,10 +67,10 @@ module Jekyll
def generate_url_from_hash(template)
@placeholders.inject(template) do |result, token|
- break result if result.index(':').nil?
+ break result if result.index(":").nil?
if token.last.nil?
- # Remove leading '/' to avoid generating urls with `//`
- result.gsub(/\/:#{token.first}/, '')
+ # Remove leading "/" to avoid generating urls with `//`
+ result.gsub(%r!/:#{token.first}!, "")
else
result.gsub(/:#{token.first}/, self.class.escape_path(token.last))
end
@@ -78,21 +78,21 @@ module Jekyll
end
def generate_url_from_drop(template)
- template.gsub(/:([a-z_]+)/.freeze) do |match|
- replacement = @placeholders.public_send(match.sub(':'.freeze, ''.freeze))
+ template.gsub(/:([a-z_]+)/) do |match|
+ replacement = @placeholders.public_send(match.sub(":".freeze, "".freeze))
if replacement.nil?
- ''.freeze
+ "".freeze
else
self.class.escape_path(replacement)
end
- end.gsub(/\/\//.freeze, '/'.freeze)
+ end.gsub(%r!//!, "/".freeze)
end
# Returns a sanitized String URL, stripping "../../" and multiples of "/",
# as well as the beginning "/" so we can enforce and ensure it.
def sanitize_url(str)
- "/" + str.gsub(/\/{2,}/, "/").gsub(/\.+\/|\A\/+/, "")
+ "/" + str.gsub(%r!/{2,}!, "/").gsub(%r!\.+\/|\A\/+!, "")
end
# Escapes a path to be a valid URL path segment
@@ -106,7 +106,7 @@ module Jekyll
#
# Returns the escaped path.
def self.escape_path(path)
- # Because URI.escape doesn't escape '?', '[' and ']' by default,
+ # Because URI.escape doesn't escape "?", "[" and "]" by default,
# specify unsafe string (except unreserved, sub-delims, ":", "@" and "/").
#
# URI path segment is defined in RFC 3986 as follows:
@@ -116,7 +116,7 @@ module Jekyll
# pct-encoded = "%" HEXDIG HEXDIG
# sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
# / "*" / "+" / "," / ";" / "="
- URI.escape(path, /[^a-zA-Z\d\-._~!$&'()*+,;=:@\/]/).encode('utf-8')
+ URI.escape(path, %r{[^a-zA-Z\d\-._~!$&'()*+,;=:@\/]}).encode("utf-8")
end
# Unescapes a URL path segment
@@ -130,7 +130,7 @@ module Jekyll
#
# Returns the unescaped path.
def self.unescape_path(path)
- URI.unescape(path.encode('utf-8'))
+ URI.unescape(path.encode("utf-8"))
end
end
end
From db6050768d461e3d340bb1f197a8e5716bfdf55b Mon Sep 17 00:00:00 2001
From: Derek Gottlieb
Date: Sat, 28 May 2016 19:23:23 -0500
Subject: [PATCH 03/22] Feedback for flubbed regex and prefer File's directory
check
---
lib/jekyll/theme.rb | 2 +-
lib/jekyll/url.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/jekyll/theme.rb b/lib/jekyll/theme.rb
index 90536de7..4cd2d163 100644
--- a/lib/jekyll/theme.rb
+++ b/lib/jekyll/theme.rb
@@ -38,7 +38,7 @@ module Jekyll
return unless resolved_dir
path = Jekyll.sanitized_path(root, resolved_dir)
- path if Dir.exist?(path)
+ path if File.directory?(path)
end
def realpath_for(folder)
diff --git a/lib/jekyll/url.rb b/lib/jekyll/url.rb
index c736c0a6..ba1abbd4 100644
--- a/lib/jekyll/url.rb
+++ b/lib/jekyll/url.rb
@@ -92,7 +92,7 @@ module Jekyll
# as well as the beginning "/" so we can enforce and ensure it.
def sanitize_url(str)
- "/" + str.gsub(%r!/{2,}!, "/").gsub(%r!\.+\/|\A\/+!, "")
+ "/" + str.gsub(%r!/{2,}!, "/").gsub(%r!\.+/|\A/+!, "")
end
# Escapes a path to be a valid URL path segment
From 5acac4a9259bd25e24eaa59fec42d7f1f37fb65a Mon Sep 17 00:00:00 2001
From: Sam Dutton
Date: Mon, 30 May 2016 09:20:42 +0100
Subject: [PATCH 04/22] Minor tweak to fix missing apostrophne
---
site/_docs/configuration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md
index 1ff520de..c125562d 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -462,7 +462,7 @@ defaults:
-Here, we are scoping the `values` to any file that exists in the scopes path. Since the path is set as an empty string, it will apply to **all files** in your project. You probably don't want to set a layout on every file in your project - like css files, for example - so you can also specify a `type` value under the `scope` key.
+Here, we are scoping the `values` to any file that exists in the path `scope`. Since the path is set as an empty string, it will apply to **all files** in your project. You probably don't want to set a layout on every file in your project - like css files, for example - so you can also specify a `type` value under the `scope` key.
{% highlight yaml %}
defaults:
From 899316f40134a69ccb2ace76495174b268cb4223 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Guitton?=
Date: Thu, 2 Jun 2016 18:43:57 +0200
Subject: [PATCH 05/22] Fix inaccurate HTTP response header field name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
§ Custom WEBrick headers default settings
Cf. ./lib/jekyll/commands/serve/servlet.rb
---
site/_docs/configuration.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md
index 1ff520de..5fe13ddb 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -397,7 +397,7 @@ webrick:
### Defaults
-We only provide one default and that's a Content-Type header that disables
+We only provide one default and that's a Cache-Control header that disables
caching in development so that you don't have to fight with Chrome's aggressive
caching when you are in development mode.
From c2ee828ad6cd23169ef13f279590f6e3e408cb88 Mon Sep 17 00:00:00 2001
From: Jens Willmer
Date: Thu, 2 Jun 2016 22:19:40 +0300
Subject: [PATCH 06/22] Added link to windows doc page
---
site/_docs/github-pages.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/site/_docs/github-pages.md b/site/_docs/github-pages.md
index cfe8822a..02ec1c8d 100644
--- a/site/_docs/github-pages.md
+++ b/site/_docs/github-pages.md
@@ -79,6 +79,16 @@ gem 'github-pages'
+
+
Installing github-pages
gem on Windows
+
+ While Windows is not officially supported, it is possible
+ to install github-pages
gem on Windows.
+ Special instructions can be found on our
+ Windows-specific docs page.
+
+
+
### User and Organization Pages
User and organization pages live in a special GitHub repository dedicated to
From bbbbb2e7044611a62fc7ea9def275767f9a837be Mon Sep 17 00:00:00 2001
From: Jens Willmer
Date: Thu, 2 Jun 2016 22:36:07 +0300
Subject: [PATCH 07/22] Installation instructions for github-pages gem
---
site/_docs/windows.md | 71 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/site/_docs/windows.md b/site/_docs/windows.md
index ec98dcde..06935863 100644
--- a/site/_docs/windows.md
+++ b/site/_docs/windows.md
@@ -44,3 +44,74 @@ with Windows. Add the following to the Gemfile for your site:
{% highlight ruby %}
gem 'wdm', '~> 0.1.0' if Gem.win_platform?
{% endhighlight %}
+
+### How to install github-gem
+
+This section is part of an article written by [Jens Willmer][jwillmerPost]. To follow the instructions you need to have [Chocolatey][] installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue.
+
+#### Install Ruby and Ruby development kit
+
+Open a command prompt and execute the following commands:
+
+ * `choco install ruby -version 2.2.4`
+ * `choco install ruby2.devkit` - _needed for compilation of json gem_
+
+#### Configure Ruby development kit
+
+The development kit did not set the environment path for Ruby so we need to do it.
+
+ * Open command prompt in `C:\tools\DevKit2`
+ * Execute `ruby dk.rb init` to create a file called `config.yml`
+ * Edit the `config.yml` file and include the path to Ruby `- C:/tools/ruby22`
+ * Execute the following command to set the path: `ruby dk.rb install`
+
+#### Nokogiri gem installation
+
+This gem is also needed in the github-gem and to get it running on Windows x64 we have to install a few things.
+
+
+**Note:** In the current [pre release][nokogiriFails] it works out of the box with Windows x64 but this version is not referenced in the github-gem.
+
+
+`cinst -Source "https://go.microsoft.com/fwlink/?LinkID=230477" libxml2`{:.language-ruby}
+
+`cinst -Source "https://go.microsoft.com/fwlink/?LinkID=230477" libxslt`{:.language-ruby}
+
+`cinst -Source "https://go.microsoft.com/fwlink/?LinkID=230477" libiconv`{:.language-ruby}
+
+```language-ruby
+ gem install nokogiri --^
+ --with-xml2-include=C:\Chocolatey\lib\libxml2.2.7.8.7\build\native\include^
+ --with-xml2-lib=C:\Chocolatey\lib\libxml2.redist.2.7.8.7\build\native\bin\v110\x64\Release\dynamic\cdecl^
+ --with-iconv-include=C:\Chocolatey\lib\libiconv.1.14.0.11\build\native\include^
+ --with-iconv-lib=C:\Chocolatey\lib\libiconv.redist.1.14.0.11\build\native\bin\v110\x64\Release\dynamic\cdecl^
+ --with-xslt-include=C:\Chocolatey\lib\libxslt.1.1.28.0\build\native\include^
+ --with-xslt-lib=C:\Chocolatey\lib\libxslt.redist.1.1.28.0\build\native\bin\v110\x64\Release\dynamic
+```
+
+#### Install github-gem
+
+ * Open command prompt and install [Bundler][]: `gem install bundler`
+ * Create a file called `Gemfile` without any extension in your root directory of your blog
+ * Copy & past the two lines into the file:
+
+
+```language-ruby
+source 'http://rubygems.org'
+gem 'github-pages'
+```
+
+ * **Note:** We use an unsecure connection because SSL throws exceptions in the version of Ruby
+ * Open a command prompt and install github-pages: `bundle install`
+
+
+After this process you should have github-pages installed on your system and you can host your blog again with `jekyll s`. \\
+There will be a warning on startup that you should include `gem 'wdm', '>= 0.1.0' if Gem.win_platform?` to your `Gemfile` but I could not get `jekyll s` working if I include that line so for the moment I ignore that warning.
+
+In the future the installation process of the github-gem should be as simple as the setup of the blog. But as long as the new version of the Nokogiri ([v1.6.8][nokogiriReleases]) is not stable and referenced, it is work to get it up and running on Windows.
+
+[jwillmerPost]: http://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46 "Installation instructions by Jens Willmer"
+[Chocolatey]: https://chocolatey.org/install "Package manager for Windows"
+[Bundler]: http://bundler.io/ "Ruby Dependencie Manager"
+[nokogiriReleases]: https://github.com/sparklemotion/nokogiri/releases "Nokogiri Releases"
+[nokogiriFails]: https://github.com/sparklemotion/nokogiri/issues/1456#issuecomment-206481794 "Nokogiri fails to install on Ruby 2.3 for Windows"
From d68ddf9dace0a7ddb1a10ecf1059d6a6ab519da4 Mon Sep 17 00:00:00 2001
From: Jens Willmer
Date: Thu, 2 Jun 2016 22:46:05 +0300
Subject: [PATCH 08/22] Included installation instructions
---
site/_docs/windows.md | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/site/_docs/windows.md b/site/_docs/windows.md
index 06935863..d3fd8254 100644
--- a/site/_docs/windows.md
+++ b/site/_docs/windows.md
@@ -10,12 +10,14 @@ knowledge and lessons that have been unearthed by Windows users.
## Installation
-Julian Thilo has written up instructions to get
-[Jekyll running on Windows][windows-installation] and it seems to work for most
-people. The instructions were written for Ruby 2.0.0, but should work for later
-versions [prior to 2.2][hitimes-issue].
+A quick way to install Jekyll it to follow the [installation instructions by David Burela](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/):
-Alternatively David Burela has written instructions on [how to install Jekyll via Chocolatey with 3 command prompt entries](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/).
+ 1. Install a package manager for Windows called [Chocolatey](https://chocolatey.org/install)
+ 2. Install Ruby via Chocolatey: `choco install ruby -y`
+ 3. Reopen a command prompt and install Jekyll: `gem install jekyll`
+
+For a more conventional way of installing Jekyll you can follow the [installation instruction by Julian Thilo][windows-installation]. The instructions were written for Ruby 2.0.0, but should work for later
+versions [prior to 2.2][hitimes-issue].
## Encoding
From 3a8025cb08ceb0b09c57780e0dee93cae18c199b Mon Sep 17 00:00:00 2001
From: Jens Willmer
Date: Thu, 2 Jun 2016 23:33:20 +0300
Subject: [PATCH 09/22] Changed github-gem to github-pages
The gem is technically called github-pages as noted by @parkr in the [pull request](https://github.com/jekyll/jekyll/pull/4977#discussion_r65610202)
---
site/_docs/windows.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/site/_docs/windows.md b/site/_docs/windows.md
index d3fd8254..02ea233d 100644
--- a/site/_docs/windows.md
+++ b/site/_docs/windows.md
@@ -47,7 +47,7 @@ with Windows. Add the following to the Gemfile for your site:
gem 'wdm', '~> 0.1.0' if Gem.win_platform?
{% endhighlight %}
-### How to install github-gem
+### How to install github-pages
This section is part of an article written by [Jens Willmer][jwillmerPost]. To follow the instructions you need to have [Chocolatey][] installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue.
@@ -69,10 +69,10 @@ The development kit did not set the environment path for Ruby so we need to do i
#### Nokogiri gem installation
-This gem is also needed in the github-gem and to get it running on Windows x64 we have to install a few things.
+This gem is also needed in the github-pages and to get it running on Windows x64 we have to install a few things.
-**Note:** In the current [pre release][nokogiriFails] it works out of the box with Windows x64 but this version is not referenced in the github-gem.
+**Note:** In the current [pre release][nokogiriFails] it works out of the box with Windows x64 but this version is not referenced in the github-pages.
`cinst -Source "https://go.microsoft.com/fwlink/?LinkID=230477" libxml2`{:.language-ruby}
@@ -91,7 +91,7 @@ This gem is also needed in the github-gem and to get it running on Windows x64 w
--with-xslt-lib=C:\Chocolatey\lib\libxslt.redist.1.1.28.0\build\native\bin\v110\x64\Release\dynamic
```
-#### Install github-gem
+#### Install github-pages
* Open command prompt and install [Bundler][]: `gem install bundler`
* Create a file called `Gemfile` without any extension in your root directory of your blog
@@ -110,7 +110,7 @@ gem 'github-pages'
After this process you should have github-pages installed on your system and you can host your blog again with `jekyll s`. \\
There will be a warning on startup that you should include `gem 'wdm', '>= 0.1.0' if Gem.win_platform?` to your `Gemfile` but I could not get `jekyll s` working if I include that line so for the moment I ignore that warning.
-In the future the installation process of the github-gem should be as simple as the setup of the blog. But as long as the new version of the Nokogiri ([v1.6.8][nokogiriReleases]) is not stable and referenced, it is work to get it up and running on Windows.
+In the future the installation process of the github-pages should be as simple as the setup of the blog. But as long as the new version of the Nokogiri ([v1.6.8][nokogiriReleases]) is not stable and referenced, it is work to get it up and running on Windows.
[jwillmerPost]: http://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46 "Installation instructions by Jens Willmer"
[Chocolatey]: https://chocolatey.org/install "Package manager for Windows"
From d6e58623c6107e51d42b0642065a44a9913896d9 Mon Sep 17 00:00:00 2001
From: Jens Willmer
Date: Fri, 3 Jun 2016 00:05:20 +0300
Subject: [PATCH 10/22] Fixed typo
---
site/_docs/windows.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/windows.md b/site/_docs/windows.md
index 02ea233d..ea4c0359 100644
--- a/site/_docs/windows.md
+++ b/site/_docs/windows.md
@@ -10,7 +10,7 @@ knowledge and lessons that have been unearthed by Windows users.
## Installation
-A quick way to install Jekyll it to follow the [installation instructions by David Burela](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/):
+A quick way to install Jekyll is to follow the [installation instructions by David Burela](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/):
1. Install a package manager for Windows called [Chocolatey](https://chocolatey.org/install)
2. Install Ruby via Chocolatey: `choco install ruby -y`
From 74d363f0808347f38320ddf30a114aa80f4a3a1d Mon Sep 17 00:00:00 2001
From: jekyllbot
Date: Thu, 2 Jun 2016 17:08:05 -0700
Subject: [PATCH 11/22] Update history to reflect merge of #4959 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 3f63fda8..15df2cd2 100644
--- a/History.markdown
+++ b/History.markdown
@@ -84,6 +84,7 @@
* Rubocop: Readers (#4932)
* rubocop: jekyll/lib/frontmatter_defaults.rb (#4974)
* rubocop: features/step_definitions.rb (#4956)
+ * Rubocop theme and url jekyll libs (#4959)
### Site Enhancements
From d725991237b75eca7ff5bf95f5b4d25739381c8f Mon Sep 17 00:00:00 2001
From: jekyllbot
Date: Thu, 2 Jun 2016 17:12:35 -0700
Subject: [PATCH 12/22] Update history to reflect merge of #4962 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 15df2cd2..c203eb13 100644
--- a/History.markdown
+++ b/History.markdown
@@ -129,6 +129,7 @@
* Corrected pagination docs for hidden: true feature (#4903)
* Remove a Broken Link for Refheap Plugin (#4971)
* Instructions on how to install github-gem on Windows (#4975)
+ * Minor tweak to fix missing apostrophne (#4962)
## 3.1.6 / 2016-05-19
From 6e504a0d2ea9803419c0ee16287072e8efcc1f39 Mon Sep 17 00:00:00 2001
From: jekyllbot
Date: Thu, 2 Jun 2016 18:01:55 -0700
Subject: [PATCH 13/22] Update history to reflect merge of #4977 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index c203eb13..99b5abe3 100644
--- a/History.markdown
+++ b/History.markdown
@@ -130,6 +130,7 @@
* Remove a Broken Link for Refheap Plugin (#4971)
* Instructions on how to install github-gem on Windows (#4975)
* Minor tweak to fix missing apostrophne (#4962)
+ * Instructions on how to install github-gem on Windows (v2) (#4977)
## 3.1.6 / 2016-05-19
From 712e77abd28c4c272aad8e1b604f06dd4a6be2c3 Mon Sep 17 00:00:00 2001
From: Praveen Kumar
Date: Fri, 3 Jun 2016 00:28:45 +0530
Subject: [PATCH 14/22] lib/jekyll.rb - fix offenses reported by rubocop method
set_timezone is ignored using rubocop:disable Style/AccessorMethodName
---
lib/jekyll.rb | 147 +++++++++++++++++++++++++-------------------------
1 file changed, 75 insertions(+), 72 deletions(-)
diff --git a/lib/jekyll.rb b/lib/jekyll.rb
index 676f6e71..db1e40cd 100644
--- a/lib/jekyll.rb
+++ b/lib/jekyll.rb
@@ -6,79 +6,79 @@ $LOAD_PATH.unshift File.dirname(__FILE__) # For use/testing when no gem is insta
#
# Returns nothing.
def require_all(path)
- glob = File.join(File.dirname(__FILE__), path, '*.rb')
+ glob = File.join(File.dirname(__FILE__), path, "*.rb")
Dir[glob].sort.each do |f|
require f
end
end
# rubygems
-require 'rubygems'
+require "rubygems"
# stdlib
require "pathutil"
-require 'forwardable'
-require 'fileutils'
-require 'time'
-require 'English'
-require 'pathname'
-require 'logger'
-require 'set'
+require "forwardable"
+require "fileutils"
+require "time"
+require "English"
+require "pathname"
+require "logger"
+require "set"
# 3rd party
-require 'safe_yaml/load'
-require 'liquid'
-require 'kramdown'
-require 'colorator'
+require "safe_yaml/load"
+require "liquid"
+require "kramdown"
+require "colorator"
SafeYAML::OPTIONS[:suppress_warnings] = true
module Jekyll
# internal requires
- autoload :Cleaner, 'jekyll/cleaner'
- autoload :Collection, 'jekyll/collection'
- autoload :Configuration, 'jekyll/configuration'
- autoload :Convertible, 'jekyll/convertible'
- autoload :Deprecator, 'jekyll/deprecator'
- autoload :Document, 'jekyll/document'
- autoload :Draft, 'jekyll/draft'
- autoload :EntryFilter, 'jekyll/entry_filter'
- autoload :Errors, 'jekyll/errors'
- autoload :Excerpt, 'jekyll/excerpt'
- autoload :External, 'jekyll/external'
- autoload :FrontmatterDefaults, 'jekyll/frontmatter_defaults'
- autoload :Hooks, 'jekyll/hooks'
- autoload :Layout, 'jekyll/layout'
- autoload :CollectionReader, 'jekyll/readers/collection_reader'
- autoload :DataReader, 'jekyll/readers/data_reader'
- autoload :LayoutReader, 'jekyll/readers/layout_reader'
- autoload :PostReader, 'jekyll/readers/post_reader'
- autoload :PageReader, 'jekyll/readers/page_reader'
- autoload :StaticFileReader, 'jekyll/readers/static_file_reader'
- autoload :LogAdapter, 'jekyll/log_adapter'
- autoload :Page, 'jekyll/page'
- autoload :PluginManager, 'jekyll/plugin_manager'
- autoload :Publisher, 'jekyll/publisher'
- autoload :Reader, 'jekyll/reader'
- autoload :Regenerator, 'jekyll/regenerator'
- autoload :RelatedPosts, 'jekyll/related_posts'
- autoload :Renderer, 'jekyll/renderer'
- autoload :LiquidRenderer, 'jekyll/liquid_renderer'
- autoload :Site, 'jekyll/site'
- autoload :StaticFile, 'jekyll/static_file'
- autoload :Stevenson, 'jekyll/stevenson'
- autoload :Theme, 'jekyll/theme'
- autoload :ThemeBuilder, 'jekyll/theme_builder'
- autoload :URL, 'jekyll/url'
- autoload :Utils, 'jekyll/utils'
- autoload :VERSION, 'jekyll/version'
+ autoload :Cleaner, "jekyll/cleaner"
+ autoload :Collection, "jekyll/collection"
+ autoload :Configuration, "jekyll/configuration"
+ autoload :Convertible, "jekyll/convertible"
+ autoload :Deprecator, "jekyll/deprecator"
+ autoload :Document, "jekyll/document"
+ autoload :Draft, "jekyll/draft"
+ autoload :EntryFilter, "jekyll/entry_filter"
+ autoload :Errors, "jekyll/errors"
+ autoload :Excerpt, "jekyll/excerpt"
+ autoload :External, "jekyll/external"
+ autoload :FrontmatterDefaults, "jekyll/frontmatter_defaults"
+ autoload :Hooks, "jekyll/hooks"
+ autoload :Layout, "jekyll/layout"
+ autoload :CollectionReader, "jekyll/readers/collection_reader"
+ autoload :DataReader, "jekyll/readers/data_reader"
+ autoload :LayoutReader, "jekyll/readers/layout_reader"
+ autoload :PostReader, "jekyll/readers/post_reader"
+ autoload :PageReader, "jekyll/readers/page_reader"
+ autoload :StaticFileReader, "jekyll/readers/static_file_reader"
+ autoload :LogAdapter, "jekyll/log_adapter"
+ autoload :Page, "jekyll/page"
+ autoload :PluginManager, "jekyll/plugin_manager"
+ autoload :Publisher, "jekyll/publisher"
+ autoload :Reader, "jekyll/reader"
+ autoload :Regenerator, "jekyll/regenerator"
+ autoload :RelatedPosts, "jekyll/related_posts"
+ autoload :Renderer, "jekyll/renderer"
+ autoload :LiquidRenderer, "jekyll/liquid_renderer"
+ autoload :Site, "jekyll/site"
+ autoload :StaticFile, "jekyll/static_file"
+ autoload :Stevenson, "jekyll/stevenson"
+ autoload :Theme, "jekyll/theme"
+ autoload :ThemeBuilder, "jekyll/theme_builder"
+ autoload :URL, "jekyll/url"
+ autoload :Utils, "jekyll/utils"
+ autoload :VERSION, "jekyll/version"
# extensions
- require 'jekyll/plugin'
- require 'jekyll/converter'
- require 'jekyll/generator'
- require 'jekyll/command'
- require 'jekyll/liquid_extensions'
+ require "jekyll/plugin"
+ require "jekyll/converter"
+ require "jekyll/generator"
+ require "jekyll/command"
+ require "jekyll/liquid_extensions"
require "jekyll/filters"
class << self
@@ -94,19 +94,20 @@ module Jekyll
# options with anything in _config.yml, and adding the given options on top.
#
# override - A Hash of config directives that override any options in both
- # the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
+ # the defaults and the config file.
+ # See Jekyll::Configuration::DEFAULTS for a
# list of option names and their defaults.
#
# Returns the final configuration Hash.
- def configuration(override = Hash.new)
+ def configuration(override = {})
config = Configuration.new
- unless override.delete('skip_config_files')
+ unless override.delete("skip_config_files")
config = config.read_config_files(config.config_files(override))
end
# Merge DEFAULTS < _config.yml < override
- Configuration.from(Utils.deep_merge_hashes(config, override)).tap do |config|
- set_timezone(config['timezone']) if config['timezone']
+ Configuration.from(Utils.deep_merge_hashes(config, override)).tap do |obj|
+ set_timezone(obj["timezone"]) if obj["timezone"]
end
end
@@ -115,9 +116,11 @@ module Jekyll
# timezone - the IANA Time Zone
#
# Returns nothing
+ # rubocop:disable Style/AccessorMethodName
def set_timezone(timezone)
- ENV['TZ'] = timezone
+ ENV["TZ"] = timezone
end
+ # rubocop:enable Style/AccessorMethodName
# Public: Fetch the logger instance for this Jekyll process.
#
@@ -154,11 +157,11 @@ module Jekyll
def sanitized_path(base_directory, questionable_path)
return base_directory if base_directory.eql?(questionable_path)
- questionable_path.insert(0, '/') if questionable_path.start_with?('~')
+ questionable_path.insert(0, "/") if questionable_path.start_with?("~")
clean_path = File.expand_path(questionable_path, "/")
- clean_path.sub!(/\A\w\:\//, '/')
+ clean_path.sub!(%r!\A\w:/!, "/")
- if clean_path.start_with?(base_directory.sub(/\A\w\:\//, '/'))
+ if clean_path.start_with?(base_directory.sub(%r!\A\w:/!, "/"))
clean_path
else
File.join(base_directory, clean_path)
@@ -166,17 +169,17 @@ module Jekyll
end
# Conditional optimizations
- Jekyll::External.require_if_present('liquid-c')
+ Jekyll::External.require_if_present("liquid-c")
end
end
require "jekyll/drops/drop"
require "jekyll/drops/document_drop"
-require_all 'jekyll/commands'
-require_all 'jekyll/converters'
-require_all 'jekyll/converters/markdown'
-require_all 'jekyll/drops'
-require_all 'jekyll/generators'
-require_all 'jekyll/tags'
+require_all "jekyll/commands"
+require_all "jekyll/converters"
+require_all "jekyll/converters/markdown"
+require_all "jekyll/drops"
+require_all "jekyll/generators"
+require_all "jekyll/tags"
-require 'jekyll-sass-converter'
+require "jekyll-sass-converter"
From 93f176f8c55ab35d5ec4f76ac0ab2e2517cc7cb2 Mon Sep 17 00:00:00 2001
From: Praveen Kumar
Date: Fri, 3 Jun 2016 00:29:49 +0530
Subject: [PATCH 15/22] .rubocop.yml - remove lib/jekyll.rb
---
.rubocop.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.rubocop.yml b/.rubocop.yml
index 6c441f9b..71a5571c 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -16,7 +16,6 @@ AllCops:
- lib/jekyll/site.rb
- lib/jekyll/static_file.rb
- lib/jekyll/utils.rb
- - lib/jekyll.rb
- bin/**/*
- benchmark/**/*
- script/**/*
From 1c6916f2378e8c40e7aaff627d430294c3085ee5 Mon Sep 17 00:00:00 2001
From: jekyllbot
Date: Thu, 2 Jun 2016 22:03:03 -0700
Subject: [PATCH 16/22] Update history to reflect merge of #4966 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 99b5abe3..7a07fbe5 100644
--- a/History.markdown
+++ b/History.markdown
@@ -85,6 +85,7 @@
* rubocop: jekyll/lib/frontmatter_defaults.rb (#4974)
* rubocop: features/step_definitions.rb (#4956)
* Rubocop theme and url jekyll libs (#4959)
+ * Rubocop jekyll.rb (#4966)
### Site Enhancements
From 59bd2587df2ccb01ed165123ae120d3737f4a40d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Guitton?=
Date: Fri, 3 Jun 2016 10:48:32 +0200
Subject: [PATCH 17/22] Amend WEBrick default headers documentation
---
site/_docs/configuration.md | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md
index 5fe13ddb..f313656e 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -383,7 +383,7 @@ before your site is served.
-## Custom WEBRick Headers
+## Custom WEBrick Headers
You can provide custom headers for your site by adding them to `_config.yml`
@@ -397,9 +397,10 @@ webrick:
### Defaults
-We only provide one default and that's a Cache-Control header that disables
-caching in development so that you don't have to fight with Chrome's aggressive
-caching when you are in development mode.
+We provide by default `Content-Type` and `Cache-Control` response headers: one
+dynamic in order to specify the nature of the data being served, the other
+static in order to disable caching so that you don't have to fight with Chrome's
+aggressive caching when you are in development mode.
## Specifying a Jekyll environment at build time
From b15423b6a99c1855a899453ceddbcdc138b72de9 Mon Sep 17 00:00:00 2001
From: jekyllbot
Date: Fri, 3 Jun 2016 08:12:06 -0700
Subject: [PATCH 18/22] Update history to reflect merge of #4976 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 7a07fbe5..da34cf51 100644
--- a/History.markdown
+++ b/History.markdown
@@ -132,6 +132,7 @@
* Instructions on how to install github-gem on Windows (#4975)
* Minor tweak to fix missing apostrophne (#4962)
* Instructions on how to install github-gem on Windows (v2) (#4977)
+ * Fix inaccurate HTTP response header field name (#4976)
## 3.1.6 / 2016-05-19
From 912e6b469a619be6eba37061f651be62e730a080 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Fri, 3 Jun 2016 13:47:35 -0700
Subject: [PATCH 19/22] Add post about GSoC project.
---
...-s-google-summer-of-code-projects.markdown | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
diff --git a/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown b/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
new file mode 100644
index 00000000..db19662c
--- /dev/null
+++ b/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
@@ -0,0 +1,19 @@
+---
+layout: news_item
+title: "Jekyll's Google Summer of Code Project: The CMS You Always Wanted"
+date: "2016-06-03 13:21:02 -0700"
+author: parkr
+categories: [community]
+---
+
+This year, Jekyll applied to be a part of [Google Summer of Code](https://summerofcode.withgoogle.com/how-it-works/). Students were able to propose any project related to Jekyll. With a gracious sponsorship from GitHub and the participation of myself, [@benbalter](https://github.com/benbalter) and [@jldec](https://github.com/jldec), Jekyll was able to accept two students for the 2016 season, [@mertkahyaoglu](https://github.com/mertkahyaoglu) and [@rush-skills](https://github.com/rush-skills).
+
+These students are working on a project that fills a huge need for the community: **a graphical solution for managing your site's content.** Current plans include a fully-integrated admin which spins up when you run `jekyll serve` and a web interface at an address like `http://localhost:4000/admin/`. The server implements a common interface which would make a hosted version to make updates to hosted content like a repository on GitHub very easy to write – simply implement the CRUD API and the web interface will happily use that instead.
+
+The strength of text files as the storage medium for content has been part of Jekyll's success. [Our homepage](/) lauds the absence of a traditional SQL database when using Jekyll – your content should be what demands your time, not pesky database downtime. Unfortunately, understanding of the structure of a Jekyll site takes some work, enough that for some users, it's prohibitive to using Jekyll to accomplish their publishing goals.
+
+Mert and Ankur both applied to take on this challenge and agreed to split the project, one taking on the web interface and the other taking on the backend. We're very excited to see a fully-functional CMS for Jekyll at the end of the summer produced by these excellent community members, and we hope you'll join us in cheering them on and sharing our gratitude for all their hard work.
+
+Thanks, as always, for being part of such a wonderful community that made this all possible. I'm honored to work with each of you to create something folks all around the globe find a joy to use. I look forward to our continued work to move Jekyll forward.
+
+As always, Happy Jekylling!
From 03c2811ae01d6e6b7fefc3c70b900b0ab82b4a69 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Fri, 3 Jun 2016 14:58:51 -0700
Subject: [PATCH 20/22] Use jekyll-mentions and restructure
---
Gemfile | 1 +
site/_config.yml | 1 +
...date-on-jekyll-s-google-summer-of-code-projects.markdown | 6 ++++--
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Gemfile b/Gemfile
index 54983415..253826aa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -86,4 +86,5 @@ group :site do
gem "jekyll-sitemap"
gem "jekyll-seo-tag", "~> 1.1"
gem "jekyll-avatar"
+ gem "jekyll-mentions"
end
diff --git a/site/_config.yml b/site/_config.yml
index e284a81b..0b69dc98 100644
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -32,3 +32,4 @@ gems:
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-avatar
+ - jekyll-mentions
diff --git a/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown b/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
index db19662c..f2407cb6 100644
--- a/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
+++ b/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
@@ -6,9 +6,11 @@ author: parkr
categories: [community]
---
-This year, Jekyll applied to be a part of [Google Summer of Code](https://summerofcode.withgoogle.com/how-it-works/). Students were able to propose any project related to Jekyll. With a gracious sponsorship from GitHub and the participation of myself, [@benbalter](https://github.com/benbalter) and [@jldec](https://github.com/jldec), Jekyll was able to accept two students for the 2016 season, [@mertkahyaoglu](https://github.com/mertkahyaoglu) and [@rush-skills](https://github.com/rush-skills).
+This year, Jekyll applied to be a part of [Google Summer of Code](https://summerofcode.withgoogle.com/how-it-works/). Students were able to propose any project related to Jekyll. With a gracious sponsorship from GitHub and the participation of myself, @benbalter and @jldec, Jekyll was able to accept two students for the 2016 season, @mertkahyaoglu and @rush-skills.
-These students are working on a project that fills a huge need for the community: **a graphical solution for managing your site's content.** Current plans include a fully-integrated admin which spins up when you run `jekyll serve` and a web interface at an address like `http://localhost:4000/admin/`. The server implements a common interface which would make a hosted version to make updates to hosted content like a repository on GitHub very easy to write – simply implement the CRUD API and the web interface will happily use that instead.
+These students are working on a project that fills a huge need for the community: **a graphical solution for managing your site's content.**
+
+Current plans include a fully-integrated admin which spins up when you run `jekyll serve` and a web interface at an address like `http://localhost:4000/admin/`. The server implements a common interface which would make a hosted version to make updates to hosted content like a repository on GitHub very easy to write – simply implement the CRUD API and the web interface will happily use that instead.
The strength of text files as the storage medium for content has been part of Jekyll's success. [Our homepage](/) lauds the absence of a traditional SQL database when using Jekyll – your content should be what demands your time, not pesky database downtime. Unfortunately, understanding of the structure of a Jekyll site takes some work, enough that for some users, it's prohibitive to using Jekyll to accomplish their publishing goals.
From b3583a4236cae37f38f5d04ab8ff274335715cdf Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Fri, 3 Jun 2016 16:41:35 -0700
Subject: [PATCH 21/22] werdz
---
...update-on-jekyll-s-google-summer-of-code-projects.markdown | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown b/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
index f2407cb6..0f4ce2de 100644
--- a/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
+++ b/site/_posts/2016-06-03-update-on-jekyll-s-google-summer-of-code-projects.markdown
@@ -8,9 +8,7 @@ categories: [community]
This year, Jekyll applied to be a part of [Google Summer of Code](https://summerofcode.withgoogle.com/how-it-works/). Students were able to propose any project related to Jekyll. With a gracious sponsorship from GitHub and the participation of myself, @benbalter and @jldec, Jekyll was able to accept two students for the 2016 season, @mertkahyaoglu and @rush-skills.
-These students are working on a project that fills a huge need for the community: **a graphical solution for managing your site's content.**
-
-Current plans include a fully-integrated admin which spins up when you run `jekyll serve` and a web interface at an address like `http://localhost:4000/admin/`. The server implements a common interface which would make a hosted version to make updates to hosted content like a repository on GitHub very easy to write – simply implement the CRUD API and the web interface will happily use that instead.
+These students are working on a project that fills a huge need for the community: _a graphical solution for managing your site's content._ Current plans include a fully-integrated admin which spins up when you run jekyll serve and provides a friendly web interface for creating and editing your content. The server and web interface will speak a common HTTP interface so either piece could be switched out for, e.g. a server which writes directly to a repository on GitHub.
The strength of text files as the storage medium for content has been part of Jekyll's success. [Our homepage](/) lauds the absence of a traditional SQL database when using Jekyll – your content should be what demands your time, not pesky database downtime. Unfortunately, understanding of the structure of a Jekyll site takes some work, enough that for some users, it's prohibitive to using Jekyll to accomplish their publishing goals.
From ea0b43f56d29eeabb0c79327de2124ec3bdb6872 Mon Sep 17 00:00:00 2001
From: jekyllbot
Date: Fri, 3 Jun 2016 16:42:37 -0700
Subject: [PATCH 22/22] Update history to reflect merge of #4980 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index da34cf51..36f579bc 100644
--- a/History.markdown
+++ b/History.markdown
@@ -133,6 +133,7 @@
* Minor tweak to fix missing apostrophne (#4962)
* Instructions on how to install github-gem on Windows (v2) (#4977)
* Fix inaccurate HTTP response header field name (#4976)
+ * Add post about GSoC project (#4980)
## 3.1.6 / 2016-05-19