From a2ee820609765ca95dfad5803fd26da72b67a9c2 Mon Sep 17 00:00:00 2001
From: Alfred Xing
Date: Tue, 19 May 2015 22:47:52 -0700
Subject: [PATCH 01/86] Regenerator: handle deleted/renamed/moved dependencies
Should fix #3716
---
lib/jekyll/regenerator.rb | 2 +-
test/test_regenerator.rb | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/lib/jekyll/regenerator.rb b/lib/jekyll/regenerator.rb
index 8ddfa269..9b1dc67a 100644
--- a/lib/jekyll/regenerator.rb
+++ b/lib/jekyll/regenerator.rb
@@ -102,7 +102,7 @@ module Jekyll
return cache[dependency] = cache[path] = true
end
end
- if data["mtime"].eql? File.mtime(path)
+ if File.exist?(path) && data["mtime"].eql?(File.mtime(path))
return cache[path] = false
else
return add(path)
diff --git a/test/test_regenerator.rb b/test/test_regenerator.rb
index 060fc524..eda25969 100644
--- a/test/test_regenerator.rb
+++ b/test/test_regenerator.rb
@@ -89,6 +89,41 @@ class TestRegenerator < JekyllUnitTest
end
end
+ context "The site regenerator" do
+ setup do
+ FileUtils.rm_rf(source_dir(".jekyll-metadata"))
+
+ @site = fixture_site({
+ "full_rebuild" => false
+ })
+
+ @site.read
+ @post = @site.posts.first
+ @regenerator = @site.regenerator
+ @regenerator.regenerate?(@post)
+
+ @layout_path = source_dir("_layouts/default.html")
+ end
+
+ teardown do
+ File.rename(@layout_path + ".tmp", @layout_path)
+ end
+
+ should "handle deleted/nonexistent dependencies" do
+ assert_equal 1, @regenerator.metadata.size
+ path = @regenerator.metadata.keys[0]
+
+ assert File.exist?(@layout_path)
+ @regenerator.add_dependency(path, @layout_path)
+
+ File.rename(@layout_path, @layout_path + ".tmp")
+ refute File.exist?(@layout_path)
+
+ @regenerator.clear_cache
+ assert @regenerator.regenerate?(@post)
+ end
+ end
+
context "The site metadata" do
setup do
FileUtils.rm_rf(source_dir(".jekyll-metadata"))
From 14ed5cc9543ec12c42926c695dfd0b1a56df3840 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Mon, 25 May 2015 02:07:21 -0500
Subject: [PATCH 02/86] Fix it so that 'blog.html' matches 'blog.html'
---
lib/jekyll/frontmatter_defaults.rb | 2 +-
test/test_front_matter_defaults.rb | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb
index 11eebf3f..160e6bec 100644
--- a/lib/jekyll/frontmatter_defaults.rb
+++ b/lib/jekyll/frontmatter_defaults.rb
@@ -173,7 +173,7 @@ module Jekyll
if path.nil? || path.empty?
""
else
- path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1/')
+ path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1')
end
end
end
diff --git a/test/test_front_matter_defaults.rb b/test/test_front_matter_defaults.rb
index 0c7f5bf4..27eb7d83 100644
--- a/test/test_front_matter_defaults.rb
+++ b/test/test_front_matter_defaults.rb
@@ -28,6 +28,32 @@ class TestFrontMatterDefaults < JekyllUnitTest
end
end
+ context "A site with fron matter type pages and an extension" do
+ setup do
+ @site = Site.new(Jekyll.configuration({
+ "source" => source_dir,
+ "destination" => dest_dir,
+ "defaults" => [{
+ "scope" => {
+ "path" => "index.html"
+ },
+ "values" => {
+ "key" => "val"
+ }
+ }]
+ }))
+
+ @site.process
+ @affected = @site.pages.find { |page| page.relative_path == "index.html" }
+ @not_affected = @site.pages.find { |page| page.relative_path == "about.html" }
+ end
+
+ should "affect only the specified path" do
+ assert_equal @affected.data["key"], "val"
+ assert_equal @not_affected.data["key"], nil
+ end
+ end
+
context "A site with front matter defaults with no type" do
setup do
@site = Site.new(Jekyll.configuration({
From f6bc58dd30769e6142fc8d64f934845fe06377d3 Mon Sep 17 00:00:00 2001
From: Max
Date: Thu, 28 May 2015 16:56:57 +0200
Subject: [PATCH 03/86] Docs now reflect correct redcarpet version
---
site/_docs/configuration.md | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md
index 7458853f..f9ac4eaa 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -574,15 +574,14 @@ All other extensions retain their usual names from Redcarpet, and no renderer
options aside from `smart` can be specified in Jekyll. [A list of available
extensions can be found in the Redcarpet README file.][redcarpet_extensions]
Make sure you're looking at the README for the right version of
-Redcarpet: Jekyll currently uses v2.2.x, and extensions like `footnotes` and
-`highlight` weren't added until after version 3.0.0. The most commonly used
+Redcarpet: Jekyll currently uses v3.2.x. The most commonly used
extensions are:
- `tables`
- `no_intra_emphasis`
- `autolink`
-[redcarpet_extensions]: https://github.com/vmg/redcarpet/blob/v2.2.2/README.markdown#and-its-like-really-simple-to-use
+[redcarpet_extensions]: https://github.com/vmg/redcarpet/blob/v3.2.2/README.markdown#and-its-like-really-simple-to-use
### Kramdown
From 60bdc7119a9a49ffa24226b66f447b126ef4a83f Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 20 May 2015 13:14:41 +0700
Subject: [PATCH 04/86] Remove Ozon from jekyllrb.com list of sites for
learning
Reverts #3712.
---
site/_docs/sites.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/site/_docs/sites.md b/site/_docs/sites.md
index f7a7d2ac..c11da820 100644
--- a/site/_docs/sites.md
+++ b/site/_docs/sites.md
@@ -20,8 +20,6 @@ learning purposes.
([source](https://github.com/rsms/rsms.github.com))
- [Scott Chacon](http://schacon.github.com)
([source](https://github.com/schacon/schacon.github.com))
-- [Ozon OS](http://ozonos.github.io)
- ([source](https://github.com/ozonos/ozonos.github.io))
If you would like to explore more examples, you can find a list of sites
and their sources on the ["Sites" page in the Jekyll wiki][jekyll-sites].
From c1d44fc83f8067633dc931946afbd25a21966e80 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Thu, 28 May 2015 09:14:06 -0700
Subject: [PATCH 05/86] Update history to reflect merge of #3743
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 34777e98..db4c011c 100644
--- a/History.markdown
+++ b/History.markdown
@@ -201,6 +201,7 @@
* Add note to `excerpt_separator` documentation that it can be set globally (#3667)
* Fix some names on Troubleshooting page (#3683)
* Add `remote_file_content` tag plugin to list of third-party plugins (#3691)
+ * Update the Redcarpet version on the Configuration page. (#3743)
## 2.5.3 / 2014-12-22
From e68d18c3ccc1c388088d7e4f04a858f3ba1ea26e Mon Sep 17 00:00:00 2001
From: Seb
Date: Thu, 28 May 2015 21:19:24 +0200
Subject: [PATCH 06/86] Update link in welcome post to talk.jekyllrb.com
Previously the link pointed to the jekyll-help repository on github which no
longer accepts issues.
---
.../_posts/0000-00-00-welcome-to-jekyll.markdown.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb b/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb
index 945562f4..a1f2407c 100644
--- a/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb
+++ b/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb
@@ -18,8 +18,8 @@ print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
-Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll’s dedicated Help repository][jekyll-help].
+Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
[jekyll-docs]: http://jekyllrb.com/docs/home
[jekyll-gh]: https://github.com/jekyll/jekyll
-[jekyll-help]: https://github.com/jekyll/jekyll-help
+[jekyll-talk]: https://talk.jekyllrb.com/
From f04c9bb469e3600c779d18a706c4b2dff9f9604b Mon Sep 17 00:00:00 2001
From: Jordan Thornquest
Date: Sat, 23 May 2015 22:27:55 -0700
Subject: [PATCH 07/86] Moved blog with an article about Jekyll to a new
location and updated the resources page to reflect the change.
---
site/_docs/resources.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/resources.md b/site/_docs/resources.md
index 79fa1d05..a730067a 100644
--- a/site/_docs/resources.md
+++ b/site/_docs/resources.md
@@ -45,4 +45,4 @@ A guide to implementing a tag cloud and per-tag content pages using Jekyll.
- [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/10/adding-ajax-pagination-to-jekyll.html)
-- [Using Jekyll’s Data Files to build a dynamic navbar](http://www.jordanthornquest.com/blog/building-dynamic-navbars-with-jekyll/)
+- [Using Jekyll’s Data Files to build a dynamic navbar](http://blog.jordanthornquest.com/post/119506660470/building-dynamic-navbars-in-jekyll)
From 174d2f98edc0401d3b57a710b0225d77ff3f1855 Mon Sep 17 00:00:00 2001
From: Matt Rogers
Date: Thu, 28 May 2015 17:46:16 -0500
Subject: [PATCH 08/86] Update history to reflect merge of #3745 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index db4c011c..c8b11a33 100644
--- a/History.markdown
+++ b/History.markdown
@@ -202,6 +202,7 @@
* Fix some names on Troubleshooting page (#3683)
* Add `remote_file_content` tag plugin to list of third-party plugins (#3691)
* Update the Redcarpet version on the Configuration page. (#3743)
+ * Update the link in the welcome post to point to Jekyll Talk (#3745)
## 2.5.3 / 2014-12-22
From fb716d6b833348d3fcc6dd8fe79d08d9736eeda0 Mon Sep 17 00:00:00 2001
From: Matt Rogers
Date: Thu, 28 May 2015 17:59:29 -0500
Subject: [PATCH 09/86] Update history to reflect merge of #3728 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index c8b11a33..d3972417 100644
--- a/History.markdown
+++ b/History.markdown
@@ -203,6 +203,7 @@
* Add `remote_file_content` tag plugin to list of third-party plugins (#3691)
* Update the Redcarpet version on the Configuration page. (#3743)
* Update the link in the welcome post to point to Jekyll Talk (#3745)
+ * Update link for navbars with data attributes tutorial (#3728)
## 2.5.3 / 2014-12-22
From bbd32980a1eb35c5ee1a66b859a048654363a6ae Mon Sep 17 00:00:00 2001
From: Matthias Nuessler
Date: Sun, 31 May 2015 13:50:21 +0200
Subject: [PATCH 10/86] Add asciinema liquid tag plugin
---
site/_docs/plugins.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/site/_docs/plugins.md b/site/_docs/plugins.md
index 54830623..023bc572 100644
--- a/site/_docs/plugins.md
+++ b/site/_docs/plugins.md
@@ -807,6 +807,7 @@ LESS.js files during generation.
- [twa](https://github.com/Ezmyrelda/twa): Twemoji Awesome plugin for Jekyll. Liquid tag allowing you to use twitter emoji in your jekyll pages.
- [jekyll-files](https://github.com/x43x61x69/jekyll-files) by [Zhi-Wei Cai](http://vox.vg/): Output relative path strings and other info regarding specific assets.
- [Fetch remote file content](https://github.com/dimitri-koenig/jekyll-plugins) by [Dimitri König](https://www.dimitrikoenig.net/): Using `remote_file_content` tag you can fetch the content of a remote file and include it as if you would put the content right into your markdown file yourself. Very useful for including code from github repo's to always have a current repo version.
+- [jekyll-asciinema](https://github.com/mnuessler/jekyll-asciinema): A tag for embedding asciicasts recorded with [asciinema](https://asciinema.org) in your Jekyll pages.
#### Collections
From bc806fd2a7269a8c7430f99c78db35bc08de7ef5 Mon Sep 17 00:00:00 2001
From: Alfred Xing
Date: Sun, 31 May 2015 11:11:21 -0700
Subject: [PATCH 11/86] Update history to reflect merge of #3717 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index d3972417..37839340 100644
--- a/History.markdown
+++ b/History.markdown
@@ -110,6 +110,7 @@
* Upgrade redcarpet to 3.2 (Security fix: OSVDB-120415) (#3652)
* Create #mock_expects that goes directly to RSpec Mocks. (#3658)
* Open `.jekyll-metadata` in binary mode to read binary Marshal data (#3713)
+ * Incremental regeneration: handle deleted, renamed, and moved dependencies (#3717)
### Development Fixes
From 2c0a535801ba44632a04e9b5d73c0392e787c2ee Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Mon, 1 Jun 2015 15:02:30 -0700
Subject: [PATCH 12/86] Update history to reflect merge of #3750
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 37839340..3f2b45a1 100644
--- a/History.markdown
+++ b/History.markdown
@@ -205,6 +205,7 @@
* Update the Redcarpet version on the Configuration page. (#3743)
* Update the link in the welcome post to point to Jekyll Talk (#3745)
* Update link for navbars with data attributes tutorial (#3728)
+ * Add `jekyll-asciinema` to list of third-party plugins (#3750)
## 2.5.3 / 2014-12-22
From 37f373fd38930139670d51f4413ae2ae71cb2790 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20Pican=C3=A7o?=
Date: Thu, 4 Jun 2015 17:37:24 -0300
Subject: [PATCH 13/86] fixing typo on line 19
- `pagination_path` to `paginate_path`
---
site/_docs/pagination.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/pagination.md b/site/_docs/pagination.md
index 07650eb4..feeed65d 100644
--- a/site/_docs/pagination.md
+++ b/site/_docs/pagination.md
@@ -16,7 +16,7 @@ and folders you need for paginated listings.
your Jekyll site. Pagination works when called from within the HTML
file, named index.html, which optionally may reside in and
produce pagination from within a subdirectory, via the
- pagination_path configuration value.
+ paginate_path configuration value.
From a134e05fdadf2efb232c5cd8219d341a882815f9 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Thu, 4 Jun 2015 16:57:13 -0700
Subject: [PATCH 14/86] Release :gem: 3.0.0.pre.beta6
---
lib/jekyll/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/jekyll/version.rb b/lib/jekyll/version.rb
index 1ab52789..2d859028 100644
--- a/lib/jekyll/version.rb
+++ b/lib/jekyll/version.rb
@@ -1,3 +1,3 @@
module Jekyll
- VERSION = '3.0.0.pre.beta5'
+ VERSION = '3.0.0.pre.beta6'
end
From f00e2174481de3cb8ed5ff1746069258aa331026 Mon Sep 17 00:00:00 2001
From: tasken
Date: Sat, 6 Jun 2015 03:20:56 -0300
Subject: [PATCH 15/86] fix for pagination in a directory different that /
---
site/_docs/pagination.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/pagination.md b/site/_docs/pagination.md
index 07650eb4..7afa55ca 100644
--- a/site/_docs/pagination.md
+++ b/site/_docs/pagination.md
@@ -204,7 +204,7 @@ page with links to all but the current page.
{% if page == paginator.page %}
{{ page }}
{% elsif page == 1 %}
- {{ page }}
+ {{ page }}
{% else %}
{{ page }}
{% endif %}
From d2fdac12c2cc5af70b749df1cca675f856dd5fd8 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Sat, 6 Jun 2015 06:20:53 -0500
Subject: [PATCH 16/86] Update history.markdown to reflect the merger of #3760
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 3f2b45a1..ed23c80c 100644
--- a/History.markdown
+++ b/History.markdown
@@ -111,6 +111,7 @@
* Create #mock_expects that goes directly to RSpec Mocks. (#3658)
* Open `.jekyll-metadata` in binary mode to read binary Marshal data (#3713)
* Incremental regeneration: handle deleted, renamed, and moved dependencies (#3717)
+ * Fix typo on line 19 of pagination.md (#3760)
### Development Fixes
From 6dbb5ac80c4f888f5e38eda188d7a5db8a3f3047 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Sat, 6 Jun 2015 06:31:26 -0500
Subject: [PATCH 17/86] Update history.markdown to reflect the merger of #3732.
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index ed23c80c..d167b2f1 100644
--- a/History.markdown
+++ b/History.markdown
@@ -112,6 +112,7 @@
* Open `.jekyll-metadata` in binary mode to read binary Marshal data (#3713)
* Incremental regeneration: handle deleted, renamed, and moved dependencies (#3717)
* Fix typo on line 19 of pagination.md (#3760)
+ * Fix it so that 'blog.html' matches 'blog.html' (#3732)
### Development Fixes
From 1e9163fdf449acefcbd541ff41cb447883be3557 Mon Sep 17 00:00:00 2001
From: Florian Weingarten
Date: Fri, 5 Jun 2015 00:11:22 +0000
Subject: [PATCH 18/86] Liquid profiler
---
bin/jekyll | 1 +
lib/jekyll.rb | 1 +
lib/jekyll/convertible.rb | 6 +-
lib/jekyll/liquid_renderer.rb | 34 +++++++++++
lib/jekyll/liquid_renderer/file.rb | 40 +++++++++++++
lib/jekyll/liquid_renderer/table.rb | 88 +++++++++++++++++++++++++++++
lib/jekyll/renderer.rb | 4 +-
lib/jekyll/site.rb | 15 ++++-
lib/jekyll/tags/include.rb | 4 +-
test/test_liquid_renderer.rb | 26 +++++++++
test/test_site.rb | 13 ++++-
11 files changed, 221 insertions(+), 11 deletions(-)
create mode 100644 lib/jekyll/liquid_renderer.rb
create mode 100644 lib/jekyll/liquid_renderer/file.rb
create mode 100644 lib/jekyll/liquid_renderer/table.rb
create mode 100644 test/test_liquid_renderer.rb
diff --git a/bin/jekyll b/bin/jekyll
index 60330cd7..0407df8b 100755
--- a/bin/jekyll
+++ b/bin/jekyll
@@ -24,6 +24,7 @@ Mercenary.program(:jekyll) do |p|
p.option 'safe', '--safe', 'Safe mode (defaults to false)'
p.option 'plugins', '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
p.option 'layouts', '--layouts DIR', String, 'Layouts directory (defaults to ./_layouts)'
+ p.option 'profile', '--profile', 'Generate a Liquid rendering profile'
Jekyll::Command.subclasses.each { |c| c.init_with_program(p) }
diff --git a/lib/jekyll.rb b/lib/jekyll.rb
index 58eda759..9d6b5b63 100644
--- a/lib/jekyll.rb
+++ b/lib/jekyll.rb
@@ -66,6 +66,7 @@ module Jekyll
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'
diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb
index 5767ab02..0cf8e1c1 100644
--- a/lib/jekyll/convertible.rb
+++ b/lib/jekyll/convertible.rb
@@ -108,8 +108,8 @@ module Jekyll
# info - the info for Liquid
#
# Returns the converted content
- def render_liquid(content, payload, info, path = nil)
- Liquid::Template.parse(content).render!(payload, info)
+ def render_liquid(content, payload, info, path)
+ site.liquid_renderer.file(path).parse(content).render(payload, info)
rescue Tags::IncludeTagError => e
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}, included in #{path || self.path}"
raise e
@@ -243,7 +243,7 @@ module Jekyll
payload["highlighter_prefix"] = converters.first.highlighter_prefix
payload["highlighter_suffix"] = converters.first.highlighter_suffix
- self.content = render_liquid(content, payload, info) if render_with_liquid?
+ self.content = render_liquid(content, payload, info, path) if render_with_liquid?
self.content = transform
# output keeps track of what will finally be written
diff --git a/lib/jekyll/liquid_renderer.rb b/lib/jekyll/liquid_renderer.rb
new file mode 100644
index 00000000..191deeaf
--- /dev/null
+++ b/lib/jekyll/liquid_renderer.rb
@@ -0,0 +1,34 @@
+require 'jekyll/liquid_renderer/file'
+require 'jekyll/liquid_renderer/table'
+
+module Jekyll
+ class LiquidRenderer
+ def initialize(site)
+ @site = site
+ reset
+ end
+
+ def reset
+ @stats = {}
+ end
+
+ def file(filename)
+ filename = @site.in_source_dir(filename).sub(/\A#{Regexp.escape(@site.source)}\//, '')
+
+ LiquidRenderer::File.new(self, filename).tap do |file|
+ @stats[filename] ||= {}
+ @stats[filename][:count] ||= 0
+ @stats[filename][:count] += 1
+ end
+ end
+
+ def increment_time(filename, time)
+ @stats[filename][:time] ||= 0.0
+ @stats[filename][:time] += time
+ end
+
+ def stats_table(n = 50)
+ LiquidRenderer::Table.new(@stats).to_s(n)
+ end
+ end
+end
diff --git a/lib/jekyll/liquid_renderer/file.rb b/lib/jekyll/liquid_renderer/file.rb
new file mode 100644
index 00000000..597a1003
--- /dev/null
+++ b/lib/jekyll/liquid_renderer/file.rb
@@ -0,0 +1,40 @@
+module Jekyll
+ class LiquidRenderer
+ class File
+ def initialize(renderer, filename)
+ @renderer = renderer
+ @filename = filename
+ end
+
+ def parse(content)
+ measure_time do
+ @template = Liquid::Template.parse(content)
+ end
+
+ self
+ end
+
+ def render(*args)
+ measure_time do
+ @template.render(*args)
+ end
+ end
+
+ def render!(*args)
+ measure_time do
+ @template.render!(*args)
+ end
+ end
+
+ private
+
+ def measure_time
+ before = Time.now
+ yield
+ ensure
+ after = Time.now
+ @renderer.increment_time(@filename, after - before)
+ end
+ end
+ end
+end
diff --git a/lib/jekyll/liquid_renderer/table.rb b/lib/jekyll/liquid_renderer/table.rb
new file mode 100644
index 00000000..128ac374
--- /dev/null
+++ b/lib/jekyll/liquid_renderer/table.rb
@@ -0,0 +1,88 @@
+module Jekyll
+ class LiquidRenderer::Table
+ def initialize(stats)
+ @stats = stats
+ end
+
+ def to_s(n = 50)
+ data = data_for_table(n)
+ widths = table_widths(data)
+ generate_table(data, widths)
+ end
+
+ private
+
+ def generate_table(data, widths)
+ str = "\n"
+
+ table_head = data.shift
+ str << generate_row(table_head, widths)
+ str << generate_table_head_border(table_head, widths)
+
+ data.each do |row_data|
+ str << generate_row(row_data, widths)
+ end
+
+ str << "\n"
+ str
+ end
+
+ def generate_table_head_border(row_data, widths)
+ str = ""
+
+ row_data.each_index do |cell_index|
+ str << '-' * widths[cell_index]
+ str << '-+-' unless cell_index == row_data.length-1
+ end
+
+ str << "\n"
+ str
+ end
+
+ def generate_row(row_data, widths)
+ str = ''
+
+ row_data.each_with_index do |cell_data, cell_index|
+ if cell_index == 0
+ str << cell_data.ljust(widths[cell_index], ' ')
+ else
+ str << cell_data.rjust(widths[cell_index], ' ')
+ end
+
+ str << ' | ' unless cell_index == row_data.length-1
+ end
+
+ str << "\n"
+ str
+ end
+
+ def table_widths(data)
+ widths = [ 0, 0, 0 ]
+
+ data.each do |row|
+ row.each_with_index do |cell, index|
+ widths[index] = [ cell.length, widths[index] ].max
+ end
+ end
+
+ widths
+ end
+
+ def data_for_table(n)
+ sorted = @stats.sort_by{ |filename, file_stats| -file_stats[:time] }
+ sorted = sorted.slice(0, n)
+
+ table = [[ 'Filename', 'Count', 'Total time' ]]
+
+ sorted.each do |filename, file_stats|
+ row = []
+ row << filename
+ row << file_stats[:count].to_s
+ row << "%.3f" % file_stats[:time]
+ table << row
+ end
+
+ table
+ end
+ end
+end
diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb
index 4a772978..ca79e5a8 100644
--- a/lib/jekyll/renderer.rb
+++ b/lib/jekyll/renderer.rb
@@ -49,7 +49,7 @@ module Jekyll
output = document.content
if document.render_with_liquid?
- output = render_liquid(output, payload, info)
+ output = render_liquid(output, payload, info, document.path)
end
output = convert(output)
@@ -92,7 +92,7 @@ module Jekyll
#
# Returns the content, rendered by Liquid.
def render_liquid(content, payload, info, path = nil)
- Liquid::Template.parse(content).render!(payload, info)
+ site.liquid_renderer.file(path).parse(content).render!(payload, info)
rescue Tags::IncludeTagError => e
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{e.path}, included in #{path || document.relative_path}"
raise e
diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb
index e7307bbf..a1ea8644 100644
--- a/lib/jekyll/site.rb
+++ b/lib/jekyll/site.rb
@@ -11,7 +11,7 @@ module Jekyll
:gems, :plugin_manager
attr_accessor :converters, :generators, :reader
- attr_reader :regenerator
+ attr_reader :regenerator, :liquid_renderer
# Public: Initialize a new Site.
#
@@ -33,6 +33,8 @@ module Jekyll
# Initialize incremental regenerator
@regenerator = Regenerator.new(self)
+ @liquid_renderer = LiquidRenderer.new(self)
+
self.plugin_manager = Jekyll::PluginManager.new(self)
self.plugins = plugin_manager.plugins_path
@@ -57,6 +59,13 @@ module Jekyll
render
cleanup
write
+ print_stats
+ end
+
+ def print_stats
+ if @config['profile']
+ puts @liquid_renderer.stats_table
+ end
end
# Reset Site details.
@@ -70,7 +79,8 @@ module Jekyll
self.static_files = []
self.data = {}
@collections = nil
- @regenerator.clear_cache()
+ @regenerator.clear_cache
+ @liquid_renderer.reset
if limit_posts < 0
raise ArgumentError, "limit_posts must be a non-negative number"
@@ -319,7 +329,6 @@ module Jekyll
end.to_a
end
-
def each_site_file
%w(posts pages static_files docs_to_write).each do |type|
send(type).each do |item|
diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb
index b809ffe7..cbc59d44 100644
--- a/lib/jekyll/tags/include.rb
+++ b/lib/jekyll/tags/include.rb
@@ -95,7 +95,7 @@ eos
# Render the variable if required
def render_variable(context)
if @file.match(VARIABLE_SYNTAX)
- partial = Liquid::Template.parse(@file)
+ partial = context.registers[:site].liquid_renderer.file("(variable)").parse(@file)
partial.render!(context)
end
end
@@ -123,7 +123,7 @@ eos
end
begin
- partial = Liquid::Template.parse(read_file(path, context))
+ partial = site.liquid_renderer.file(path).parse(read_file(path, context))
context.stack do
context['include'] = parse_params(context) if @params
diff --git a/test/test_liquid_renderer.rb b/test/test_liquid_renderer.rb
new file mode 100644
index 00000000..3da2d054
--- /dev/null
+++ b/test/test_liquid_renderer.rb
@@ -0,0 +1,26 @@
+require 'helper'
+
+class TestLiquidRenderer < JekyllUnitTest
+ context "profiler" do
+ setup do
+ @site = Site.new(site_configuration)
+ @renderer = @site.liquid_renderer
+ end
+
+ should "return a table with profiling results" do
+ @site.process
+
+ output = @renderer.stats_table
+
+ expected = [
+ /^Filename\s+|\s+Count\s+|\s+Total time$/,
+ /^-+\++-+\++-+$/,
+ /^_posts\/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{3}$/,
+ ]
+
+ expected.each do |regexp|
+ assert_match regexp, output
+ end
+ end
+ end
+end
diff --git a/test/test_site.rb b/test/test_site.rb
index 6b65ddb4..ca4438e6 100644
--- a/test/test_site.rb
+++ b/test/test_site.rb
@@ -310,7 +310,7 @@ class TestSite < JekyllUnitTest
custom_processor = "CustomMarkdown"
s = Site.new(site_configuration('markdown' => custom_processor))
- assert !!s.process
+ s.process
# Do some cleanup, we don't like straggling stuff's.
Jekyll::Converters::Markdown.send(:remove_const, :CustomMarkdown)
@@ -459,6 +459,17 @@ class TestSite < JekyllUnitTest
end
end
+ context "with liquid profiling" do
+ setup do
+ @site = Site.new(site_configuration('profile' => true))
+ end
+
+ should "print profile table" do
+ @site.liquid_renderer.should_receive(:stats_table)
+ @site.process
+ end
+ end
+
context "incremental build" do
setup do
@site = Site.new(site_configuration({
From 7bc9e1aae69d9752d5f85101bf5485f964447b6f Mon Sep 17 00:00:00 2001
From: Florian Weingarten
Date: Sun, 7 Jun 2015 16:47:26 +0000
Subject: [PATCH 19/86] Add byte counter
---
lib/jekyll/liquid_renderer.rb | 5 +++++
lib/jekyll/liquid_renderer/file.rb | 14 ++++++++++++--
lib/jekyll/liquid_renderer/table.rb | 12 +++++++++---
test/test_liquid_renderer.rb | 6 +++---
4 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/lib/jekyll/liquid_renderer.rb b/lib/jekyll/liquid_renderer.rb
index 191deeaf..0edeb44b 100644
--- a/lib/jekyll/liquid_renderer.rb
+++ b/lib/jekyll/liquid_renderer.rb
@@ -22,6 +22,11 @@ module Jekyll
end
end
+ def increment_bytes(filename, bytes)
+ @stats[filename][:bytes] ||= 0
+ @stats[filename][:bytes] += bytes
+ end
+
def increment_time(filename, time)
@stats[filename][:time] ||= 0.0
@stats[filename][:time] += time
diff --git a/lib/jekyll/liquid_renderer/file.rb b/lib/jekyll/liquid_renderer/file.rb
index 597a1003..dfa712ca 100644
--- a/lib/jekyll/liquid_renderer/file.rb
+++ b/lib/jekyll/liquid_renderer/file.rb
@@ -16,18 +16,28 @@ module Jekyll
def render(*args)
measure_time do
- @template.render(*args)
+ measure_bytes do
+ @template.render(*args)
+ end
end
end
def render!(*args)
measure_time do
- @template.render!(*args)
+ measure_bytes do
+ @template.render!(*args)
+ end
end
end
private
+ def measure_bytes
+ str = yield
+ ensure
+ @renderer.increment_bytes(@filename, str.bytesize)
+ end
+
def measure_time
before = Time.now
yield
diff --git a/lib/jekyll/liquid_renderer/table.rb b/lib/jekyll/liquid_renderer/table.rb
index 128ac374..32b09cb3 100644
--- a/lib/jekyll/liquid_renderer/table.rb
+++ b/lib/jekyll/liquid_renderer/table.rb
@@ -57,11 +57,11 @@ module Jekyll
end
def table_widths(data)
- widths = [ 0, 0, 0 ]
+ widths = []
data.each do |row|
row.each_with_index do |cell, index|
- widths[index] = [ cell.length, widths[index] ].max
+ widths[index] = [ cell.length, widths[index] ].compact.max
end
end
@@ -72,17 +72,23 @@ module Jekyll
sorted = @stats.sort_by{ |filename, file_stats| -file_stats[:time] }
sorted = sorted.slice(0, n)
- table = [[ 'Filename', 'Count', 'Total time' ]]
+ table = [[ 'Filename', 'Count', 'Bytes', 'Time' ]]
sorted.each do |filename, file_stats|
row = []
row << filename
row << file_stats[:count].to_s
+ row << format_bytes(file_stats[:bytes])
row << "%.3f" % file_stats[:time]
table << row
end
table
end
+
+ def format_bytes(bytes)
+ bytes /= 1024.0
+ "%.2fK" % bytes
+ end
end
end
diff --git a/test/test_liquid_renderer.rb b/test/test_liquid_renderer.rb
index 3da2d054..d727fac0 100644
--- a/test/test_liquid_renderer.rb
+++ b/test/test_liquid_renderer.rb
@@ -13,9 +13,9 @@ class TestLiquidRenderer < JekyllUnitTest
output = @renderer.stats_table
expected = [
- /^Filename\s+|\s+Count\s+|\s+Total time$/,
- /^-+\++-+\++-+$/,
- /^_posts\/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{3}$/,
+ /^Filename\s+|\s+Count\s+|\s+Bytes\s+|\s+Time$/,
+ /^-+\++-+\++-+\++-+$/,
+ /^_posts\/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{2}K\s+|\s+\d+\.\d{3}$/,
]
expected.each do |regexp|
From e84a7aadeec392d31e003caf080fd4b4be4bd7a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20Pican=C3=A7o?=
Date: Mon, 8 Jun 2015 13:24:53 -0300
Subject: [PATCH 20/86] fixing typo on line 31
- front matter
---
test/test_front_matter_defaults.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test_front_matter_defaults.rb b/test/test_front_matter_defaults.rb
index 27eb7d83..7d2e26be 100644
--- a/test/test_front_matter_defaults.rb
+++ b/test/test_front_matter_defaults.rb
@@ -28,7 +28,7 @@ class TestFrontMatterDefaults < JekyllUnitTest
end
end
- context "A site with fron matter type pages and an extension" do
+ context "A site with front matter type pages and an extension" do
setup do
@site = Site.new(Jekyll.configuration({
"source" => source_dir,
From 80f63949cd79ab55bc39500b4f8a688d6c31a582 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 9 Jun 2015 08:12:03 -0700
Subject: [PATCH 21/86] Update history to reflect merge of #3763
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index d167b2f1..6eb39c5c 100644
--- a/History.markdown
+++ b/History.markdown
@@ -208,6 +208,7 @@
* Update the link in the welcome post to point to Jekyll Talk (#3745)
* Update link for navbars with data attributes tutorial (#3728)
* Add `jekyll-asciinema` to list of third-party plugins (#3750)
+ * Update pagination example to be agnostic to first pagination dir (#3763)
## 2.5.3 / 2014-12-22
From 137efdc9f485c9e6c7b3fe1f3672fb4c531e2d8e Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Wed, 10 Jun 2015 15:20:44 -0500
Subject: [PATCH 22/86] Fix: #3738; Move code wrapper from div to figure.
---
lib/jekyll/converters/markdown/redcarpet_parser.rb | 2 +-
lib/jekyll/tags/highlight.rb | 2 +-
test/test_redcarpet.rb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb
index 3be60739..8ddf2292 100644
--- a/lib/jekyll/converters/markdown/redcarpet_parser.rb
+++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb
@@ -29,7 +29,7 @@ module Jekyll
include CommonMethods
def code_wrap(code)
- "
#{CGI::escapeHTML(code)}
"
+ "
#{CGI::escapeHTML(code)}
"
end
def block_code(code, lang)
diff --git a/lib/jekyll/tags/highlight.rb b/lib/jekyll/tags/highlight.rb
index 5589d38f..e644146f 100644
--- a/lib/jekyll/tags/highlight.rb
+++ b/lib/jekyll/tags/highlight.rb
@@ -113,7 +113,7 @@ eos
"class=\"language-#{@lang.to_s.gsub('+', '-')}\"",
"data-lang=\"#{@lang.to_s}\""
].join(" ")
- "
#{code.chomp}
"
+ "
#{code.chomp}
"
end
end
diff --git a/test/test_redcarpet.rb b/test/test_redcarpet.rb
index bb2d3214..528bc8a3 100644
--- a/test/test_redcarpet.rb
+++ b/test/test_redcarpet.rb
@@ -75,7 +75,7 @@ puts "Hello world"
end
should "render fenced code blocks without syntax highlighting" do
- assert_equal "
puts "Hello world"\n
", @markdown.convert(
+ assert_equal "
puts "Hello world"\n
", @markdown.convert(
<<-EOS
```ruby
puts "Hello world"
From 32cb87af902b0cd46ea26665a60f34c6d625df7d Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 10 Jun 2015 13:59:36 -0700
Subject: [PATCH 23/86] remove circle.yml, because we have disabled CircleCI.
---
circle.yml | 14 --------------
1 file changed, 14 deletions(-)
delete mode 100644 circle.yml
diff --git a/circle.yml b/circle.yml
deleted file mode 100644
index 02259027..00000000
--- a/circle.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-machine:
- timezone: UTC
- ruby:
- version: 2.1.5
- environment:
- PROOF: true
-test:
- override:
- - script/proof -f
-general:
- branches:
- ignore:
- - gh-pages # no proof script here
- - master # don't need to duplicate work
From 407fc82b2d822ace149dfaf6ee74991163a9e2b6 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 10 Jun 2015 14:14:00 -0700
Subject: [PATCH 24/86] Update history to reflect merge of #3779
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 6eb39c5c..3891b97b 100644
--- a/History.markdown
+++ b/History.markdown
@@ -77,6 +77,7 @@
* Added talk.jekyllrb.com to "Have questions?" (#3694)
* Performance: Sort files only once (#3707)
* Performance: Marshal metadata (#3706)
+ * Upgrade highlight wrapper from `div` to `figure` (#3779)
### Bug Fixes
From c6ee8a150a60079aaba8c41f7f1f4006d01b2a07 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 16 Jun 2015 10:22:18 -0700
Subject: [PATCH 25/86] Update history to reflect merge of #3762
[ci skip]
---
History.markdown | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/History.markdown b/History.markdown
index 3891b97b..295ec193 100644
--- a/History.markdown
+++ b/History.markdown
@@ -2,11 +2,12 @@
### Major Enhancements
- * Add basic support for JRuby (commit: 0f4477)
+ * Liquid profiler (i.e. know how fast or slow your templates render) (#3762)
* Incremental regeneration (#3116)
* Add Hooks: a new kind of plugin (#3553)
- * Drop support for Ruby 1.9.3. (#3235)
* Upgrade to Liquid 3.0.0 (#3002)
+ * Add basic support for JRuby (commit: 0f4477)
+ * Drop support for Ruby 1.9.3. (#3235)
* Support Ruby v2.2 (#3234)
* Support RDiscount 2 (#2767)
* Remove most runtime deps (#3323)
From 9c4bf19c71402760f07fa045720cbd9c4f6ccdb7 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Wed, 17 Jun 2015 10:31:44 -0500
Subject: [PATCH 26/86] Update dependencies.
---
Gemfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 1a594a9b..1d0caa3b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -20,13 +20,13 @@ if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
end
gem 'rake', '~> 10.1'
-gem 'rdoc', '~> 3.11'
+gem 'rdoc', '~> 4.2'
gem 'redgreen', '~> 1.2'
gem 'shoulda', '~> 3.5'
-gem 'cucumber', '1.3.18'
+gem 'cucumber', '~> 2.0'
gem 'launchy', '~> 2.3'
gem 'simplecov', '~> 0.9'
-gem 'mime-types', '~> 1.5'
+gem 'mime-types', '~> 2.6'
gem 'kramdown', '~> 1.7.0'
gem 'jekyll_test_plugin'
gem 'jekyll_test_plugin_malicious'
From 4b2b5ea8b1150fbee3bc1ccdec4b807e4d096d4c Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 17 Jun 2015 10:50:12 -0700
Subject: [PATCH 27/86] Update history to reflect merge of #3795
[ci skip]
---
History.markdown | 2 ++
1 file changed, 2 insertions(+)
diff --git a/History.markdown b/History.markdown
index 295ec193..6df5be8f 100644
--- a/History.markdown
+++ b/History.markdown
@@ -79,6 +79,7 @@
* Performance: Sort files only once (#3707)
* Performance: Marshal metadata (#3706)
* Upgrade highlight wrapper from `div` to `figure` (#3779)
+ * Upgrade mime-types to `~> 2.6` (#3795)
### Bug Fixes
@@ -145,6 +146,7 @@
* Force minitest version to 5.5.1 (#3657)
* Update the way cucumber accesses Minitest assertions (#3678)
* Add `script/rubyprof` to generate cachegrind callgraphs (#3692)
+ * Upgrade cucumber to 2.x (#3795)
### Site Enhancements
From 5647b9168941228dfff696cec10ac4731213a4b5 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Thu, 18 Jun 2015 20:52:40 -0700
Subject: [PATCH 29/86] Release :gem: 3.0.0.pre.beta7
---
lib/jekyll/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/jekyll/version.rb b/lib/jekyll/version.rb
index 2d859028..10561bea 100644
--- a/lib/jekyll/version.rb
+++ b/lib/jekyll/version.rb
@@ -1,3 +1,3 @@
module Jekyll
- VERSION = '3.0.0.pre.beta6'
+ VERSION = '3.0.0.pre.beta7'
end
From 3c656ae2edc4af4c3c90640031baa7286c904d28 Mon Sep 17 00:00:00 2001
From: Florian Weingarten
Date: Tue, 23 Jun 2015 21:24:46 +0000
Subject: [PATCH 30/86] Remove unnecessary 'ensure' in LiquidRenderer
---
lib/jekyll/liquid_renderer/file.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/jekyll/liquid_renderer/file.rb b/lib/jekyll/liquid_renderer/file.rb
index dfa712ca..f91a5a2c 100644
--- a/lib/jekyll/liquid_renderer/file.rb
+++ b/lib/jekyll/liquid_renderer/file.rb
@@ -33,9 +33,9 @@ module Jekyll
private
def measure_bytes
- str = yield
- ensure
- @renderer.increment_bytes(@filename, str.bytesize)
+ yield.tap do |str|
+ @renderer.increment_bytes(@filename, str.bytesize)
+ end
end
def measure_time
From 68c398886198be9a87cba5d223ff1da110ab4bb6 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 23 Jun 2015 15:36:51 -0700
Subject: [PATCH 31/86] Update history to reflect merge of #3811
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 6df5be8f..c52ba293 100644
--- a/History.markdown
+++ b/History.markdown
@@ -116,6 +116,7 @@
* Incremental regeneration: handle deleted, renamed, and moved dependencies (#3717)
* Fix typo on line 19 of pagination.md (#3760)
* Fix it so that 'blog.html' matches 'blog.html' (#3732)
+ * Remove occasionally-problematic `ensure` in `LiquidRenderer` (#3811)
### Development Fixes
From 197dd184f95bd2361b199eaaa93e5674331acef0 Mon Sep 17 00:00:00 2001
From: Michael Giuffrida
Date: Wed, 24 Jun 2015 13:02:02 -0700
Subject: [PATCH 32/86] Update windows.md with Ruby version info
Jekyll dependency hitimes does not support Ruby 2.2 on Windows yet
---
site/_docs/windows.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/site/_docs/windows.md b/site/_docs/windows.md
index 7642592c..a3e6b5f0 100644
--- a/site/_docs/windows.md
+++ b/site/_docs/windows.md
@@ -12,6 +12,8 @@ knowledge and lessons that have been unearthed by Windows users.
Julian Thilo has written up instructions to get
[Jekyll running on Windows][windows-installation] and it seems to work for most.
+The instructions were written for Ruby 2.0.0, but should work for later versions
+[prior to 2.2][hitimes-issue].
## Encoding
@@ -28,6 +30,7 @@ $ chcp 65001
{% endhighlight %}
[windows-installation]: http://jekyll-windows.juthilo.com/
+[hitimes-issue]: https://github.com/copiousfreetime/hitimes/issues/40
## Auto-regeneration
From 0125af80a39841aea1d55838eb99064ce2352b39 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Wed, 24 Jun 2015 20:47:05 -0500
Subject: [PATCH 33/86] Update history.markdown to reflect the merger of #3818.
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index c52ba293..53196583 100644
--- a/History.markdown
+++ b/History.markdown
@@ -80,6 +80,7 @@
* Performance: Marshal metadata (#3706)
* Upgrade highlight wrapper from `div` to `figure` (#3779)
* Upgrade mime-types to `~> 2.6` (#3795)
+ * Update windows.md with Ruby version info (#3818)
### Bug Fixes
From 4dd66e9448672b202a8cc60733a861d87cb31fc3 Mon Sep 17 00:00:00 2001
From: chrisfinazzo
Date: Thu, 25 Jun 2015 09:54:42 -0400
Subject: [PATCH 34/86] Add missing flag to disable the watcher
---
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 f9ac4eaa..33f4b642 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -180,7 +180,7 @@ class="flag">flags (specified on the command-line) that control them.
Enable auto-regeneration of the site when files are modified.
-
-w, --watch
+
-w, --watch, --no-watch
From 5db3b5d7090f81e4c736f1c461dd6249b735cc55 Mon Sep 17 00:00:00 2001
From: chrisfinazzo
Date: Thu, 25 Jun 2015 17:30:50 -0400
Subject: [PATCH 35/86] Use square brackets instead
---
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 33f4b642..ad7764b0 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -180,7 +180,7 @@ class="flag">flags (specified on the command-line) that control them.
Enable auto-regeneration of the site when files are modified.
-
-w, --watch, --no-watch
+
-w, --[no-]watch
From 8c9e9497a2b3b9a071b44b91c226a2a99c0c1f46 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Mon, 29 Jun 2015 14:33:38 -0700
Subject: [PATCH 36/86] Release :gem: 3.0.0.pre.beta8
---
lib/jekyll/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/jekyll/version.rb b/lib/jekyll/version.rb
index 10561bea..1e416f05 100644
--- a/lib/jekyll/version.rb
+++ b/lib/jekyll/version.rb
@@ -1,3 +1,3 @@
module Jekyll
- VERSION = '3.0.0.pre.beta7'
+ VERSION = '3.0.0.pre.beta8'
end
From 250b6ebb7e4108de387027f2ab71aba0062c9ad7 Mon Sep 17 00:00:00 2001
From: Mike Bland
Date: Thu, 25 Jun 2015 12:49:24 -0400
Subject: [PATCH 37/86] Adapt StaticFile for collections, config defaults
This enables files such as images and PDFs to show up in the same relative
output directory as other HTML and Markdown documents in the same collection.
It also enables static files to be hidden using defaults from _config.yml in
the same way that other documents in the same collection and directories may
be hidden using `published: false`.
---
lib/jekyll/static_file.rb | 43 +++++++++++++++++++++++++++++++---
test/test_static_file.rb | 49 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 88 insertions(+), 4 deletions(-)
diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb
index 454f1247..48fa34c5 100644
--- a/lib/jekyll/static_file.rb
+++ b/lib/jekyll/static_file.rb
@@ -37,7 +37,7 @@ module Jekyll
def destination_rel_dir
if @collection
- @dir.gsub(/\A_/, '')
+ File.dirname(url)
else
@dir
end
@@ -61,9 +61,10 @@ module Jekyll
# Whether to write the file to the filesystem
#
- # Returns true.
+ # Returns true unless the defaults for the destination path from
+ # _config.yml contain `published: false`.
def write?
- true
+ defaults.fetch('published', true)
end
# Write the static file to the destination directory (if modified).
@@ -100,5 +101,41 @@ module Jekyll
"path" => File.join("", relative_path)
}
end
+
+ def placeholders
+ {
+ collection: @collection.label,
+ path: relative_path[
+ @collection.relative_directory.size..relative_path.size],
+ output_ext: '',
+ name: '',
+ title: '',
+ }
+ end
+
+ # Applies a similar URL-building technique as Jekyll::Document that takes
+ # the collection's URL template into account. The default URL template can
+ # be overriden in the collection's configuration in _config.yml.
+ def url
+ @url ||= if @collection.nil?
+ relative_path
+ else
+ ::Jekyll::URL.new({
+ template: @collection.url_template,
+ placeholders: placeholders,
+ })
+ end.to_s.gsub /\/$/, ''
+ end
+
+ # Returns the type of the collection if present, nil otherwise.
+ def type
+ @type ||= @collection.nil? ? nil : @collection.label.to_sym
+ end
+
+ # Returns the front matter defaults defined for the file's URL and/or type
+ # as defined in _config.yml.
+ def defaults
+ @defaults ||= @site.frontmatter_defaults.all url, type
+ end
end
end
diff --git a/test/test_static_file.rb b/test/test_static_file.rb
index 3285f952..3af7a1f0 100644
--- a/test/test_static_file.rb
+++ b/test/test_static_file.rb
@@ -18,6 +18,16 @@ class TestStaticFile < JekyllUnitTest
StaticFile.new(@site, base, dir, name)
end
+ def setup_static_file_with_collection(base, dir, name, label, metadata)
+ site = fixture_site 'collections' => {label => metadata}
+ StaticFile.new(site, base, dir, name, site.collections[label])
+ end
+
+ def setup_static_file_with_defaults(base, dir, name, defaults)
+ site = fixture_site 'defaults' => defaults
+ StaticFile.new(site, base, dir, name)
+ end
+
context "A StaticFile" do
setup do
clear_dest
@@ -46,7 +56,44 @@ class TestStaticFile < JekyllUnitTest
should "have a destination relative directory without a collection" do
static_file = setup_static_file("root", "dir/subdir", "file.html")
- assert "dir/subdir", static_file.destination_rel_dir
+ assert_equal nil, static_file.type
+ assert_equal "dir/subdir/file.html", static_file.url
+ assert_equal "dir/subdir", static_file.destination_rel_dir
+ end
+
+ should "have a destination relative directory with a collection" do
+ static_file = setup_static_file_with_collection(
+ "root", "_foo/dir/subdir", "file.html", "foo", {"output" => true})
+ assert_equal :foo, static_file.type
+ assert_equal "/foo/dir/subdir/file.html", static_file.url
+ assert_equal "/foo/dir/subdir", static_file.destination_rel_dir
+ end
+
+ should "use its collection's permalink template for the destination relative directory" do
+ static_file = setup_static_file_with_collection(
+ "root", "_foo/dir/subdir", "file.html", "foo",
+ {"output" => true, "permalink" => "/:path/"})
+ assert_equal :foo, static_file.type
+ assert_equal "/dir/subdir/file.html", static_file.url
+ assert_equal "/dir/subdir", static_file.destination_rel_dir
+ end
+
+ should "be writable by default" do
+ static_file = setup_static_file("root", "dir/subdir", "file.html")
+ assert(static_file.write?,
+ "static_file.write? should return true by default")
+ end
+
+ should "use the _config.yml defaults to determine writability" do
+ defaults = [{
+ "scope" => {"path" => "private"},
+ "values" => {"published" => false}
+ }]
+ static_file = setup_static_file_with_defaults(
+ "root", "private/dir/subdir", "file.html", defaults)
+ assert(!static_file.write?,
+ "static_file.write? should return false when _config.yml sets " +
+ "`published: false`")
end
should "know its last modification time" do
From feb84043dd9cfab2be83353dca630882705cabd5 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Wed, 1 Jul 2015 12:07:04 -0500
Subject: [PATCH 38/86] Update history.markdown to reflect the merger of #3823.
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 53196583..c66320b9 100644
--- a/History.markdown
+++ b/History.markdown
@@ -18,6 +18,7 @@
* Sunset (i.e. remove) Maruku (#3655)
* Remove support for relative permalinks (#3679)
* Iterate over `site.collections` as an array instead of a hash. (#3670)
+ * Adapt StaticFile for collections, config defaults (#3823)
### Minor Enhancements
From 5bf5c36ce0bf3ac82952cdf47443a86c82952901 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Sat, 4 Jul 2015 04:59:06 -0500
Subject: [PATCH 39/86] Close #3833 by removing execute bit.
---
lib/site_template/css/main.scss | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 lib/site_template/css/main.scss
diff --git a/lib/site_template/css/main.scss b/lib/site_template/css/main.scss
old mode 100755
new mode 100644
From f4bbbd69522a6d9515374d63805445606d819d0d Mon Sep 17 00:00:00 2001
From: Jensen Kuras
Date: Mon, 6 Jul 2015 10:43:28 -0700
Subject: [PATCH 40/86] Fixed an unclear code comment
---
lib/site_template/css/main.scss | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/site_template/css/main.scss b/lib/site_template/css/main.scss
index 31dcfe0f..ba29244a 100644
--- a/lib/site_template/css/main.scss
+++ b/lib/site_template/css/main.scss
@@ -30,7 +30,7 @@ $on-laptop: 800px;
-// Using media queries with like this:
+// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
From b9f8fc1715d9d5413c33bb61d997d2e7a5d80719 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Kits?=
Date: Mon, 6 Jul 2015 21:02:56 +0300
Subject: [PATCH 41/86] Fixes #3836. Fix site template header menu iteration
variables
---
lib/site_template/_includes/header.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/site_template/_includes/header.html b/lib/site_template/_includes/header.html
index cfe381f7..b3f86db8 100644
--- a/lib/site_template/_includes/header.html
+++ b/lib/site_template/_includes/header.html
@@ -14,9 +14,9 @@
- {% for page in site.pages %}
- {% if page.title %}
- {{ page.title }}
+ {% for my_page in site.pages %}
+ {% if my_page.title %}
+ {{ my_page.title }}
{% endif %}
{% endfor %}
From eeb6ef46f10d5a725909b59d5b23192d40ad2f08 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Mon, 6 Jul 2015 12:01:25 -0700
Subject: [PATCH 42/86] Update history to reflect merge of #3837
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index c66320b9..d0738c09 100644
--- a/History.markdown
+++ b/History.markdown
@@ -119,6 +119,7 @@
* Fix typo on line 19 of pagination.md (#3760)
* Fix it so that 'blog.html' matches 'blog.html' (#3732)
* Remove occasionally-problematic `ensure` in `LiquidRenderer` (#3811)
+ * Fixed an unclear code comment in site template SCSS (#3837)
### Development Fixes
From 90514b3536c2a6d6dfc379b91bd1252c3bc09dad Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Mon, 6 Jul 2015 17:52:50 -0500
Subject: [PATCH 43/86] Allow jRuby head to fail.
---
.travis.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 1e187fe2..1b25cf93 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,9 @@ rvm:
- 2.1
- 2.0
- jruby-head
+matrix:
+ allow_failures:
+ - rvm: jruby-head
env:
matrix:
- TEST_SUITE=test
From 8bdfdae0abd37a44985d33cab72e272f08ce5fa4 Mon Sep 17 00:00:00 2001
From: Florian Weingarten
Date: Thu, 9 Jul 2015 13:40:36 -0400
Subject: [PATCH 44/86] Fix reading of binary metadata file
---
lib/jekyll/regenerator.rb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/jekyll/regenerator.rb b/lib/jekyll/regenerator.rb
index 18a54ae3..d5d74ec9 100644
--- a/lib/jekyll/regenerator.rb
+++ b/lib/jekyll/regenerator.rb
@@ -130,9 +130,7 @@ module Jekyll
#
# Returns nothing.
def write_metadata
- File.open(metadata_file, 'wb') do |f|
- f.write(Marshal.dump(metadata))
- end
+ File.binwrite(metadata_file, Marshal.dump(metadata))
end
# Produce the absolute path of the metadata file
@@ -158,7 +156,7 @@ module Jekyll
# Returns the read metadata.
def read_metadata
@metadata = if !disabled? && File.file?(metadata_file)
- content = File.read(metadata_file)
+ content = File.binread(metadata_file)
begin
Marshal.load(content)
From dba6df907fc0040c308a68f0930ef456b0a44cf4 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Thu, 16 Jul 2015 08:36:44 -0500
Subject: [PATCH 45/86] Update Kramdown.
---
Gemfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Gemfile b/Gemfile
index 1d0caa3b..0a7358de 100644
--- a/Gemfile
+++ b/Gemfile
@@ -27,7 +27,7 @@ gem 'cucumber', '~> 2.0'
gem 'launchy', '~> 2.3'
gem 'simplecov', '~> 0.9'
gem 'mime-types', '~> 2.6'
-gem 'kramdown', '~> 1.7.0'
+gem 'kramdown', '~> 1.8.0'
gem 'jekyll_test_plugin'
gem 'jekyll_test_plugin_malicious'
gem 'minitest-reporters'
From 910cab5f84cc6c46d9135afdede878d8a2952e43 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Thu, 16 Jul 2015 08:39:57 -0500
Subject: [PATCH 46/86] Update history.markdown to reflect the merger of #3845.
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index d0738c09..3b62234d 100644
--- a/History.markdown
+++ b/History.markdown
@@ -120,6 +120,7 @@
* Fix it so that 'blog.html' matches 'blog.html' (#3732)
* Remove occasionally-problematic `ensure` in `LiquidRenderer` (#3811)
* Fixed an unclear code comment in site template SCSS (#3837)
+ * Fix reading of binary metadata file (#3845)
### Development Fixes
From 56622c7ab617741c765521e2aacfc59bfd8f7319 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Thu, 16 Jul 2015 14:16:47 -0500
Subject: [PATCH 47/86] Update history.markdown to reflect the merger of #3853.
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 3b62234d..71dfe88b 100644
--- a/History.markdown
+++ b/History.markdown
@@ -152,6 +152,7 @@
* Update the way cucumber accesses Minitest assertions (#3678)
* Add `script/rubyprof` to generate cachegrind callgraphs (#3692)
* Upgrade cucumber to 2.x (#3795)
+ * Update Kramdown. (#3853)
### Site Enhancements
From 5af105ca71f133ab129df9fbfb92931bab0f353d Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Thu, 16 Jul 2015 08:23:35 -0500
Subject: [PATCH 48/86] Try to organize dependencies into dev and test groups.
---
Gemfile | 85 +++++++++++++++++++++++++++++++--------------------------
1 file changed, 46 insertions(+), 39 deletions(-)
diff --git a/Gemfile b/Gemfile
index 0a7358de..7c374c7c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,47 +1,54 @@
source 'https://rubygems.org'
gemspec
-gem 'pry'
-gem 'toml', '~> 0.1.0'
-gem 'jekyll-paginate', '~> 1.0'
-gem 'jekyll-gist', '~> 1.0'
-gem 'jekyll-coffeescript', '~> 1.0'
-
-platform :ruby, :mswin, :mingw do
- gem 'pygments.rb', '~> 0.6.0'
- gem 'rdiscount', '~> 2.0'
- gem 'classifier-reborn', '~> 2.0'
- gem 'redcarpet', '~> 3.2', '>= 3.2.3'
- gem 'liquid-c', '~> 3.0'
-end
-
-if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
- gem 'test-unit'
-end
-
gem 'rake', '~> 10.1'
-gem 'rdoc', '~> 4.2'
-gem 'redgreen', '~> 1.2'
-gem 'shoulda', '~> 3.5'
-gem 'cucumber', '~> 2.0'
-gem 'launchy', '~> 2.3'
-gem 'simplecov', '~> 0.9'
+group :development do
+ gem 'rdoc', '~> 4.2'
+ gem 'launchy', '~> 2.3'
+ gem 'toml', '~> 0.1.0'
+ gem 'pry'
+end
+
+group :test do
+ gem 'redgreen', '~> 1.2'
+ gem 'shoulda', '~> 3.5'
+ gem 'cucumber', '~> 2.0'
+ gem 'simplecov', '~> 0.9'
+ gem 'jekyll_test_plugin'
+ gem 'jekyll_test_plugin_malicious'
+ gem 'minitest-reporters'
+ gem 'minitest-profile'
+ gem 'minitest'
+ gem 'rspec-mocks'
+
+ if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
+ gem 'test-unit'
+ end
+
+ if ENV['PROOF']
+ gem 'html-proofer', '~> 2.0'
+ end
+end
+
+group :benchmark do
+ if ENV['BENCHMARK']
+ gem 'ruby-prof'
+ gem 'rbtrace'
+ gem 'stackprof'
+ gem 'benchmark-ips'
+ end
+end
+
+gem 'jekyll-paginate', '~> 1.0'
+gem 'jekyll-coffeescript', '~> 1.0'
+gem 'jekyll-gist', '~> 1.0'
gem 'mime-types', '~> 2.6'
gem 'kramdown', '~> 1.8.0'
-gem 'jekyll_test_plugin'
-gem 'jekyll_test_plugin_malicious'
-gem 'minitest-reporters'
-gem 'minitest-profile'
-gem 'minitest'
-gem 'rspec-mocks'
-if ENV['BENCHMARK']
- gem 'ruby-prof'
- gem 'rbtrace'
- gem 'stackprof'
- gem 'benchmark-ips'
-end
-
-if ENV['PROOF']
- gem 'html-proofer', '~> 2.0'
+platform :ruby, :mswin, :mingw do
+ gem 'rdiscount', '~> 2.0'
+ gem 'pygments.rb', '~> 0.6.0'
+ gem 'redcarpet', '~> 3.2', '>= 3.2.3'
+ gem 'classifier-reborn', '~> 2.0'
+ gem 'liquid-c', '~> 3.0'
end
From b0fa2462a6bb0ebb1e9795cf7d0db70d6937bc3f Mon Sep 17 00:00:00 2001
From: AJ Acevedo
Date: Sat, 18 Jul 2015 21:49:10 -0400
Subject: [PATCH 49/86] Updated the scripts shebang for portability
- Updated all of the sh and bash shebangs for consistency and portability.
- set -e to the test script for portability
Resolves #3857
---
script/bootstrap | 2 +-
script/branding | 2 +-
script/cibuild | 2 +-
script/cucumber | 2 +-
script/proof | 2 +-
script/rebund | 2 +-
script/rubyprof | 1 +
script/test | 3 ++-
8 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/script/bootstrap b/script/bootstrap
index 99756046..054a2c24 100755
--- a/script/bootstrap
+++ b/script/bootstrap
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
script/branding
bundle install -j8
diff --git a/script/branding b/script/branding
index 2df6c670..2708f4d1 100755
--- a/script/branding
+++ b/script/branding
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
echo " ---------------------------------------------------------- "
echo " _ ______ _ __ __ __ _ _ "
diff --git a/script/cibuild b/script/cibuild
index dade701b..afafd7d0 100755
--- a/script/cibuild
+++ b/script/cibuild
@@ -1,4 +1,4 @@
-#! /bin/bash -e
+#!/usr/bin/env bash
script/branding
diff --git a/script/cucumber b/script/cucumber
index 31a9be63..13508c84 100755
--- a/script/cucumber
+++ b/script/cucumber
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if ruby --version | grep -q "jruby"
then
diff --git a/script/proof b/script/proof
index 7c90b753..c8fff908 100755
--- a/script/proof
+++ b/script/proof
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
#
# Usage:
# script/proof
diff --git a/script/rebund b/script/rebund
index 2e8d3b1f..d2ff7901 100755
--- a/script/rebund
+++ b/script/rebund
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# rebund(1)
#
diff --git a/script/rubyprof b/script/rubyprof
index cac68ae7..520dc86e 100755
--- a/script/rubyprof
+++ b/script/rubyprof
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+
export BENCHMARK=1
TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site', 'full_rebuild' => true})"
diff --git a/script/test b/script/test
index e4e44f09..5aab2f06 100755
--- a/script/test
+++ b/script/test
@@ -1,4 +1,5 @@
-#! /bin/bash -e
+#!/usr/bin/env bash
+set -e
# Usage:
# script/test
From fe363290045b0a8c5baf0549e95cf31e64b343ec Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Sun, 19 Jul 2015 20:26:11 -0700
Subject: [PATCH 50/86] Update history to reflect merge of #3858
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 71dfe88b..fa6b65ca 100644
--- a/History.markdown
+++ b/History.markdown
@@ -153,6 +153,7 @@
* Add `script/rubyprof` to generate cachegrind callgraphs (#3692)
* Upgrade cucumber to 2.x (#3795)
* Update Kramdown. (#3853)
+ * Updated the scripts shebang for portability (#3858)
### Site Enhancements
From 8c485155ce846ce7835c3ef93b3f0eca6d680abf Mon Sep 17 00:00:00 2001
From: Max White
Date: Fri, 24 Jul 2015 23:38:36 +0100
Subject: [PATCH 51/86] Added documentation for new Static Publisher tool
---
site/_docs/deployment-methods.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md
index d9dd7ea2..5127af86 100644
--- a/site/_docs/deployment-methods.md
+++ b/site/_docs/deployment-methods.md
@@ -84,6 +84,10 @@ host your site directly on a CDN or file host like S3.
Setup steps are fully documented
[in the `jekyll-hook` repo](https://github.com/developmentseed/jekyll-hook).
+### Static Publisher
+
+[Static Publisher](https://github.com/static-publisher/static-publisher) is another automated deployment option with a server listening for webhook posts, though it's not tied to GitHub specifically. It has a one-click deploy to Heroku, it can watch multiple projects from one server, it has an easy to user admin interface and can publish to either S3 or to a git repository (e.g. gh-pages).
+
### Rake
Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimweirich/rake), [HighLine](https://github.com/JEG2/highline), and
From 3ab386f1b096be25a24fe038fc70fd0fb08d545d Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Fri, 24 Jul 2015 23:43:55 -0500
Subject: [PATCH 52/86] Update to JRuby 9K
Even though JRuby 9K on Travis still apparently points to pre1 we are updating so that when it finally points to stable release we can get those builds, once jruby-head diverges enough again we will re-add it to the list and start testing the next build and move JRuby 9K. Remember though, JRuby support is still experimental.
---
.travis.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 1b25cf93..3d40a501 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,10 +5,10 @@ rvm:
- 2.2
- 2.1
- 2.0
-- jruby-head
+- jruby-9.0.0.0
matrix:
allow_failures:
- - rvm: jruby-head
+ - rvm: jruby-9.0.0.0
env:
matrix:
- TEST_SUITE=test
From 3e29aaf785a1a46142953a3a855a238c40e90ca5 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Fri, 24 Jul 2015 23:46:17 -0500
Subject: [PATCH 53/86] Update history.markdown to reflect the commit
https://github.com/jekyll/jekyll/commit/3ab386f1b096be25a24fe038fc70fd0fb08d545d
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index fa6b65ca..083e8415 100644
--- a/History.markdown
+++ b/History.markdown
@@ -154,6 +154,7 @@
* Upgrade cucumber to 2.x (#3795)
* Update Kramdown. (#3853)
* Updated the scripts shebang for portability (#3858)
+ * Update JRuby testing to 9K ([3ab386f](https://github.com/jekyll/jekyll/commit/3ab386f1b096be25a24fe038fc70fd0fb08d545d))
### Site Enhancements
From 7c4f319442b6b7a457d35cef2fc1b7a480b30850 Mon Sep 17 00:00:00 2001
From: Stephen Crosby
Date: Mon, 27 Jul 2015 14:24:37 -0700
Subject: [PATCH 54/86] #3870 trigger hooks by owner symbol
---
lib/jekyll/convertible.rb | 15 ++++++++++++---
lib/jekyll/document.rb | 2 +-
lib/jekyll/hooks.rb | 20 +++++---------------
lib/jekyll/page.rb | 2 +-
lib/jekyll/post.rb | 2 +-
lib/jekyll/renderer.rb | 2 +-
lib/jekyll/site.rb | 10 +++++-----
7 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb
index 0cf8e1c1..49a77c54 100644
--- a/lib/jekyll/convertible.rb
+++ b/lib/jekyll/convertible.rb
@@ -144,6 +144,15 @@ module Jekyll
end
end
+ # returns the owner symbol for hook triggering
+ def hook_owner
+ if is_a?(Post)
+ :post
+ elsif is_a?(Page)
+ :page
+ end
+ end
+
# Determine whether the document is an asset file.
# Asset files include CoffeeScript files and Sass/SCSS files.
#
@@ -236,7 +245,7 @@ module Jekyll
#
# Returns nothing.
def do_layout(payload, layouts)
- Jekyll::Hooks.trigger self, :pre_render, payload
+ Jekyll::Hooks.trigger hook_owner, :pre_render, self, payload
info = { :filters => [Jekyll::Filters], :registers => { :site => site, :page => payload['page'] } }
# render and transform content (this becomes the final content of the object)
@@ -250,7 +259,7 @@ module Jekyll
self.output = content
render_all_layouts(layouts, payload, info) if place_in_layout?
- Jekyll::Hooks.trigger self, :post_render
+ Jekyll::Hooks.trigger hook_owner, :post_render, self
end
# Write the generated page file to the destination directory.
@@ -264,7 +273,7 @@ module Jekyll
File.open(path, 'wb') do |f|
f.write(output)
end
- Jekyll::Hooks.trigger self, :post_write
+ Jekyll::Hooks.trigger hook_owner, :post_write, self
end
# Accessor for data properties by Liquid.
diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb
index 045bdacb..da07a995 100644
--- a/lib/jekyll/document.rb
+++ b/lib/jekyll/document.rb
@@ -190,7 +190,7 @@ module Jekyll
f.write(output)
end
- Jekyll::Hooks.trigger self, :post_write
+ Jekyll::Hooks.trigger :document, :post_write, self
end
# Returns merged option hash for File.read of self.site (if exists)
diff --git a/lib/jekyll/hooks.rb b/lib/jekyll/hooks.rb
index d01cae4c..98ea263f 100644
--- a/lib/jekyll/hooks.rb
+++ b/lib/jekyll/hooks.rb
@@ -1,13 +1,5 @@
module Jekyll
module Hooks
- # Helps look up hooks from the registry by owner's class
- OWNER_MAP = {
- Jekyll::Site => :site,
- Jekyll::Page => :page,
- Jekyll::Post => :post,
- Jekyll::Document => :document,
- }.freeze
-
DEFAULT_PRIORITY = 20
# compatibility layer for octopress-hooks users
@@ -88,19 +80,17 @@ module Jekyll
end
# interface for Jekyll core components to trigger hooks
- def self.trigger(instance, event, *args)
- owner_symbol = OWNER_MAP[instance.class]
-
+ def self.trigger(owner, event, *args)
# proceed only if there are hooks to call
- return unless @registry[owner_symbol]
- return unless @registry[owner_symbol][event]
+ return unless @registry[owner]
+ return unless @registry[owner][event]
# hooks to call for this owner and event
- hooks = @registry[owner_symbol][event]
+ hooks = @registry[owner][event]
# sort and call hooks according to priority and load order
hooks.sort_by { |h| @hook_priority[h] }.each do |hook|
- hook.call(instance, *args)
+ hook.call(*args)
end
end
end
diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb
index f9040da8..431878b2 100644
--- a/lib/jekyll/page.rb
+++ b/lib/jekyll/page.rb
@@ -36,7 +36,7 @@ module Jekyll
site.frontmatter_defaults.find(File.join(dir, name), type, key)
end
- Jekyll::Hooks.trigger self, :post_init
+ Jekyll::Hooks.trigger :page, :post_init, self
end
# The generated directory into which the page will be placed
diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb
index 252cca42..62973d1d 100644
--- a/lib/jekyll/post.rb
+++ b/lib/jekyll/post.rb
@@ -69,7 +69,7 @@ module Jekyll
populate_categories
populate_tags
- Jekyll::Hooks.trigger self, :post_init
+ Jekyll::Hooks.trigger :post, :post_init, self
end
def published?
diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb
index ca79e5a8..f03315ef 100644
--- a/lib/jekyll/renderer.rb
+++ b/lib/jekyll/renderer.rb
@@ -35,7 +35,7 @@ module Jekyll
"page" => document.to_liquid
}, site_payload || site.site_payload)
- Jekyll::Hooks.trigger document, :pre_render, payload
+ Jekyll::Hooks.trigger :document, :pre_render, document, payload
info = {
filters: [Jekyll::Filters],
diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb
index a1ea8644..78d4db8b 100644
--- a/lib/jekyll/site.rb
+++ b/lib/jekyll/site.rb
@@ -86,7 +86,7 @@ module Jekyll
raise ArgumentError, "limit_posts must be a non-negative number"
end
- Jekyll::Hooks.trigger self, :after_reset
+ Jekyll::Hooks.trigger :site, :after_reset, self
end
# Load necessary libraries, plugins, converters, and generators.
@@ -144,7 +144,7 @@ module Jekyll
def read
reader.read
limit_posts!
- Jekyll::Hooks.trigger self, :post_read
+ Jekyll::Hooks.trigger :site, :post_read, self
end
# Run each of the Generators.
@@ -164,13 +164,13 @@ module Jekyll
payload = site_payload
- Jekyll::Hooks.trigger self, :pre_render, payload
+ Jekyll::Hooks.trigger :site, :pre_render, self, payload
collections.each do |label, collection|
collection.docs.each do |document|
if regenerator.regenerate?(document)
document.output = Jekyll::Renderer.new(self, document, payload).run
- Jekyll::Hooks.trigger document, :post_render
+ Jekyll::Hooks.trigger :document, :post_render, document
end
end
end
@@ -199,7 +199,7 @@ module Jekyll
item.write(dest) if regenerator.regenerate?(item)
}
regenerator.write_metadata
- Jekyll::Hooks.trigger self, :post_write
+ Jekyll::Hooks.trigger :site, :post_write, self
end
# Construct a Hash of Posts indexed by the specified Post attribute.
From 611489aae1a076de6b00670201babeb74d9eef0b Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 28 Jul 2015 11:29:42 -0700
Subject: [PATCH 55/86] Update history to reflect merge of #3838
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 083e8415..466a7fa6 100644
--- a/History.markdown
+++ b/History.markdown
@@ -121,6 +121,7 @@
* Remove occasionally-problematic `ensure` in `LiquidRenderer` (#3811)
* Fixed an unclear code comment in site template SCSS (#3837)
* Fix reading of binary metadata file (#3845)
+ * Remove var collision with site template header menu iteration variable (#3838)
### Development Fixes
From 498ad6e83ae0b7a32ecdb3c4c8daef6edc071c21 Mon Sep 17 00:00:00 2001
From: Vitaly Repin
Date: Mon, 13 Jul 2015 16:20:12 +0300
Subject: [PATCH 56/86] Detailed instructions for rsync deployment method
Extended documentation on rsync-approach. It also mentions rrsync wrapper script which restricts access for rsync to the server. Based on my blog post here: http://vrepin.org/vr/JekyllDeploy/
Restored previous version of 'Rsync' section and renamed it to 'scp' to reflect the content
Misspelling corrected: authorized_keys, not auhorized_key
---
site/_docs/deployment-methods.md | 66 +++++++++++++++++++++++++++++++-
1 file changed, 64 insertions(+), 2 deletions(-)
diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md
index d9dd7ea2..8affad7a 100644
--- a/site/_docs/deployment-methods.md
+++ b/site/_docs/deployment-methods.md
@@ -89,11 +89,73 @@ Setup steps are fully documented
Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimweirich/rake), [HighLine](https://github.com/JEG2/highline), and
[Net::SSH](https://github.com/net-ssh/net-ssh). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/cdfbc4ec5321ff8d18c3ce936e9c749dbbc4f190/Rakefile).
+
+### scp
+
+Once you’ve generated the `_site` directory, you can easily scp it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy). You’d obviously need to change the values to reflect your site’s details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run this script from within Textmate.
+
### rsync
-Once you’ve generated the `_site` directory, you can easily rsync it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy). You’d obviously need to change the values to reflect your site’s details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run
-this script from within Textmate.
+Once you’ve generated the `_site` directory, you can easily rsync it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/vitalyrepin/vrepinblog/blob/master/transfer.sh). You’d obviously need to change the values to reflect your site’s details.
+#### Step 1: Install rrsync to your home folder (server-side)
+
+We will use certificate-based authorization to simplify the publishing process. It makes sense to restrict rsync access only to the directory which it is supposed to sync.
+
+That's why rrsync wrapper shall be installed. If it is not already installed by your hoster you can do it yourself:
+
+- [download rrsync](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
+- Put it to the bin subdirectory of your home folder (```~/bin```)
+- Make it executable (```chmod +x```)
+
+#### Step 2: Setup certificate-based ssh access (server side)
+
+[This process is described in a lot of places in the net](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication). We will not cover it here. What is different from usual approach is to put the restriction to certificate-based authorization in ```~/.ssh/authorized_keys```). We will launch ```rrsync``` utility and supply it with the folder it shall have read-write access to:
+
+```
+command="$HOME/bin/rrsync ",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa
+```
+
+`````` is the path to your site. E.g., ```~/public_html/you.org/blog-html/```.
+
+#### Step 3: Rsync! (client-side)
+
+Add the script ```deploy``` to the web site source folder:
+
+{% highlight shell %}
+#!/bin/sh
+
+rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded @:
+{% endhighlight %}
+
+Command line parameters are:
+
+- ```--rsh='ssh -p2222'``` It is needed if your hoster provides ssh access using ssh port different from default one (e.g., this is what hostgator is doing)
+- `````` is the name of the local folder with generated web content. By default it is ```_site/``` for Jekyll
+- `````` — ssh user name for your hosting account
+- `````` — your hosting server
+
+Example command line is:
+
+{% highlight shell %}
+rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@vrepin.org:
+{% endhighlight %}
+
+Don't forget column ':' after server name!
+
+#### Optional step 4: exclude transfer.sh from being copied to the output folder by Jekyll
+
+This step is recommended if you use this how-to to deploy Jekyll-based web site. If you put ```deploy``` script to the root folder of your project, Jekyll copies it to the output folder.
+This behavior can be changed in ```_config.yml```. Just add the following line there:
+
+{% highlight yaml %}
+# Do not copy these file to the output directory
+exclude: ["deploy"]
+{% endhighlight %}
+
+#### We are done!
+
+Now it's possible to publish your web site by launching ```deploy``` script. If your ssh certificate is [passphrase-protected](https://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html), you are asked to enter the password.
## Rack-Jekyll
From 0b790593105febec8dea46e790f893b3a69cf7de Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Fri, 31 Jul 2015 10:33:05 -0700
Subject: [PATCH 57/86] Update history to reflect merge of #3848
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 466a7fa6..584ba12b 100644
--- a/History.markdown
+++ b/History.markdown
@@ -222,6 +222,7 @@
* Update link for navbars with data attributes tutorial (#3728)
* Add `jekyll-asciinema` to list of third-party plugins (#3750)
* Update pagination example to be agnostic to first pagination dir (#3763)
+ * Detailed instructions for rsync deployment method (#3848)
## 2.5.3 / 2014-12-22
From 432ff579d9df4febb0641a298cce19f183d1f813 Mon Sep 17 00:00:00 2001
From: Shannon
Date: Sat, 1 Aug 2015 13:47:45 -0500
Subject: [PATCH 58/86] Add Jekyll Portfolio Generator to list of plugins
---
site/_docs/plugins.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/site/_docs/plugins.md b/site/_docs/plugins.md
index 023bc572..c8d3e288 100644
--- a/site/_docs/plugins.md
+++ b/site/_docs/plugins.md
@@ -711,6 +711,7 @@ LESS.js files during generation.
- [Jekyll::GitMetadata by Ivan Tse](https://github.com/ivantsepp/jekyll-git_metadata): Expose Git metadata for your templates.
- [Jekyll Http Basic Auth Plugin](https://gist.github.com/snrbrnjna/422a4b7e017192c284b3): Plugin to manage http basic auth for jekyll generated pages and directories.
- [Jekyll Auto Image by Merlos](https://github.com/merlos/jekyll-auto-image): Gets the first image of a post. Useful to list your posts with images or to add [twitter cards](https://dev.twitter.com/cards/overview) to your site.
+- [Jekyll Portfolio Generator by Shannon Babincsak](https://github.com/codeinpink/jekyll-portfolio-generator): Generates project pages and computes related projects out of project data files.
#### Converters
From 5cfef073a5db532c163ce053dce91500c0764c7e Mon Sep 17 00:00:00 2001
From: Peter Robins
Date: Sat, 1 Aug 2015 11:54:59 +0100
Subject: [PATCH 59/86] Add site.html_files to variables docs and improve
site.html_pages
---
site/_docs/variables.md | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/site/_docs/variables.md b/site/_docs/variables.md
index d3c5d946..d4fb5293 100644
--- a/site/_docs/variables.md
+++ b/site/_docs/variables.md
@@ -125,7 +125,15 @@ following is a reference of the available data.
site.html_pages
- A list of all HTML Pages.
+ A subset of `site.pages` listing those which end in `.html`.
+
+
+
+
+
site.html_files
+
+
+ A subset of `site.static_files` listing those which end in `.html`.
From 371ca58e69a378ab4cb8134f8f6dc507945c2732 Mon Sep 17 00:00:00 2001
From: Robert Papp
Date: Mon, 15 Jun 2015 00:15:15 +0200
Subject: [PATCH 60/86] Fixes #3776 by changing to the correct name for
whitelisting.
---
lib/jekyll/tags/highlight.rb | 2 +-
test/test_tags.rb | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/jekyll/tags/highlight.rb b/lib/jekyll/tags/highlight.rb
index e644146f..de8a7393 100644
--- a/lib/jekyll/tags/highlight.rb
+++ b/lib/jekyll/tags/highlight.rb
@@ -64,7 +64,7 @@ eos
if is_safe
Hash[[
[:startinline, opts.fetch(:startinline, nil)],
- [:hl_linenos, opts.fetch(:hl_linenos, nil)],
+ [:hl_lines, opts.fetch(:hl_lines, nil)],
[:linenos, opts.fetch(:linenos, nil)],
[:encoding, opts.fetch(:encoding, 'utf-8')],
[:cssclass, opts.fetch(:cssclass, nil)]
diff --git a/test/test_tags.rb b/test/test_tags.rb
index ef919ede..0da6d7b6 100644
--- a/test/test_tags.rb
+++ b/test/test_tags.rb
@@ -114,9 +114,9 @@ CONTENT
assert_equal true, sanitized[:linenos]
end
- should "allow hl_linenos" do
- sanitized = @tag.sanitized_opts({:hl_linenos => %w[1 2 3 4]}, true)
- assert_equal %w[1 2 3 4], sanitized[:hl_linenos]
+ should "allow hl_lines" do
+ sanitized = @tag.sanitized_opts({:hl_lines => %w[1 2 3 4]}, true)
+ assert_equal %w[1 2 3 4], sanitized[:hl_lines]
end
should "allow cssclass" do
From 90586d229cb491a680a9db5e75e6148886f65787 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 4 Aug 2015 16:11:51 -0700
Subject: [PATCH 61/86] Update history to reflect merge of #3787
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 584ba12b..575b8782 100644
--- a/History.markdown
+++ b/History.markdown
@@ -122,6 +122,7 @@
* Fixed an unclear code comment in site template SCSS (#3837)
* Fix reading of binary metadata file (#3845)
* Remove var collision with site template header menu iteration variable (#3838)
+ * Change non-existent `hl_linenos` to `hl_lines` to allow passthrough in safe mode (#3787)
### Development Fixes
From 76c96fc7ac04fdb7c0d3323344c964ce839edbf5 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 4 Aug 2015 16:12:19 -0700
Subject: [PATCH 62/86] Update history to reflect merge of #3883
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 575b8782..5e1a17b7 100644
--- a/History.markdown
+++ b/History.markdown
@@ -224,6 +224,7 @@
* Add `jekyll-asciinema` to list of third-party plugins (#3750)
* Update pagination example to be agnostic to first pagination dir (#3763)
* Detailed instructions for rsync deployment method (#3848)
+ * Add Jekyll Portfolio Generator to list of plugins (#3883)
## 2.5.3 / 2014-12-22
From 84ca5780dff58593d02bc590a67914e20741a3e3 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 4 Aug 2015 16:12:56 -0700
Subject: [PATCH 63/86] Update history to reflect merge of #3880
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 5e1a17b7..4ecf96f9 100644
--- a/History.markdown
+++ b/History.markdown
@@ -225,6 +225,7 @@
* Update pagination example to be agnostic to first pagination dir (#3763)
* Detailed instructions for rsync deployment method (#3848)
* Add Jekyll Portfolio Generator to list of plugins (#3883)
+ * Add `site.html_files` to variables docs (#3880)
## 2.5.3 / 2014-12-22
From 775645e31c7db569f406019bd8df134db178dfa6 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 4 Aug 2015 16:14:28 -0700
Subject: [PATCH 64/86] Update history to reflect merge of #3865
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 4ecf96f9..81485294 100644
--- a/History.markdown
+++ b/History.markdown
@@ -226,6 +226,7 @@
* Detailed instructions for rsync deployment method (#3848)
* Add Jekyll Portfolio Generator to list of plugins (#3883)
* Add `site.html_files` to variables docs (#3880)
+ * Add Static Publisher tool to list of deployment methods (#3865)
## 2.5.3 / 2014-12-22
From e9b1f6db3d15c2553b417fda2f5a2f16a223634a Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 4 Aug 2015 16:15:24 -0700
Subject: [PATCH 65/86] Update history to reflect merge of #3852
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 81485294..58074685 100644
--- a/History.markdown
+++ b/History.markdown
@@ -157,6 +157,7 @@
* Update Kramdown. (#3853)
* Updated the scripts shebang for portability (#3858)
* Update JRuby testing to 9K ([3ab386f](https://github.com/jekyll/jekyll/commit/3ab386f1b096be25a24fe038fc70fd0fb08d545d))
+ * Organize dependencies into dev and test groups. (#3852)
### Site Enhancements
From a849674f7d19b5d3d411c33aa121201cb332443e Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Tue, 4 Aug 2015 16:16:15 -0700
Subject: [PATCH 66/86] Update history to reflect merge of #3820
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 58074685..bec3cca6 100644
--- a/History.markdown
+++ b/History.markdown
@@ -123,6 +123,7 @@
* Fix reading of binary metadata file (#3845)
* Remove var collision with site template header menu iteration variable (#3838)
* Change non-existent `hl_linenos` to `hl_lines` to allow passthrough in safe mode (#3787)
+ * Add missing flag to disable the watcher (#3820)
### Development Fixes
From d3c327e1847c52f5fe7fdb434f2c1b8e802cd2a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johan=20Bov=C3=A9?=
Date: Wed, 5 Aug 2015 08:52:01 +0200
Subject: [PATCH 67/86] Further flesh out Continuous Integration guide
More information added after having some trouble getting Travis to execute with the existing explanation.
---
site/_docs/continuous-integration.md | 45 ++++++++++++++++++++++++----
site/_docs/deployment-methods.md | 4 +--
2 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/site/_docs/continuous-integration.md b/site/_docs/continuous-integration.md
index 18506077..b98de42c 100644
--- a/site/_docs/continuous-integration.md
+++ b/site/_docs/continuous-integration.md
@@ -34,6 +34,8 @@ This tool checks your resulting site to ensure all links and images exist.
Utilize it either with the convenient `htmlproof` command-line executable,
or write a Ruby script which utilizes the gem.
+Save the commands you want to run and succeed in a file: `./script/cibuild`
+
### The HTML Proofer Executable
{% highlight bash %}
@@ -48,6 +50,12 @@ Some options can be specified via command-line switches. Check out the
`html-proofer` README for more information about these switches, or run
`htmlproof --help` locally.
+For example to avoid testing external sites, use this command:
+
+{% highlight bash %}
+$ bundle exec htmlproof ./_site --disable-external
+{% endhighlight %}
+
### The HTML Proofer Library
You can also invoke `html-proofer` in Ruby scripts (e.g. in a Rakefile):
@@ -81,15 +89,21 @@ gem "jekyll"
gem "html-proofer"
{% endhighlight %}
+Your `.travis.yml` file should look like this:
{% highlight yaml %}
language: ruby
rvm:
- 2.1
-# Assume bundler is being used, install step will run `bundle install`.
+
+before_script:
+ - chmod +x ./script/cibuild # or do this locally and commit
+
+# Assume bundler is being used, therefore
+# the `install` step will run `bundle install` by default.
script: ./script/cibuild
-# branch whitelist
+# branch whitelist, only for GitHub Pages
branches:
only:
- gh-pages # test the gh-pages branch
@@ -118,6 +132,16 @@ RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This
directive tells Travis the Ruby version to use when running your test
script.
+{% highlight yaml %}
+before_script:
+ - chmod +x ./script/cibuild
+{% endhighlight %}
+
+The build script file needs to have the *executable* attribute set or
+Travis will fail with a permission denied error. You can also run this
+locally and commit the permissions directly, thus rendering this step
+irrelevant.
+
{% highlight yaml %}
script: ./script/cibuild
{% endhighlight %}
@@ -136,7 +160,7 @@ script: jekyll build && htmlproof ./_site
The `script` directive can be absolutely any valid shell command.
{% highlight yaml %}
-# branch whitelist
+# branch whitelist, only for GitHub Pages
branches:
only:
- gh-pages # test the gh-pages branch
@@ -152,7 +176,8 @@ a pull request flow for proposing changes, you may wish to enforce a
convention for your builds such that all branches containing edits are
prefixed, exemplified above with the `/pages-(.*)/` regular expression.
-The `branches` directive is completely optional.
+The `branches` directive is completely optional. Travis will build from every
+push to any branch of your repo if leave it out.
{% highlight yaml %}
env:
@@ -177,10 +202,20 @@ environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` to `true`.
exclude: [vendor]
{% endhighlight %}
+### Troubleshooting
+
+**Travis error:** *"You are trying to install in deployment mode after changing
+your Gemfile. Run bundle install elsewhere and add the updated Gemfile.lock
+to version control."*
+
+**Workaround:** Either run `bundle install` locally and commit your changes to
+`Gemfile.lock`, or remove the `Gemfile.lock` file from your repository and add
+an entry in the `.gitignore` file to avoid it from being checked in again.
+
### Questions?
This entire guide is open-source. Go ahead and [edit it][3] if you have a
fix or [ask for help][4] if you run into trouble and need some help.
[3]: https://github.com/jekyll/jekyll/edit/master/site/_docs/continuous-integration.md
-[4]: https://github.com/jekyll/jekyll-help#how-do-i-ask-a-question
+[4]: http://jekyllrb.com/help/
diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md
index 8d78cf31..c1040b2b 100644
--- a/site/_docs/deployment-methods.md
+++ b/site/_docs/deployment-methods.md
@@ -126,7 +126,7 @@ command="$HOME/bin/rrsync ",no-agent-forwarding,no-port-forwarding,no-pt
Add the script ```deploy``` to the web site source folder:
-{% highlight shell %}
+{% highlight bash %}
#!/bin/sh
rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded @:
@@ -141,7 +141,7 @@ Command line parameters are:
Example command line is:
-{% highlight shell %}
+{% highlight bash %}
rsync -avr --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@vrepin.org:
{% endhighlight %}
From 44f0e5b14acda389d741775d2c43af1d399c4eb4 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 5 Aug 2015 10:19:09 -0700
Subject: [PATCH 68/86] Update history to reflect merge of #3891
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index bec3cca6..d984173d 100644
--- a/History.markdown
+++ b/History.markdown
@@ -124,6 +124,7 @@
* Remove var collision with site template header menu iteration variable (#3838)
* Change non-existent `hl_linenos` to `hl_lines` to allow passthrough in safe mode (#3787)
* Add missing flag to disable the watcher (#3820)
+ * Update CI guide to include more direct explanations of the flow (#3891)
### Development Fixes
From 1f29e5b5dcd1fcaace787b49f7903c62a3ebb999 Mon Sep 17 00:00:00 2001
From: Nate Berkopec
Date: Wed, 5 Aug 2015 17:09:21 -0400
Subject: [PATCH 69/86] Contributing.md should refer to script/cucumber
---
CONTRIBUTING.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.markdown
index 0f5be303..e4f9fda5 100644
--- a/CONTRIBUTING.markdown
+++ b/CONTRIBUTING.markdown
@@ -40,7 +40,7 @@ Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
$ bundle exec rake test
- $ bundle exec rake features
+ $ bundle exec script/cucumber
Workflow
--------
From 11230718a446a279c0db9058eee5c30fbee2323b Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 5 Aug 2015 14:19:38 -0700
Subject: [PATCH 70/86] Update history to reflect merge of #3894
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index d984173d..1d8f7356 100644
--- a/History.markdown
+++ b/History.markdown
@@ -160,6 +160,7 @@
* Updated the scripts shebang for portability (#3858)
* Update JRuby testing to 9K ([3ab386f](https://github.com/jekyll/jekyll/commit/3ab386f1b096be25a24fe038fc70fd0fb08d545d))
* Organize dependencies into dev and test groups. (#3852)
+ * Contributing.md should refer to `script/cucumber` (#3894)
### Site Enhancements
From 489b9c3639fe3373d098fdd40f1bbc8c49b61e31 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 5 Aug 2015 14:30:31 -0700
Subject: [PATCH 71/86] update contributing documentation to reflect workflow
updates
---
CONTRIBUTING.markdown | 32 ++++++++++++-----
site/_docs/contributing.md | 74 +++++++++++++++++---------------------
2 files changed, 56 insertions(+), 50 deletions(-)
diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.markdown
index e4f9fda5..f83249c9 100644
--- a/CONTRIBUTING.markdown
+++ b/CONTRIBUTING.markdown
@@ -31,16 +31,25 @@ Test Dependencies
-----------------
To run the test suite and build the gem you'll need to install Jekyll's
-dependencies. Jekyll uses Bundler, so a quick run of the bundle command and
-you're all set!
+dependencies. Simply run this command to get all setup:
- $ bundle
+ $ script/bootstrap
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
- $ bundle exec rake test
- $ bundle exec script/cucumber
+ $ script/cibuild
+
+If you are only updating a file in `test/`, you can use the command:
+
+ $ script/test test/blah_test.rb
+
+If you are only updating a `.feature` file, you can use the command:
+
+ $ script/cucumber features/blah.feature
+
+Both `script/test` and `script/cucumber` can be run without arguments to
+run its entire respective suite.
Workflow
--------
@@ -48,10 +57,10 @@ Workflow
Here's the most direct way to get your work merged into the project:
* Fork the project.
-* Clone down your fork ( `git clone git@github.com:/jekyll.git` ).
+* Clone down your fork ( `git clone git@github.com:[username]/jekyll.git` ).
* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ).
* Hack away, add tests. Not necessarily in that order.
-* Make sure everything still passes by running `rake`.
+* Make sure everything still passes by running `script/cibuild`.
* If necessary, rebase your commits into logical chunks, without errors.
* Push the branch up ( `git push origin my_awesome_feature` ).
* Create a pull request against jekyll/jekyll and describe what your change
@@ -74,11 +83,16 @@ requests directed at another branch will not be accepted.
The [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) on GitHub
can be freely updated without a pull request as all GitHub users have access.
+If you want to add your plugin to the
+[list of plugins](http://jekyllrb.com/docs/plugins/#available-plugins),
+please submit a pull request modifying the
+[plugins page source file](site/_docs/plugins.md) by adding a
+link to your plugin under the proper subheading depending upon its type.
+
Gotchas
-------
-* If you want to bump the gem version, please put that in a separate commit.
- This way, the maintainers can control when the gem gets released.
+* Please do not bump the gem version in your pull requests.
* Try to keep your patch(es) based from the latest commit on jekyll/jekyll.
The easier it is to apply your work, the less work the maintainers have to do,
which is always a good thing.
diff --git a/site/_docs/contributing.md b/site/_docs/contributing.md
index 150525fb..ae768e5b 100644
--- a/site/_docs/contributing.md
+++ b/site/_docs/contributing.md
@@ -7,10 +7,12 @@ permalink: /docs/contributing/
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
+* **Use https://talk.jekyllrb.com for non-technical or indirect Jekyll questions that are not bugs.**
+* **Contributions will not be accepted without tests or necessary documentation updates.**
* If you're creating a small fix or patch to an existing feature, just a simple
test will do. Please stay in the confines of the current test suite and use
[Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and
- [RSpec Mocks](https://github.com/rspec/rspec-mocks/).
+ [RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, make sure to create a new
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps
where appropriate. Also, whipping up some documentation in your fork's `site`
@@ -36,24 +38,30 @@ following in mind:
+
Test Dependencies
-----------------
To run the test suite and build the gem you'll need to install Jekyll's
-dependencies. Jekyll uses Bundler, so a quick run of the `bundle` command and
-you're all set!
+dependencies. Simply run this command to get all setup:
-{% highlight bash %}
-$ bundle
-{% endhighlight %}
+ $ script/bootstrap
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
-{% highlight bash %}
-$ bundle exec rake test
-$ bundle exec rake features
-{% endhighlight %}
+ $ script/cibuild
+
+If you are only updating a file in `test/`, you can use the command:
+
+ $ script/test test/blah_test.rb
+
+If you are only updating a `.feature` file, you can use the command:
+
+ $ script/cucumber features/blah.feature
+
+Both `script/test` and `script/cucumber` can be run without arguments to
+run its entire respective suite.
Workflow
--------
@@ -61,30 +69,14 @@ Workflow
Here's the most direct way to get your work merged into the project:
* Fork the project.
-* Clone down your fork:
-
-{% highlight bash %}
-git clone git://github.com//jekyll.git
-{% endhighlight %}
-
-* Create a topic branch to contain your change:
-
-{% highlight bash %}
-git checkout -b my_awesome_feature
-{% endhighlight %}
-
-
+* Clone down your fork ( `git clone git@github.com:[username]/jekyll.git` ).
+* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ).
* Hack away, add tests. Not necessarily in that order.
-* Make sure everything still passes by running `rake`.
+* Make sure everything still passes by running `script/cibuild`.
* If necessary, rebase your commits into logical chunks, without errors.
-* Push the branch up:
-
-{% highlight bash %}
-git push origin my_awesome_feature
-{% endhighlight %}
-
-* Create a pull request against jekyll/jekyll:master and describe what your
- change does and the why you think it should be merged.
+* Push the branch up ( `git push origin my_awesome_feature` ).
+* Create a pull request against jekyll/jekyll and describe what your change
+ does and the why you think it should be merged.
Updating Documentation
----------------------
@@ -101,8 +93,7 @@ All documentation pull requests should be directed at `master`. Pull
requests directed at another branch will not be accepted.
The [Jekyll wiki]({{ site.repository }}/wiki) on GitHub
-can be freely updated without a pull request as all
-GitHub users have access.
+can be freely updated without a pull request as all GitHub users have access.
If you want to add your plugin to the [list of plugins](/docs/plugins/#available-plugins),
please submit a pull request modifying the [plugins page source
@@ -112,14 +103,15 @@ link to your plugin under the proper subheading depending upon its type.
Gotchas
-------
-* If you want to bump the gem version, please put that in a separate commit.
- This way, the maintainers can control when the gem gets released.
+* Please do not bump the gem version in your pull requests.
* Try to keep your patch(es) based from the latest commit on jekyll/jekyll.
- The easier it is to apply your work, the less work the maintainers have to
- do, which is always a good thing.
-* Please don't tag your GitHub issue with \[fix\], \[feature\], etc. The
- maintainers actively read the issues and will label it once they come across
- it.
+ The easier it is to apply your work, the less work the maintainers have to do,
+ which is always a good thing.
+* Please don't tag your GitHub issue with [fix], [feature], etc. The maintainers
+ actively read the issues and will label it once they come across it.
+
+Finally...
+----------
Let us know what could be better!
From 7c8e24a488831ee1a571eedc4d9b1cdbd89754bf Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Wed, 5 Aug 2015 14:31:48 -0700
Subject: [PATCH 72/86] Update history to reflect merge of #3895
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 1d8f7356..e43cd4b5 100644
--- a/History.markdown
+++ b/History.markdown
@@ -161,6 +161,7 @@
* Update JRuby testing to 9K ([3ab386f](https://github.com/jekyll/jekyll/commit/3ab386f1b096be25a24fe038fc70fd0fb08d545d))
* Organize dependencies into dev and test groups. (#3852)
* Contributing.md should refer to `script/cucumber` (#3894)
+ * Update contributing documentation to reflect workflow updates (#3895)
### Site Enhancements
From aecfe4c1602a27a357126d7aedc377d06ab13d2e Mon Sep 17 00:00:00 2001
From: Veres Lajos
Date: Fri, 7 Aug 2015 22:32:33 +0100
Subject: [PATCH 73/86] typofix in site/_docs/plugins.md
---
site/_docs/plugins.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/plugins.md b/site/_docs/plugins.md
index c8d3e288..cf0a8bab 100644
--- a/site/_docs/plugins.md
+++ b/site/_docs/plugins.md
@@ -745,7 +745,7 @@ LESS.js files during generation.
- [Smilify](https://github.com/SaswatPadhi/jekyll_smilify) by [SaswatPadhi](https://github.com/SaswatPadhi): Convert text emoticons in your content to themeable smiley pics.
- [Read in X Minutes](https://gist.github.com/zachleat/5792681) by [zachleat](https://github.com/zachleat): Estimates the reading time of a string (for blog post content).
- [Jekyll-timeago](https://github.com/markets/jekyll-timeago): Converts a time value to the time ago in words.
-- [pluralize](https://github.com/bdesham/pluralize): Easily combine a number and a word into a gramatically-correct amount like “1 minute” or “2 minute**s**”.
+- [pluralize](https://github.com/bdesham/pluralize): Easily combine a number and a word into a grammatically-correct amount like “1 minute” or “2 minute**s**”.
- [reading_time](https://github.com/bdesham/reading_time): Count words and estimate reading time for a piece of text, ignoring HTML elements that are unlikely to contain running text.
- [Table of Content Generator](https://github.com/dafi/jekyll-toc-generator): Generate the HTML code containing a table of content (TOC), the TOC can be customized in many way, for example you can decide which pages can be without TOC.
- [jekyll-humanize](https://github.com/23maverick23/jekyll-humanize): This is a port of the Django app humanize which adds a "human touch" to data. Each method represents a Fluid type filter that can be used in your Jekyll site templates. Given that Jekyll produces static sites, some of the original methods do not make logical sense to port (e.g. naturaltime).
From d652f6e337915361bbbd7bef6b5eb021810e6bfa Mon Sep 17 00:00:00 2001
From: Veres Lajos
Date: Fri, 7 Aug 2015 22:32:36 +0100
Subject: [PATCH 74/86] typofix in test/test_regenerator.rb
---
test/test_regenerator.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test_regenerator.rb b/test/test_regenerator.rb
index f1221bda..6e2ce477 100644
--- a/test/test_regenerator.rb
+++ b/test/test_regenerator.rb
@@ -49,7 +49,7 @@ class TestRegenerator < JekyllUnitTest
@regenerator = Regenerator.new(@site)
# these should pass, since nothing has changed, and the
- # loop above made sure the desinations exist
+ # loop above made sure the designations exist
assert !@regenerator.regenerate?(@page)
assert !@regenerator.regenerate?(@post)
assert !@regenerator.regenerate?(@document)
From af3fe0f30d172d8ab712919d0aeaee8210639250 Mon Sep 17 00:00:00 2001
From: Jordon Bedwell
Date: Sat, 8 Aug 2015 17:39:26 -0500
Subject: [PATCH 75/86] Update history.markdown to reflect the merger of #3897.
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index e43cd4b5..9d498006 100644
--- a/History.markdown
+++ b/History.markdown
@@ -232,6 +232,7 @@
* Add Jekyll Portfolio Generator to list of plugins (#3883)
* Add `site.html_files` to variables docs (#3880)
* Add Static Publisher tool to list of deployment methods (#3865)
+ * Fix a few typos. (#3897)
## 2.5.3 / 2014-12-22
From ac56e9dd1684f6bf0c58dfc48bcb5378866ddb61 Mon Sep 17 00:00:00 2001
From: Fabio Niephaus
Date: Thu, 11 Jun 2015 11:24:58 -0700
Subject: [PATCH 76/86] Make _includes directory configurable; closes #2684
and rename `plugins`, `layouts` and `data_source` directories for consistency
---
bin/jekyll | 4 +--
features/site_configuration.feature | 2 +-
lib/jekyll/configuration.rb | 34 +++++++++++++++++++++---
lib/jekyll/convertible.rb | 2 +-
lib/jekyll/plugin_manager.rb | 6 ++---
lib/jekyll/reader.rb | 2 +-
lib/jekyll/readers/layout_reader.rb | 4 +--
lib/jekyll/renderer.rb | 2 +-
lib/jekyll/tags/include.rb | 8 +++---
site/_docs/configuration.md | 13 ++++-----
test/source/_includes_custom/custom.html | 1 +
test/test_configuration.rb | 14 ++++++++++
test/test_site.rb | 8 +++---
test/test_tags.rb | 17 ++++++++++++
14 files changed, 89 insertions(+), 28 deletions(-)
create mode 100644 test/source/_includes_custom/custom.html
diff --git a/bin/jekyll b/bin/jekyll
index 60330cd7..b88f9cb9 100755
--- a/bin/jekyll
+++ b/bin/jekyll
@@ -22,8 +22,8 @@ Mercenary.program(:jekyll) do |p|
p.option 'source', '-s', '--source [DIR]', 'Source directory (defaults to ./)'
p.option 'destination', '-d', '--destination [DIR]', 'Destination directory (defaults to ./_site)'
p.option 'safe', '--safe', 'Safe mode (defaults to false)'
- p.option 'plugins', '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
- p.option 'layouts', '--layouts DIR', String, 'Layouts directory (defaults to ./_layouts)'
+ p.option 'plugins_dir', '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
+ p.option 'layouts_dir', '--layouts DIR', String, 'Layouts directory (defaults to ./_layouts)'
Jekyll::Command.subclasses.each { |c| c.init_with_program(p) }
diff --git a/features/site_configuration.feature b/features/site_configuration.feature
index c9edc2ff..379cea4f 100644
--- a/features/site_configuration.feature
+++ b/features/site_configuration.feature
@@ -224,7 +224,7 @@ Feature: Site configuration
| key | value |
| time | 2010-01-01 |
| future | true |
- | layouts | _theme |
+ | layouts_dir | _theme |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb
index 35b10503..68dd9faf 100644
--- a/lib/jekyll/configuration.rb
+++ b/lib/jekyll/configuration.rb
@@ -9,9 +9,10 @@ module Jekyll
# Where things are
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
- 'plugins' => '_plugins',
- 'layouts' => '_layouts',
- 'data_source' => '_data',
+ 'plugins_dir' => '_plugins',
+ 'layouts_dir' => '_layouts',
+ 'data_dir' => '_data',
+ 'includes_dir' => '_includes',
'collections' => nil,
# Handling Reading
@@ -263,6 +264,33 @@ module Jekyll
"`_config.yml` file."
end
+ if config.key? 'plugins'
+ Jekyll::Deprecator.deprecation_message "The 'plugins'" +
+ " configuration option has been renamed to 'plugins_dir'." +
+ " Please update your config file accordingly."
+ # copy but don't overwrite:
+ config['plugins_dir'] = config['plugins'] unless config.key?('plugins_dir')
+ config.delete('plugins')
+ end
+
+ if config.key? 'layouts'
+ Jekyll::Deprecator.deprecation_message "The 'layouts'" +
+ " configuration option has been renamed to 'layouts_dir'." +
+ " Please update your config file accordingly."
+ # copy but don't overwrite:
+ config['layouts_dir'] = config['layouts'] unless config.key?('layouts_dir')
+ config.delete('layouts')
+ end
+
+ if config.key? 'data_source'
+ Jekyll::Deprecator.deprecation_message "The 'data_source'" +
+ " configuration option has been renamed to 'data_dir'." +
+ " Please update your config file accordingly."
+ # copy but don't overwrite:
+ config['data_dir'] = config['data_source'] unless config.key?('data_dir')
+ config.delete('data_source')
+ end
+
config
end
diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb
index 5767ab02..bb336085 100644
--- a/lib/jekyll/convertible.rb
+++ b/lib/jekyll/convertible.rb
@@ -211,7 +211,7 @@ module Jekyll
self.output = render_liquid(layout.content,
payload,
info,
- File.join(site.config['layouts'], layout.name))
+ File.join(site.config['layouts_dir'], layout.name))
# Add layout to dependency tree
site.regenerator.add_dependency(
diff --git a/lib/jekyll/plugin_manager.rb b/lib/jekyll/plugin_manager.rb
index 5ba0924f..bc541617 100644
--- a/lib/jekyll/plugin_manager.rb
+++ b/lib/jekyll/plugin_manager.rb
@@ -82,10 +82,10 @@ module Jekyll
#
# Returns an Array of plugin search paths
def plugins_path
- if (site.config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
- [site.in_source_dir(site.config['plugins'])]
+ if (site.config['plugins_dir'] == Jekyll::Configuration::DEFAULTS['plugins_dir'])
+ [site.in_source_dir(site.config['plugins_dir'])]
else
- Array(site.config['plugins']).map { |d| File.expand_path(d) }
+ Array(site.config['plugins_dir']).map { |d| File.expand_path(d) }
end
end
diff --git a/lib/jekyll/reader.rb b/lib/jekyll/reader.rb
index 892bc917..b8cdae18 100644
--- a/lib/jekyll/reader.rb
+++ b/lib/jekyll/reader.rb
@@ -16,7 +16,7 @@ module Jekyll
@site.layouts = LayoutReader.new(site).read
read_directories
sort_files!
- @site.data = DataReader.new(site).read(site.config['data_source'])
+ @site.data = DataReader.new(site).read(site.config['data_dir'])
CollectionReader.new(site).read
end
diff --git a/lib/jekyll/readers/layout_reader.rb b/lib/jekyll/readers/layout_reader.rb
index a8466beb..f0620294 100644
--- a/lib/jekyll/readers/layout_reader.rb
+++ b/lib/jekyll/readers/layout_reader.rb
@@ -38,11 +38,11 @@ module Jekyll
end
def layout_directory_inside_source
- site.in_source_dir(site.config['layouts'])
+ site.in_source_dir(site.config['layouts_dir'])
end
def layout_directory_in_cwd
- dir = Jekyll.sanitized_path(Dir.pwd, site.config['layouts'])
+ dir = Jekyll.sanitized_path(Dir.pwd, site.config['layouts_dir'])
if File.directory?(dir) && !site.safe
dir
else
diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb
index 4a772978..9683c44f 100644
--- a/lib/jekyll/renderer.rb
+++ b/lib/jekyll/renderer.rb
@@ -138,7 +138,7 @@ module Jekyll
layout.content,
payload,
info,
- File.join(site.config['layouts'], layout.name)
+ File.join(site.config['layouts_dir'], layout.name)
)
# Add layout to dependency tree
diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb
index b809ffe7..38b90790 100644
--- a/lib/jekyll/tags/include.rb
+++ b/lib/jekyll/tags/include.rb
@@ -20,7 +20,6 @@ module Jekyll
def initialize(tag_name, markup, tokens)
super
- @includes_dir = tag_includes_dir
matched = markup.strip.match(VARIABLE_SYNTAX)
if matched
@file = matched['variable'].strip
@@ -100,12 +99,13 @@ eos
end
end
- def tag_includes_dir
- '_includes'.freeze
+ def tag_includes_dir(context)
+ context.registers[:site].config['includes_dir'].freeze
end
def render(context)
site = context.registers[:site]
+ @includes_dir = tag_includes_dir(context)
dir = resolved_includes_dir(context)
file = render_variable(context) || @file
@@ -161,7 +161,7 @@ eos
end
class IncludeRelativeTag < IncludeTag
- def tag_includes_dir
+ def tag_includes_dir(context)
'.'.freeze
end
diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md
index f9ac4eaa..2d397cad 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -465,12 +465,13 @@ file or on the command-line.
{% highlight yaml %}
# Where things are
-source: .
-destination: ./_site
-plugins: ./_plugins
-layouts: ./_layouts
-data_source: ./_data
-collections: null
+source: .
+destination: ./_site
+plugins_dir: ./_plugins
+layouts_dir: ./_layouts
+data_dir: ./_data
+includes_dir: ./_includes
+collections: null
# Handling Reading
safe: false
diff --git a/test/source/_includes_custom/custom.html b/test/source/_includes_custom/custom.html
new file mode 100644
index 00000000..cbf553c6
--- /dev/null
+++ b/test/source/_includes_custom/custom.html
@@ -0,0 +1 @@
+custom_included
\ No newline at end of file
diff --git a/test/test_configuration.rb b/test/test_configuration.rb
index ce54223c..bd99dc8b 100644
--- a/test/test_configuration.rb
+++ b/test/test_configuration.rb
@@ -66,6 +66,9 @@ class TestConfiguration < JekyllUnitTest
"exclude" => "READ-ME.md, Gemfile,CONTRIBUTING.hello.markdown",
"include" => "STOP_THE_PRESSES.txt,.heloses, .git",
"pygments" => true,
+ "plugins" => true,
+ "layouts" => true,
+ "data_source" => true,
}]
end
should "unset 'auto' and 'watch'" do
@@ -93,6 +96,17 @@ class TestConfiguration < JekyllUnitTest
assert !@config.backwards_compatibilize.key?("pygments")
assert_equal @config.backwards_compatibilize["highlighter"], "pygments"
end
+ should "adjust directory names" do
+ assert @config.key?("plugins")
+ assert !@config.backwards_compatibilize.key?("plugins")
+ assert @config.backwards_compatibilize["plugins_dir"]
+ assert @config.key?("layouts")
+ assert !@config.backwards_compatibilize.key?("layouts")
+ assert @config.backwards_compatibilize["layouts_dir"]
+ assert @config.key?("data_source")
+ assert !@config.backwards_compatibilize.key?("data_source")
+ assert @config.backwards_compatibilize["data_dir"]
+ end
end
context "#fix_common_issues" do
setup do
diff --git a/test/test_site.rb b/test/test_site.rb
index 6b65ddb4..ba83c5c7 100644
--- a/test/test_site.rb
+++ b/test/test_site.rb
@@ -13,22 +13,22 @@ class TestSite < JekyllUnitTest
end
should "have an array for plugins if passed as a string" do
- site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => '/tmp/plugins'}))
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins_dir' => '/tmp/plugins'}))
assert_equal ['/tmp/plugins'], site.plugins
end
should "have an array for plugins if passed as an array" do
- site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => ['/tmp/plugins', '/tmp/otherplugins']}))
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins_dir' => ['/tmp/plugins', '/tmp/otherplugins']}))
assert_equal ['/tmp/plugins', '/tmp/otherplugins'], site.plugins
end
should "have an empty array for plugins if nothing is passed" do
- site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => []}))
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins_dir' => []}))
assert_equal [], site.plugins
end
should "have an empty array for plugins if nil is passed" do
- site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => nil}))
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins_dir' => nil}))
assert_equal [], site.plugins
end
diff --git a/test/test_tags.rb b/test/test_tags.rb
index ef919ede..58b481eb 100644
--- a/test/test_tags.rb
+++ b/test/test_tags.rb
@@ -600,6 +600,23 @@ CONTENT
end
end
+ context "with custom includes directory" do
+ setup do
+ content = < '_includes_custom', 'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
+ end
+
+ should "include file from custom directory" do
+ assert_match "custom_included", @result
+ end
+ end
+
context "without parameters within if statement" do
setup do
content = <
Date: Wed, 5 Aug 2015 13:42:08 -0400
Subject: [PATCH 77/86] Future should be set to false in the default config
---
features/create_sites.feature | 18 +++++++++++++++---
lib/jekyll/configuration.rb | 2 +-
site/_docs/configuration.md | 2 +-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/features/create_sites.feature b/features/create_sites.feature
index 18996bfe..6eb05dc3 100644
--- a/features/create_sites.feature
+++ b/features/create_sites.feature
@@ -112,16 +112,16 @@ Feature: Create sites
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
Scenario: Basic site with internal post linking
- Given I have an "index.html" page that contains "URL: {% post_url 2020-01-31-entry2 %}"
+ Given I have an "index.html" page that contains "URL: {% post_url 2008-01-01-entry2 %}"
And I have a configuration file with "permalink" set to "pretty"
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2007-12-31 | post | content for entry1. |
- | entry2 | 2020-01-31 | post | content for entry2. |
+ | entry2 | 2008-01-01 | post | content for entry2. |
When I run jekyll build
Then the _site directory should exist
- And I should see "URL: /2020/01/31/entry2/" in "_site/index.html"
+ And I should see "URL: /2008/01/01/entry2/" in "_site/index.html"
Scenario: Basic site with whitelisted dotfile
Given I have an ".htaccess" file that contains "SomeDirective"
@@ -156,3 +156,15 @@ Feature: Create sites
And the "_site/index.html" file should exist
And the "_site/public.html" file should exist
And the "_site/secret.html" file should exist
+
+ Scenario: Basic site with page with future date
+ Given I have a _posts directory
+ And I have the following post:
+ | title | date | layout | content |
+ | entry1 | 2020-12-31 | post | content for entry1. |
+ When I run jekyll build
+ Then the _site directory should not exist
+
+ When I run jekyll build --future
+ Then the _site directory should exist
+ And the "_site/2020/12/31/entry1.html" file should exist
diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb
index 35b10503..832d3ef0 100644
--- a/lib/jekyll/configuration.rb
+++ b/lib/jekyll/configuration.rb
@@ -26,7 +26,7 @@ module Jekyll
# Filtering Content
'show_drafts' => nil,
'limit_posts' => 0,
- 'future' => true, # remove and make true just default
+ 'future' => false,
'unpublished' => false,
# Plugins
diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md
index ad7764b0..f89d06c5 100644
--- a/site/_docs/configuration.md
+++ b/site/_docs/configuration.md
@@ -483,7 +483,7 @@ markdown_ext: "markdown,mkdown,mkdn,mkd,md"
# Filtering Content
show_drafts: null
limit_posts: 0
-future: true
+future: false
unpublished: false
# Plugins
From 63a51df90937dcea8e3d0a3f8dcdb32d541e7b93 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Sun, 16 Aug 2015 13:15:47 -0400
Subject: [PATCH 78/86] Fix up test for 'future' flag. /cc #3892
---
features/create_sites.feature | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/features/create_sites.feature b/features/create_sites.feature
index 6eb05dc3..898115c2 100644
--- a/features/create_sites.feature
+++ b/features/create_sites.feature
@@ -162,9 +162,11 @@ Feature: Create sites
And I have the following post:
| title | date | layout | content |
| entry1 | 2020-12-31 | post | content for entry1. |
+ | entry2 | 2007-12-31 | post | content for entry2. |
When I run jekyll build
- Then the _site directory should not exist
-
+ Then the _site directory should exist
+ And I should see "content for entry2" in "_site/2007/12/31/entry2.html"
+ And the "_site/2020/12/31/entry1.html" file should not exist
When I run jekyll build --future
Then the _site directory should exist
And the "_site/2020/12/31/entry1.html" file should exist
From 8b72f142178ce281777e9b9fe8a18e6cdc4dfad7 Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Sun, 16 Aug 2015 13:17:24 -0400
Subject: [PATCH 79/86] Update history to reflect merge of #3892
[ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 9d498006..2e2cf25f 100644
--- a/History.markdown
+++ b/History.markdown
@@ -125,6 +125,7 @@
* Change non-existent `hl_linenos` to `hl_lines` to allow passthrough in safe mode (#3787)
* Add missing flag to disable the watcher (#3820)
* Update CI guide to include more direct explanations of the flow (#3891)
+ * Set `future` to `false` in the default config (#3892)
### Development Fixes
From 399606c54447b5c4853981ae52cf40c30195c3be Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Sun, 16 Aug 2015 13:30:39 -0400
Subject: [PATCH 80/86] Unify renaming of configuration options to a single
method. /cc #3782.
---
lib/jekyll/configuration.rb | 48 ++++++++++---------------------------
1 file changed, 13 insertions(+), 35 deletions(-)
diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb
index 68dd9faf..6cf54193 100644
--- a/lib/jekyll/configuration.rb
+++ b/lib/jekyll/configuration.rb
@@ -220,14 +220,10 @@ module Jekyll
config.delete('server')
end
- if config.key? 'server_port'
- Jekyll::Deprecator.deprecation_message "The 'server_port' configuration option" +
- " has been renamed to 'port'. Please update your config" +
- " file accordingly."
- # copy but don't overwrite:
- config['port'] = config['server_port'] unless config.key?('port')
- config.delete('server_port')
- end
+ renamed_key 'server_port', 'port', config
+ renamed_key 'plugins', 'plugins_dir', config
+ renamed_key 'layouts', 'layouts_dir', config
+ renamed_key 'data_source', 'data_dir', config
if config.key? 'pygments'
Jekyll::Deprecator.deprecation_message "The 'pygments' configuration option" +
@@ -264,33 +260,6 @@ module Jekyll
"`_config.yml` file."
end
- if config.key? 'plugins'
- Jekyll::Deprecator.deprecation_message "The 'plugins'" +
- " configuration option has been renamed to 'plugins_dir'." +
- " Please update your config file accordingly."
- # copy but don't overwrite:
- config['plugins_dir'] = config['plugins'] unless config.key?('plugins_dir')
- config.delete('plugins')
- end
-
- if config.key? 'layouts'
- Jekyll::Deprecator.deprecation_message "The 'layouts'" +
- " configuration option has been renamed to 'layouts_dir'." +
- " Please update your config file accordingly."
- # copy but don't overwrite:
- config['layouts_dir'] = config['layouts'] unless config.key?('layouts_dir')
- config.delete('layouts')
- end
-
- if config.key? 'data_source'
- Jekyll::Deprecator.deprecation_message "The 'data_source'" +
- " configuration option has been renamed to 'data_dir'." +
- " Please update your config file accordingly."
- # copy but don't overwrite:
- config['data_dir'] = config['data_source'] unless config.key?('data_dir')
- config.delete('data_source')
- end
-
config
end
@@ -305,5 +274,14 @@ module Jekyll
config
end
+
+ def renamed_key(old, new, config, allowed_values = nil)
+ if config.key?(old)
+ Jekyll::Deprecator.deprecation_message "The '#{old}' configuration" +
+ "option has been renamed to '#{new}'. Please update your config " +
+ "file accordingly."
+ config[new] = config.delete(old)
+ end
+ end
end
end
From 010038e78a4200faae924e6d857d0cbac64eb8ac Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Sun, 16 Aug 2015 13:32:18 -0400
Subject: [PATCH 81/86] Update history to reflect merge of #3782
[ci skip]
---
History.markdown | 3 +++
1 file changed, 3 insertions(+)
diff --git a/History.markdown b/History.markdown
index 2e2cf25f..292b6564 100644
--- a/History.markdown
+++ b/History.markdown
@@ -82,6 +82,9 @@
* Upgrade highlight wrapper from `div` to `figure` (#3779)
* Upgrade mime-types to `~> 2.6` (#3795)
* Update windows.md with Ruby version info (#3818)
+ * Make the directory for includes configurable (#3782)
+ * Rename directory configurations to match `*_dir` convention for consistency (#3782)
+
### Bug Fixes
From 47c9ed0829fb45de72684b021d65c320a8ecec1f Mon Sep 17 00:00:00 2001
From: BRAVO <127.0.0.1.pb@gmail.com>
Date: Mon, 17 Aug 2015 13:23:17 +0200
Subject: [PATCH 82/86] I think you made a typo there
as seen on:
http://blog.davepoon.net/2015/01/19/setting-up-sass-with-jekyll/
http://markdotto.com/2014/09/25/sass-and-jekyll/#create-a-sass-stylesheet
---
site/_docs/assets.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/_docs/assets.md b/site/_docs/assets.md
index e82ddb30..b4f202d8 100644
--- a/site/_docs/assets.md
+++ b/site/_docs/assets.md
@@ -73,7 +73,7 @@ You may also specify the output style with the `style` option in your
{% highlight yaml %}
sass:
- style: :compressed
+ style: compressed
{% endhighlight %}
These are passed to Sass, so any output style options Sass supports are valid
From 4c1427c400ea764310b0c892f8ae80b6bad1ab4c Mon Sep 17 00:00:00 2001
From: "jaybe@jekyll"
Date: Tue, 11 Aug 2015 17:56:35 -0500
Subject: [PATCH 83/86] docs: Update _data in "Directory structure"
Add in references to _data format and extension options of .csv, .json,
etc., consistent with _docs/datafiles.md
Signed-off-by: Parker Moore
---
site/_docs/structure.md | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/site/_docs/structure.md b/site/_docs/structure.md
index 53a48951..eb6a0892 100644
--- a/site/_docs/structure.md
+++ b/site/_docs/structure.md
@@ -133,11 +133,12 @@ An overview of what each of these does:
Well-formatted site data should be placed here. The jekyll engine
- will autoload all yaml files (ends with
- .yml or .yaml) in this directory. If
- there's a file members.yml under the directory,
- then you can access contents of the file
- through site.data.members.
+ will autoload all YAML files in this directory (using either the
+ .yml, .yaml, .json or
+ .csv formats and extensions) and they will be
+ accessible via `site.data`. If there's a file
+ members.yml under the directory, then you can access
+ contents of the file through site.data.members.
From a446589cdce0ca931e9187a2cb8f80f1eabc8b8c Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Thu, 20 Aug 2015 10:16:52 -0700
Subject: [PATCH 84/86] Add a Code of Conduct.
Closes #3924.
---
CONDUCT.md | 22 ++++++++++++++++++++++
README.markdown | 12 ++++++++++++
2 files changed, 34 insertions(+)
create mode 100644 CONDUCT.md
diff --git a/CONDUCT.md b/CONDUCT.md
new file mode 100644
index 00000000..65c05c57
--- /dev/null
+++ b/CONDUCT.md
@@ -0,0 +1,22 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information, such as physical or electronic addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
\ No newline at end of file
diff --git a/README.markdown b/README.markdown
index 42ad29d1..df56108e 100644
--- a/README.markdown
+++ b/README.markdown
@@ -22,6 +22,18 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
* Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
+## Code of Conduct
+
+In order to have a more open and welcoming community, Jekyll adheres to a
+[code of conduct](CONDUCT.md) adapted from the Ruby on Rails code of
+conduct.
+
+Please adhere to this code of conduct in any interactions you have in the
+Jekyll community. It is strictly enforced on all official Jekyll
+repositories, websites, and resources. If you encounter someone violating
+these terms, please let a maintainer (@parkr, @envygeeks, or @mattr-) know
+and we will address it as soon as possible.
+
## Diving In
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
From 753bdbefbfb3c1d5327a5c72ff1ad535dc5bfc9c Mon Sep 17 00:00:00 2001
From: Matt Rogers
Date: Fri, 21 Aug 2015 10:36:37 -0500
Subject: [PATCH 85/86] Update history to reflect merge of #3925 [ci skip]
---
History.markdown | 1 +
1 file changed, 1 insertion(+)
diff --git a/History.markdown b/History.markdown
index 292b6564..b81b2013 100644
--- a/History.markdown
+++ b/History.markdown
@@ -19,6 +19,7 @@
* Remove support for relative permalinks (#3679)
* Iterate over `site.collections` as an array instead of a hash. (#3670)
* Adapt StaticFile for collections, config defaults (#3823)
+ * Add a Code of Conduct for the Jekyll project (#3925)
### Minor Enhancements
From 34afc7784d96524561c7fe6365531d5b9b4125fd Mon Sep 17 00:00:00 2001
From: Parker Moore
Date: Sun, 23 Aug 2015 12:55:20 -0700
Subject: [PATCH 86/86] Update history to reflect merge of #3871
[ci skip]
---
History.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/History.markdown b/History.markdown
index b81b2013..a2b01ed9 100644
--- a/History.markdown
+++ b/History.markdown
@@ -85,7 +85,7 @@
* Update windows.md with Ruby version info (#3818)
* Make the directory for includes configurable (#3782)
* Rename directory configurations to match `*_dir` convention for consistency (#3782)
-
+ * Internal: trigger hooks by owner symbol (#3871)
### Bug Fixes