From 06eafadcbbda82510c7b4f89fa168733145dbf76 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 24 Jun 2019 01:53:09 +0530 Subject: [PATCH 0001/1182] Use regexp to filter special entries (#7702) Merge pull request 7702 --- lib/jekyll/entry_filter.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/entry_filter.rb b/lib/jekyll/entry_filter.rb index 8035877c3cf..4a238036ec9 100644 --- a/lib/jekyll/entry_filter.rb +++ b/lib/jekyll/entry_filter.rb @@ -3,9 +3,7 @@ module Jekyll class EntryFilter attr_reader :site - SPECIAL_LEADING_CHARACTERS = [ - ".", "_", "#", "~", - ].freeze + SPECIAL_LEADING_CHAR_REGEX = %r!\A#{Regexp.union([".", "_", "#", "~"])}!o.freeze def initialize(site, base_directory = nil) @site = site @@ -50,8 +48,8 @@ def included?(entry) end def special?(entry) - SPECIAL_LEADING_CHARACTERS.include?(entry[0..0]) || - SPECIAL_LEADING_CHARACTERS.include?(File.basename(entry)[0..0]) + SPECIAL_LEADING_CHAR_REGEX.match?(entry) || + SPECIAL_LEADING_CHAR_REGEX.match?(File.basename(entry)) end def backup?(entry) From 9ccdae161b09e492a12353d23a5ad33fc64c3f65 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 23 Jun 2019 16:23:10 -0400 Subject: [PATCH 0002/1182] Update history to reflect merge of #7702 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 48e2e5b1af7..3e48771659f 100644 --- a/History.markdown +++ b/History.markdown @@ -158,6 +158,7 @@ * Do not install docs on updating gems on Travis (#7706) * Update TestTags in sync with Rouge v3.4 (#7709) * Bump RuboCop to v0.71.0 (#7687) + * Use regexp to filter special entries (#7702) ### Documentation From 68a31c8eb29671184d3dd34a6d936e7057ff1f5f Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 24 Jun 2019 03:45:25 +0530 Subject: [PATCH 0003/1182] Don't read symlinks in site.include in safe mode (#7711) Merge pull request 7711 --- lib/jekyll/reader.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/jekyll/reader.rb b/lib/jekyll/reader.rb index 18730ab3800..797e4291a1b 100644 --- a/lib/jekyll/reader.rb +++ b/lib/jekyll/reader.rb @@ -161,11 +161,14 @@ def post_reader end def read_included_excludes + entry_filter = EntryFilter.new(site) + site.include.each do |entry| next if entry == ".htaccess" entry_path = site.in_source_dir(entry) next if File.directory?(entry_path) + next if entry_filter.symlink?(entry_path) read_included_file(entry_path) if File.file?(entry_path) end From 25b274621b38696f7e66ca7e6f44fce57a6f0379 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 23 Jun 2019 18:15:27 -0400 Subject: [PATCH 0004/1182] Update history to reflect merge of #7711 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 3e48771659f..a506445a2d5 100644 --- a/History.markdown +++ b/History.markdown @@ -61,6 +61,7 @@ * Revert memoizing Site#docs_to_write and #documents (#7684) * Backport #7684 for v3.8.x: Revert memoizing Site#docs_to_write and refactor #documents (#7689) * Backport #7213 and #7633 for v3.8.x: Fix broken include_relative usage in excerpt (#7690) + * Don't read symlinks in site.include in safe mode (#7711) ### Minor Enhancements From e10a90987a382bbf94a4ed22f660457a0277ef4a Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 24 Jun 2019 23:16:28 +0530 Subject: [PATCH 0005/1182] Replace `String#=~` with `String#match?` (#7718) Merge pull request 7718 --- lib/jekyll/tags/include.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index d81dd8dee16..b43fe4532f2 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -54,7 +54,7 @@ def parse_params(context) end def validate_file_name(file) - if file =~ INVALID_SEQUENCES || file !~ VALID_FILENAME_CHARS + if file.match?(INVALID_SEQUENCES) || !file.match?(VALID_FILENAME_CHARS) raise ArgumentError, <<~MSG Invalid syntax for include tag. File contains invalid characters or sequences: @@ -90,7 +90,7 @@ def file_read_opts(context) # Render the variable if required def render_variable(context) - Liquid::Template.parse(@file).render(context) if @file =~ VARIABLE_SYNTAX + Liquid::Template.parse(@file).render(context) if @file.match?(VARIABLE_SYNTAX) end def tag_includes_dirs(context) From 7d340d933ac335bf4e25d95260873d0a89b99e1d Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 24 Jun 2019 13:46:31 -0400 Subject: [PATCH 0006/1182] Update history to reflect merge of #7718 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a506445a2d5..209b96e7039 100644 --- a/History.markdown +++ b/History.markdown @@ -160,6 +160,7 @@ * Update TestTags in sync with Rouge v3.4 (#7709) * Bump RuboCop to v0.71.0 (#7687) * Use regexp to filter special entries (#7702) + * Replace `String#=~` with `String#match?` (#7718) ### Documentation From 27aa53cf823cdc3696f50eb4d469a7734a7a82f0 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 26 Jun 2019 02:32:04 +0530 Subject: [PATCH 0007/1182] Memoize SiteDrop#documents to reduce allocations (#7697) Merge pull request 7697 --- lib/jekyll/drops/site_drop.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/drops/site_drop.rb b/lib/jekyll/drops/site_drop.rb index acebb98816f..a13f87f291c 100644 --- a/lib/jekyll/drops/site_drop.rb +++ b/lib/jekyll/drops/site_drop.rb @@ -8,7 +8,7 @@ class SiteDrop < Drop mutable false def_delegator :@obj, :site_data, :data - def_delegators :@obj, :time, :pages, :static_files, :documents, :tags, :categories + def_delegators :@obj, :time, :pages, :static_files, :tags, :categories private def_delegator :@obj, :config, :fallback_data @@ -38,6 +38,16 @@ def collections @site_collections ||= @obj.collections.values.sort_by(&:label).map(&:to_liquid) end + # `Site#documents` cannot be memoized so that `Site#docs_to_write` can access the + # latest state of the attribute. + # + # Since this method will be called after `Site#pre_render` hook, the `Site#documents` + # array shouldn't thereafter change and can therefore be safely memoized to prevent + # additional computation of `Site#documents`. + def documents + @documents ||= @obj.documents + end + # `{{ site.related_posts }}` is how posts can get posts related to # them, either through LSI if it's enabled, or through the most # recent posts. From 52374cf8be512f47a5d166db35439b1621121cc3 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Tue, 25 Jun 2019 17:02:07 -0400 Subject: [PATCH 0008/1182] Update history to reflect merge of #7697 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 209b96e7039..50b4845bbf4 100644 --- a/History.markdown +++ b/History.markdown @@ -105,6 +105,7 @@ * Reduce allocations from Jekyll::Document instances (#7625) * Add `type` attribute to Document instances (#7406) * Reduce allocations from where-filter (#7653) + * Memoize SiteDrop#documents to reduce allocations (#7697) ### Development Fixes From 62959527dd870691107739724c23b51ba03828f3 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 26 Jun 2019 11:33:47 +0530 Subject: [PATCH 0009/1182] Bump RuboCop to v0.72.x --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index acbbcd6ea67..1b93ae31332 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ group :test do gem "nokogiri", "~> 1.7" gem "rspec" gem "rspec-mocks" - gem "rubocop", "~> 0.71.0" + gem "rubocop", "~> 0.72.0" gem "rubocop-performance" gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__) gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__) From 45307215754b07279498e4f67b3e248ea632e153 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 27 Jun 2019 22:46:27 +0530 Subject: [PATCH 0010/1182] Replace `String#=~` with `String#match?` (#7723) Merge pull request 7723 --- lib/jekyll/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb index 2defd372997..71dc9de59fa 100644 --- a/lib/jekyll/utils.rb +++ b/lib/jekyll/utils.rb @@ -135,7 +135,7 @@ def parse_date(input, msg = "Input could not be parsed.") # Returns true if the YAML front matter is present. # rubocop: disable PredicateName def has_yaml_header?(file) - !!(File.open(file, "rb", &:readline) =~ %r!\A---\s*\r?\n!) + File.open(file, "rb", &:readline).match? %r!\A---\s*\r?\n! rescue EOFError false end From c76996cd8efde8d624d09869be7b074f5bb2e5e3 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 27 Jun 2019 13:16:29 -0400 Subject: [PATCH 0011/1182] Update history to reflect merge of #7723 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 50b4845bbf4..93a5ec6661f 100644 --- a/History.markdown +++ b/History.markdown @@ -62,6 +62,7 @@ * Backport #7684 for v3.8.x: Revert memoizing Site#docs_to_write and refactor #documents (#7689) * Backport #7213 and #7633 for v3.8.x: Fix broken include_relative usage in excerpt (#7690) * Don't read symlinks in site.include in safe mode (#7711) + * Replace `String#=~` with `String#match?` (#7723) ### Minor Enhancements From c87f5fa7fae28f8dba90ee67336f73ca56ec99e6 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 28 Jun 2019 09:01:06 +0530 Subject: [PATCH 0012/1182] Normalize paths in reports from `memory_profiler` --- rake/profile.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rake/profile.rake b/rake/profile.rake index d58c470ba23..d8c0f4ef023 100644 --- a/rake/profile.rake +++ b/rake/profile.rake @@ -39,7 +39,7 @@ namespace :profile do end if ENV["CI"] - report.pretty_print(scale_bytes: true, color_output: false) + report.pretty_print(scale_bytes: true, color_output: false, normalize_paths: true) else FileUtils.mkdir_p("tmp") report_file = File.join("tmp", args.file) @@ -50,7 +50,7 @@ namespace :profile do Jekyll.logger.info "Total allocated: #{total_allocated_output} (#{report.total_allocated} objects)".cyan Jekyll.logger.info "Total retained: #{total_retained_output} (#{report.total_retained} objects)".cyan - report.pretty_print(to_file: report_file, scale_bytes: true) + report.pretty_print(to_file: report_file, scale_bytes: true, normalize_paths: true) Jekyll.logger.info "\nDetailed Report saved into:", report_file.cyan end end From 3e8e6d22d7b9d2ce0c0fe06f79e87b774382969c Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 28 Jun 2019 16:08:02 +0530 Subject: [PATCH 0013/1182] Remove patch to modify config for kramdown (#7699) Merge pull request 7699 --- .../converters/markdown/kramdown_parser.rb | 8 ------- test/test_kramdown.rb | 23 ++++--------------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/lib/jekyll/converters/markdown/kramdown_parser.rb b/lib/jekyll/converters/markdown/kramdown_parser.rb index 6b78a5b99f4..64bb1d1c8d2 100644 --- a/lib/jekyll/converters/markdown/kramdown_parser.rb +++ b/lib/jekyll/converters/markdown/kramdown_parser.rb @@ -34,7 +34,6 @@ def setup @config["syntax_highlighter_opts"]["guess_lang"] = @config["guess_lang"] @config["coderay"] ||= {} # XXX: Legacy. modernize_coderay_config - make_accessible end def convert(content) @@ -64,13 +63,6 @@ def load_dependencies end end - def make_accessible(hash = @config) - hash.keys.each do |key| - hash[key.to_sym] = hash[key] - make_accessible(hash[key]) if hash[key].is_a?(Hash) - end - end - # config[kramdown][syntax_higlighter] > # config[kramdown][enable_coderay] > # config[highlighter] diff --git a/test/test_kramdown.rb b/test/test_kramdown.rb index fa333c957de..b4fc3b04505 100644 --- a/test/test_kramdown.rb +++ b/test/test_kramdown.rb @@ -22,6 +22,7 @@ class TestKramdown < JekyllUnitTest "css" => :class, "css_class" => "highlight", "formatter" => ::Rouge::Formatters::HTMLLegacy, + "foobar" => "lipsum", }, }, } @@ -35,24 +36,10 @@ class TestKramdown < JekyllUnitTest Jekyll::Cache.clear end - should "fill symbolized keys into config for compatibility with kramdown" do - kramdown_config = @markdown.instance_variable_get(:@parser) - .instance_variable_get(:@config) - - @kramdown_config_keys.each do |key| - assert kramdown_config.key?(key.to_sym), - "Expected #{kramdown_config} to include key #{key.to_sym.inspect}" - end - - @syntax_highlighter_opts_config_keys.each do |key| - assert kramdown_config["syntax_highlighter_opts"].key?(key.to_sym), - "Expected #{kramdown_config["syntax_highlighter_opts"]} to include " \ - "key #{key.to_sym.inspect}" - end - - assert_equal kramdown_config["smart_quotes"], kramdown_config[:smart_quotes] - assert_equal kramdown_config["syntax_highlighter_opts"]["css"], - kramdown_config[:syntax_highlighter_opts][:css] + should "not break kramdown" do + kramdown_doc = Kramdown::Document.new("# Some Header #", @config["kramdown"]) + assert_equal :class, kramdown_doc.options[:syntax_highlighter_opts][:css] + assert_equal "lipsum", kramdown_doc.options[:syntax_highlighter_opts][:foobar] end should "run Kramdown" do From 7dbe470dce3393b95d9da8f6c17ed2cee385f741 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 28 Jun 2019 06:38:04 -0400 Subject: [PATCH 0014/1182] Update history to reflect merge of #7699 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 93a5ec6661f..18218979854 100644 --- a/History.markdown +++ b/History.markdown @@ -25,6 +25,7 @@ * Always exclude certain paths from being processed (#7188) * Remove Jekyll::Utils#strip_heredoc in favor of a Ruby > 2.3 built in (#7584) * Incorporate `relative_url` within `post_url` tag (#7589) + * Remove patch to modify config for kramdown (#7699) ### Bug Fixes From 8abd4950a20af17bb27c6f2013eee8dccd03aee9 Mon Sep 17 00:00:00 2001 From: Yi Feng Xie Date: Fri, 28 Jun 2019 18:45:09 +0800 Subject: [PATCH 0015/1182] Update resources.md (#7598) Merge pull request 7598 --- docs/pages/resources.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/resources.md b/docs/pages/resources.md index 39f3aca86e7..2626970bf35 100644 --- a/docs/pages/resources.md +++ b/docs/pages/resources.md @@ -85,3 +85,4 @@ Use a SaaS service as a backend for functionality on your Jekyll site - A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared. - [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll) +- [Jekpack](https://github.com/yfxie/jekpack/) an integration of Jekyll and Webpack to make them work together. From 2265e82181a1d96da9910cad233b479fda2d5967 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 28 Jun 2019 06:45:11 -0400 Subject: [PATCH 0016/1182] Update history to reflect merge of #7598 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 18218979854..9938d532c4e 100644 --- a/History.markdown +++ b/History.markdown @@ -288,6 +288,7 @@ * Solve "GitHub Page build failure" in 10-deployment.md (#7648) * Fix typo from 'Github' to 'GitHub' (#7691) * fix link to Site Source config (#7708) + * Add Jekpack to resources page (#7598) ### Site Enhancements From 24f1978412093332bebe24522aa5b6102bad6eae Mon Sep 17 00:00:00 2001 From: David Kennell Date: Fri, 28 Jun 2019 11:27:59 -0500 Subject: [PATCH 0017/1182] Introduce frontmatter in step 2 (#7704) Merge pull request 7704 --- docs/_docs/step-by-step/02-liquid.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/_docs/step-by-step/02-liquid.md b/docs/_docs/step-by-step/02-liquid.md index 1c3ad02c614..5de70a2861c 100644 --- a/docs/_docs/step-by-step/02-liquid.md +++ b/docs/_docs/step-by-step/02-liquid.md @@ -66,9 +66,19 @@ Now it's your turn, change the Hello World! on your page to output as lowercase: ``` {% endraw %} +To get our changes processed by Jekyll we need to add [front matter](03-front-matter/) to the top of the page: + +```markdown +--- +# front matter tells Jekyll to process Liquid +--- +``` + +Our "Hello World!" will now be downcased on render. + It may not seem like it now, but much of Jekyll's power comes from combining -Liquid with other features. +Liquid with other features. -In order to see the changes from `downcase` Liquid filter, we will need to add front matter. +In order to see the changes from `downcase` Liquid filter, we will need to add front matter. That's next. Let's keep going. From 6435bd616763738e9961abcd9dae41cf8106388e Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 28 Jun 2019 12:28:02 -0400 Subject: [PATCH 0018/1182] Update history to reflect merge of #7704 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 9938d532c4e..092ce44decb 100644 --- a/History.markdown +++ b/History.markdown @@ -289,6 +289,7 @@ * Fix typo from 'Github' to 'GitHub' (#7691) * fix link to Site Source config (#7708) * Add Jekpack to resources page (#7598) + * Introduce frontmatter in step 2 (#7704) ### Site Enhancements From ebe62e8a282c57b4408c29cf5081f709ac61a321 Mon Sep 17 00:00:00 2001 From: Edgar Tinajero Date: Mon, 1 Jul 2019 11:56:38 -0600 Subject: [PATCH 0019/1182] Update log output for an invalid theme directory (#7679) Merge pull request 7679 --- Gemfile | 1 + features/theme.feature | 11 +++++++++++ lib/jekyll/theme.rb | 15 +++++++++++++-- .../test-theme-skinny/_layouts/default.html | 11 +++++++++++ .../fixtures/test-theme-skinny/_layouts/home.html | 5 +++++ .../test-theme-skinny/test-theme-skinny.gemspec | 11 +++++++++++ 6 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/test-theme-skinny/_layouts/default.html create mode 100644 test/fixtures/test-theme-skinny/_layouts/home.html create mode 100644 test/fixtures/test-theme-skinny/test-theme-skinny.gemspec diff --git a/Gemfile b/Gemfile index 1b93ae31332..df6d2f2718d 100644 --- a/Gemfile +++ b/Gemfile @@ -31,6 +31,7 @@ group :test do gem "rubocop-performance" gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__) gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__) + gem "test-theme-skinny", :path => File.expand_path("test/fixtures/test-theme-skinny", __dir__) gem "test-theme-symlink", :path => File.expand_path("test/fixtures/test-theme-symlink", __dir__) gem "jruby-openssl" if RUBY_ENGINE == "jruby" diff --git a/features/theme.feature b/features/theme.feature index 650c167577e..3941abc8d86 100644 --- a/features/theme.feature +++ b/features/theme.feature @@ -57,6 +57,17 @@ Feature: Writing themes And I should see "From your site." in "_site/assets/application.coffee" And I should see "From your site." in "_site/assets/base.js" + Scenario: A theme with *just* layouts + Given I have a configuration file with "theme" set to "test-theme-skinny" + And I have an "index.html" page with layout "home" that contains "The quick brown fox." + When I run jekyll build + Then I should get a zero exit status + And the _site directory should exist + And I should see "Message: The quick brown fox." in "_site/index.html" + But I should not see "_includes" in the build output + And I should not see "_sass" in the build output + And I should not see "assets" in the build output + Scenario: Requiring dependencies of a theme Given I have a configuration file with "theme" set to "test-dependency-theme" When I run jekyll build diff --git a/lib/jekyll/theme.rb b/lib/jekyll/theme.rb index 3eb44157763..ac0330201ea 100644 --- a/lib/jekyll/theme.rb +++ b/lib/jekyll/theme.rb @@ -62,11 +62,22 @@ def realpath_for(folder) # escape the theme root. # However, symlinks are allowed to point to other directories within the theme. Jekyll.sanitized_path(root, File.realpath(Jekyll.sanitized_path(root, folder.to_s))) - rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP - Jekyll.logger.warn "Invalid theme folder:", folder + rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP => e + log_realpath_exception(e, folder) nil end + def log_realpath_exception(err, folder) + return if err.is_a?(Errno::ENOENT) + + case err + when Errno::EACCES + Jekyll.logger.error "Theme error:", "Directory '#{folder}' is not accessible." + when Errno::ELOOP + Jekyll.logger.error "Theme error:", "Directory '#{folder}' includes a symbolic link loop." + end + end + def gemspec @gemspec ||= Gem::Specification.find_by_name(name) rescue Gem::LoadError diff --git a/test/fixtures/test-theme-skinny/_layouts/default.html b/test/fixtures/test-theme-skinny/_layouts/default.html new file mode 100644 index 00000000000..837a4dc7696 --- /dev/null +++ b/test/fixtures/test-theme-skinny/_layouts/default.html @@ -0,0 +1,11 @@ + + + + + Skinny + + +

Hello World

+ {{ content }} + + diff --git a/test/fixtures/test-theme-skinny/_layouts/home.html b/test/fixtures/test-theme-skinny/_layouts/home.html new file mode 100644 index 00000000000..6d9ce5c7ef1 --- /dev/null +++ b/test/fixtures/test-theme-skinny/_layouts/home.html @@ -0,0 +1,5 @@ +--- +layout: default +--- + +Message: {{ content }} diff --git a/test/fixtures/test-theme-skinny/test-theme-skinny.gemspec b/test/fixtures/test-theme-skinny/test-theme-skinny.gemspec new file mode 100644 index 00000000000..84f59b9d709 --- /dev/null +++ b/test/fixtures/test-theme-skinny/test-theme-skinny.gemspec @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +Gem::Specification.new do |s| + s.name = "test-theme-skinny" + s.version = "0.1.0" + s.licenses = ["MIT"] + s.summary = "This is a theme with just layouts used to test Jekyll" + s.authors = ["Jekyll"] + s.files = ["lib/example.rb"] + s.homepage = "https://github.com/jekyll/jekyll" +end From ed8681b1e735fe8983709ce482798eb4d6ea3e9d Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 1 Jul 2019 13:56:41 -0400 Subject: [PATCH 0020/1182] Update history to reflect merge of #7679 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 092ce44decb..7b16dfa75f3 100644 --- a/History.markdown +++ b/History.markdown @@ -64,6 +64,7 @@ * Backport #7213 and #7633 for v3.8.x: Fix broken include_relative usage in excerpt (#7690) * Don't read symlinks in site.include in safe mode (#7711) * Replace `String#=~` with `String#match?` (#7723) + * Update log output for an invalid theme directory (#7679) ### Minor Enhancements From 03b500b7b7aebfe41afda7f51384758c61a94f74 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Tue, 2 Jul 2019 23:54:02 +0530 Subject: [PATCH 0021/1182] Move updates from generated file to source file #7464 and #7671 erroneously made changes to the auto-generated document `docs/_docs/contributing.md` instead of the source file `.github/CONTRIBUTING.markdown` --- .github/CONTRIBUTING.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.markdown b/.github/CONTRIBUTING.markdown index 7283ca881e6..fc1b9852a81 100644 --- a/.github/CONTRIBUTING.markdown +++ b/.github/CONTRIBUTING.markdown @@ -4,7 +4,7 @@ Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is a ## Where to get help or report a problem -See [the support guidelines](https://jekyllrb.com/docs/support/) +See the [support guidelines](https://jekyllrb.com/docs/support/) ## Ways to contribute @@ -12,9 +12,9 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots * [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know. * Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better? -* Read through [the documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved. -* Browse through [the Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing. -* Find [an open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions. +* Read through the [documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved. +* Browse through the [Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing. +* Find an [open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions. * Help evaluate [open pull requests](https://github.com/jekyll/jekyll/pulls), by testing the changes locally and reviewing what's proposed. ## Submitting a pull request @@ -49,7 +49,7 @@ That's it! You'll be automatically subscribed to receive updates as others revie 2. Clone the repository locally `git clone https://github.com//jekyll`. 3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ). 4. Hack away, add tests. Not necessarily in that order. -5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below) +5. Make sure everything still passes by running `script/cibuild` (see the [tests section](#running-tests-locally) below) 6. Push the branch up ( `git push origin my-awesome-feature` ). 7. Create a pull request by visiting `https://github.com//jekyll` and following the instructions at the top of the screen. @@ -89,7 +89,7 @@ If you want to add your plugin to the [list of plugins](https://jekyllrb.com/doc ## Code Contributions -Interesting in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid. +Interested in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid. ### Tests and documentation From 5b195ffe749e3620ba00e6e4d811c5c05432ae54 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 3 Jul 2019 00:14:23 +0530 Subject: [PATCH 0022/1182] Generate a new site to reflect unreleased changes --- docs/_docs/contributing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_docs/contributing.md b/docs/_docs/contributing.md index e709fcaeab7..93f1674cd45 100644 --- a/docs/_docs/contributing.md +++ b/docs/_docs/contributing.md @@ -119,6 +119,8 @@ If your contribution changes any Jekyll behavior, make sure to update the docume Jekyll's methods. It also provides you with helpful methods to quickly create a site or configuration. [Feel free to check it out!](https://github.com/jekyll/jekyll/blob/master/script/console) +* Previously, we've used the WIP Probot app to help contributors determine whether their pull request is ready for review. Please use a [draft pull request](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests) instead. When you're ready, [mark the pull request as ready for review](https://help.github.com/en/articles/changing-the-stage-of-a-pull-request) + ## Running tests locally ### Test Dependencies From e318d1c836024a94234241cc910b5eb78e2fed23 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 2 Jul 2019 11:27:02 -0400 Subject: [PATCH 0023/1182] Create 3.8.6 release notes --- History.markdown | 2 +- docs/_docs/history.md | 19 +++++++++++++++++++ .../2019-07-02-jekyll-3-8-6-released.markdown | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 docs/_posts/2019-07-02-jekyll-3-8-6-released.markdown diff --git a/History.markdown b/History.markdown index 7b16dfa75f3..603cc7e8b1c 100644 --- a/History.markdown +++ b/History.markdown @@ -1,4 +1,4 @@ -## HEAD +## 3.8.6 / 2018-07-03 ### Major Enhancements diff --git a/docs/_docs/history.md b/docs/_docs/history.md index 8d646bfe3fd..062505718c3 100644 --- a/docs/_docs/history.md +++ b/docs/_docs/history.md @@ -4,6 +4,25 @@ permalink: "/docs/history/" note: This file is autogenerated. Edit /History.markdown instead. --- +## 3.8.6 / 2018-07-03 +{: #v3-8-6} + +### Bug Fixes +{: #bug-fixes-v3-8-6} + +- Update log output for an invalid theme directory ([#7734]({{ site.repository }}/issues/7734)) +- Memoize `SiteDrop#documents` to reduce allocations ([#7722]({{ site.repository }}/issues/7722)) +- Excerpt handling of custom and intermediate tags ([#7467]({{ site.repository }}/issues/7467)) +- Escape valid special chars in a site's path name ([#7573]({{ site.repository }}/issues/7573)) +- Revert memoizing `Site#docs_to_write` and refactor `#documents` ([#7689]({{ site.repository }}/issues/7689)) +- Fix broken `include_relative` usage in excerpt ([#7690]({{ site.repository }}/issues/7690)) + +### Security Fixes +{: #security-fixes-v3-8-6} + +- Theme gems: ensure directories aren't symlinks ([#7424]({{ site.repository }}/issues/7424)) + + ## 3.8.5 / 2018-11-04 {: #v3-8-5} diff --git a/docs/_posts/2019-07-02-jekyll-3-8-6-released.markdown b/docs/_posts/2019-07-02-jekyll-3-8-6-released.markdown new file mode 100644 index 00000000000..f05cd7cd981 --- /dev/null +++ b/docs/_posts/2019-07-02-jekyll-3-8-6-released.markdown @@ -0,0 +1,19 @@ +--- +title: 'Jekyll 3.8.6 Released' +date: 2019-07-02 11:21:02 -0400 +author: parkr +version: 3.8.6 +categories: [release] +--- + +We have another patch release in the 3.8 series! This time, we have one security patch +and a handful of bug patches, including: + +- Filter symlinks from theme gems +- Fix excerpt handling of some Liquid tags +- Handle case where a theme directory doesn't exist +- A few internal optimizations to reduce memory overhead + +... and a few more! You can check out the patches and see all the details in [the release notes](/docs/history/#v3-8-6) + +Happy Jekylling! From fcb8a1ecd3130beb870769291f8d0f4adab3c9d9 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 2 Jul 2019 12:06:27 -0400 Subject: [PATCH 0024/1182] Update contributing documentation on the website --- docs/_docs/contributing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/_docs/contributing.md b/docs/_docs/contributing.md index 93f1674cd45..91fb42cc1de 100644 --- a/docs/_docs/contributing.md +++ b/docs/_docs/contributing.md @@ -8,7 +8,7 @@ Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is a ## Where to get help or report a problem -See the [support guidelines](https://jekyllrb.com/docs/support/) +See [the support guidelines](https://jekyllrb.com/docs/support/) ## Ways to contribute @@ -16,9 +16,9 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots * [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know. * Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better? -* Read through the [documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved. -* Browse through the [Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing. -* Find an [open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions. +* Read through [the documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved. +* Browse through [the Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing. +* Find [an open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions. * Help evaluate [open pull requests](https://github.com/jekyll/jekyll/pulls), by testing the changes locally and reviewing what's proposed. ## Submitting a pull request @@ -53,7 +53,7 @@ That's it! You'll be automatically subscribed to receive updates as others revie 2. Clone the repository locally `git clone https://github.com//jekyll`. 3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ). 4. Hack away, add tests. Not necessarily in that order. -5. Make sure everything still passes by running `script/cibuild` (see the [tests section](#running-tests-locally) below) +5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below) 6. Push the branch up ( `git push origin my-awesome-feature` ). 7. Create a pull request by visiting `https://github.com//jekyll` and following the instructions at the top of the screen. @@ -93,7 +93,7 @@ If you want to add your plugin to the [list of plugins](https://jekyllrb.com/doc ## Code Contributions -Interested in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid. +Interesting in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid. ### Tests and documentation From b7e3f10a08d5701cd0d9f16eef38137bcaea809d Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 2 Jul 2019 12:06:59 -0400 Subject: [PATCH 0025/1182] Move 3.8.6 documentation to the correct location in the History.markdown --- History.markdown | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index 603cc7e8b1c..f0e5badc9ee 100644 --- a/History.markdown +++ b/History.markdown @@ -1,4 +1,4 @@ -## 3.8.6 / 2018-07-03 +## HEAD ### Major Enhancements @@ -305,6 +305,21 @@ * Release v4.0.0.pre.alpha1 (#7574) +## 3.8.6 / 2018-07-03 + +### Bug Fixes + + * Update log output for an invalid theme directory (#7734) + * Memoize `SiteDrop#documents` to reduce allocations (#7722) + * Excerpt handling of custom and intermediate tags (#7467) + * Escape valid special chars in a site's path name (#7573) + * Revert memoizing `Site#docs_to_write` and refactor `#documents` (#7689) + * Fix broken `include_relative` usage in excerpt (#7690) + +### Security Fixes + + * Theme gems: ensure directories aren't symlinks (#7424) + ## 3.8.5 / 2018-11-04 ### Bug Fixes From 7c34db39912bc9d7abb0f0c2e9a0dd0048dd6b88 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 2 Jul 2019 18:17:17 +0200 Subject: [PATCH 0026/1182] Fix date --- History.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index f0e5badc9ee..143be635584 100644 --- a/History.markdown +++ b/History.markdown @@ -305,7 +305,7 @@ * Release v4.0.0.pre.alpha1 (#7574) -## 3.8.6 / 2018-07-03 +## 3.8.6 / 2019-07-02 ### Bug Fixes From f42e0e7169ad7f485b47d05c790e5c4a5991feef Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 2 Jul 2019 13:54:15 -0400 Subject: [PATCH 0027/1182] Regenerate the History file bassed on our new date --- docs/_docs/history.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/history.md b/docs/_docs/history.md index 062505718c3..de6a93bb8a4 100644 --- a/docs/_docs/history.md +++ b/docs/_docs/history.md @@ -4,7 +4,7 @@ permalink: "/docs/history/" note: This file is autogenerated. Edit /History.markdown instead. --- -## 3.8.6 / 2018-07-03 +## 3.8.6 / 2019-07-02 {: #v3-8-6} ### Bug Fixes From 5bc21d82f6c4aec5f0c4aaefbb5fb0d2cf258890 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 2 Jul 2019 21:29:07 +0200 Subject: [PATCH 0028/1182] Regenerate Contributing --- docs/_docs/contributing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/_docs/contributing.md b/docs/_docs/contributing.md index 91fb42cc1de..93f1674cd45 100644 --- a/docs/_docs/contributing.md +++ b/docs/_docs/contributing.md @@ -8,7 +8,7 @@ Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is a ## Where to get help or report a problem -See [the support guidelines](https://jekyllrb.com/docs/support/) +See the [support guidelines](https://jekyllrb.com/docs/support/) ## Ways to contribute @@ -16,9 +16,9 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots * [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know. * Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better? -* Read through [the documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved. -* Browse through [the Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing. -* Find [an open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions. +* Read through the [documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved. +* Browse through the [Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing. +* Find an [open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions. * Help evaluate [open pull requests](https://github.com/jekyll/jekyll/pulls), by testing the changes locally and reviewing what's proposed. ## Submitting a pull request @@ -53,7 +53,7 @@ That's it! You'll be automatically subscribed to receive updates as others revie 2. Clone the repository locally `git clone https://github.com//jekyll`. 3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ). 4. Hack away, add tests. Not necessarily in that order. -5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below) +5. Make sure everything still passes by running `script/cibuild` (see the [tests section](#running-tests-locally) below) 6. Push the branch up ( `git push origin my-awesome-feature` ). 7. Create a pull request by visiting `https://github.com//jekyll` and following the instructions at the top of the screen. @@ -93,7 +93,7 @@ If you want to add your plugin to the [list of plugins](https://jekyllrb.com/doc ## Code Contributions -Interesting in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid. +Interested in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid. ### Tests and documentation From fea0b69d398f6934ad67bbbac84281ddadfab4d7 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 2 Jul 2019 16:51:40 -0400 Subject: [PATCH 0029/1182] 3.8.6: add release note for 3c06609406 --- History.markdown | 1 + docs/_docs/history.md | 1 + 2 files changed, 2 insertions(+) diff --git a/History.markdown b/History.markdown index 143be635584..f9f337c5e60 100644 --- a/History.markdown +++ b/History.markdown @@ -315,6 +315,7 @@ * Escape valid special chars in a site's path name (#7573) * Revert memoizing `Site#docs_to_write` and refactor `#documents` (#7689) * Fix broken `include_relative` usage in excerpt (#7690) + * Install platform-specific gems as required (3c06609406) ### Security Fixes diff --git a/docs/_docs/history.md b/docs/_docs/history.md index de6a93bb8a4..5756d65f560 100644 --- a/docs/_docs/history.md +++ b/docs/_docs/history.md @@ -16,6 +16,7 @@ note: This file is autogenerated. Edit /History.markdown instead. - Escape valid special chars in a site's path name ([#7573]({{ site.repository }}/issues/7573)) - Revert memoizing `Site#docs_to_write` and refactor `#documents` ([#7689]({{ site.repository }}/issues/7689)) - Fix broken `include_relative` usage in excerpt ([#7690]({{ site.repository }}/issues/7690)) +- Install platform-specific gems as required (3c06609406) ### Security Fixes {: #security-fixes-v3-8-6} From 77b6033f2fa15b0d89af40ac7b21059ba3f350b8 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 10 Jul 2019 16:15:59 +0530 Subject: [PATCH 0030/1182] Update Jekyll version in docs header --- docs/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index 9abf560087e..0c7a2b1b6d7 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,5 +1,5 @@ --- -version: 3.8.5 +version: 3.8.6 min_ruby_version: 2.4.0 name: Jekyll • Simple, blog-aware, static sites description: Transform your plain text into static websites and blogs From 135ebe26604e697fa8766deec8fb672e592e405b Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 12 Jul 2019 20:14:45 +0530 Subject: [PATCH 0031/1182] Reduce Array objects generated from utility method (#7749) Merge pull request 7749 --- lib/jekyll/utils.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb index 71dc9de59fa..8aea4ac258b 100644 --- a/lib/jekyll/utils.rb +++ b/lib/jekyll/utils.rb @@ -68,11 +68,14 @@ def duplicable?(obj) # # Returns an array def pluralized_array_from_hash(hash, singular_key, plural_key) - [].tap do |array| - value = value_from_singular_key(hash, singular_key) - value ||= value_from_plural_key(hash, plural_key) - array << value - end.flatten.compact + array = [] + value = value_from_singular_key(hash, singular_key) + value ||= value_from_plural_key(hash, plural_key) + + array << value + array.flatten! + array.compact! + array end def value_from_singular_key(hash, key) From 4c9cbad6775749ccf4f16be8dab5eb054d182c55 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 12 Jul 2019 10:44:47 -0400 Subject: [PATCH 0032/1182] Update history to reflect merge of #7749 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index f9f337c5e60..98b50b76da8 100644 --- a/History.markdown +++ b/History.markdown @@ -165,6 +165,7 @@ * Bump RuboCop to v0.71.0 (#7687) * Use regexp to filter special entries (#7702) * Replace `String#=~` with `String#match?` (#7718) + * Reduce Array objects generated from utility method (#7749) ### Documentation From ffe8d168f250ed52f27657f4001e4500227b7c1f Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 14 Jul 2019 12:33:46 +0530 Subject: [PATCH 0033/1182] Prefer Regexp#match? over String#match? This commit fixes a minor regression introduced in the commit e10a909 Prefer using `Regexp#match` because `@file` or `file` in these lines could be `nil` if the `tag_markup` is just whitespace. In that scenario, Jekyll should proceed to the validation logic and bail instead of raising a `NoMethodError` exception. --- History.markdown | 1 - lib/jekyll/tags/include.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/History.markdown b/History.markdown index 98b50b76da8..d7af2ccc7cc 100644 --- a/History.markdown +++ b/History.markdown @@ -164,7 +164,6 @@ * Update TestTags in sync with Rouge v3.4 (#7709) * Bump RuboCop to v0.71.0 (#7687) * Use regexp to filter special entries (#7702) - * Replace `String#=~` with `String#match?` (#7718) * Reduce Array objects generated from utility method (#7749) ### Documentation diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index b43fe4532f2..20a41bb779c 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -54,7 +54,7 @@ def parse_params(context) end def validate_file_name(file) - if file.match?(INVALID_SEQUENCES) || !file.match?(VALID_FILENAME_CHARS) + if INVALID_SEQUENCES.match?(file) || !VALID_FILENAME_CHARS.match?(file) raise ArgumentError, <<~MSG Invalid syntax for include tag. File contains invalid characters or sequences: @@ -90,7 +90,7 @@ def file_read_opts(context) # Render the variable if required def render_variable(context) - Liquid::Template.parse(@file).render(context) if @file.match?(VARIABLE_SYNTAX) + Liquid::Template.parse(@file).render(context) if VARIABLE_SYNTAX.match?(@file) end def tag_includes_dirs(context) From 854e83230ec94384e876f3c5c6be104b45c92274 Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Mon, 15 Jul 2019 10:38:53 -0500 Subject: [PATCH 0034/1182] Add recursive navigation tutorial (#7720) Merge pull request 7720 --- docs/_tutorials/navigation.md | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/docs/_tutorials/navigation.md b/docs/_tutorials/navigation.md index 87368b0fee3..bcb9fe152a5 100644 --- a/docs/_tutorials/navigation.md +++ b/docs/_tutorials/navigation.md @@ -605,3 +605,65 @@ The `for item in items` loop looks through each `item` and gets the `title` and For more details on the `group_by` filter, see [Jekyll's Templates documentation](https://jekyllrb.com/docs/templates/) as well as [this Siteleaf tutorial](https://www.siteleaf.com/blog/advanced-liquid-group-by/). For more details on the `sort` filter, see [sort](https://shopify.github.io/liquid/filters/sort/) in Liquid's documentation. Whether you use properties in your doc's front matter to retrieve your pages or a YAML data file, in both cases you can programmatically build a more robust navigation for your site. + +## Scenario 9: Nested tree navigation with recursion + +Suppose you want a nested tree navigation of any depth. We can achieve this by recursively looping through our tree of navigation links. + +**YAML** + +```yaml +nav: + - title: Deployment + url: deployment.html + subnav: + - title: Heroku + url: heroku.html + subnav: + - title: Jekyll on Heroku + url: jekyll-on-heroku.html + - title: Help + url: help.html +``` + +**Liquid** + +First, we'll create an include that we can use for rendering the navigation tree. This file would be `_includes/nav.html` + +{% raw %} +```liquid +
    + {% for item in include.nav %} +
  • {{ item.title }}
  • + + {% if item.subnav %} + {% include nav.html nav=item.subnav %} + {% endif %} + {% endfor %} +
+``` +{% endraw %} + +To render this in your layout or pages, you would simply include the template and pass in the `nav` parameter. In this case, we'll use the `page.nav` to grab it from the yaml frontmatter. + +{% raw %} +```liquid +{% include nav.html nav=page.nav %} +``` +{% endraw %} + +Our include will use this first, then look through each item for a `subnav` property to recursively render the nested lists. + +**Result** +
+ +
From 7096885e98a72a3ed8cbe4c2c666d0f490211ea9 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 15 Jul 2019 11:38:55 -0400 Subject: [PATCH 0035/1182] Update history to reflect merge of #7720 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index d7af2ccc7cc..158b7d23a37 100644 --- a/History.markdown +++ b/History.markdown @@ -291,6 +291,7 @@ * fix link to Site Source config (#7708) * Add Jekpack to resources page (#7598) * Introduce frontmatter in step 2 (#7704) + * Add recursive navigation tutorial (#7720) ### Site Enhancements From 8d5b5fa4dc839519ed0b5c2203e6b7925a6b0caa Mon Sep 17 00:00:00 2001 From: strangehill Date: Thu, 18 Jul 2019 17:13:59 +0800 Subject: [PATCH 0036/1182] Update .gitignore snippet in tutorial (#7748) --- docs/_tutorials/using-jekyll-with-bundler.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/_tutorials/using-jekyll-with-bundler.md b/docs/_tutorials/using-jekyll-with-bundler.md index 3aa34bbb0c6..0acbad289fe 100644 --- a/docs/_tutorials/using-jekyll-with-bundler.md +++ b/docs/_tutorials/using-jekyll-with-bundler.md @@ -95,12 +95,14 @@ in. You can use this `.gitignore` to get started, if you want. **.gitignore** ``` -# Ignore folders generated by Bundler -vendor -.bundle +# Ignore metadata generated by Jekyll +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata -# Ignore folders generated by Jekyll -.sass-cache -_site +# Ignore folders generated by Bundler +.bundle/ +vendor/ ``` From 5157bdc753d7f761e77ce15fe3cf626305639626 Mon Sep 17 00:00:00 2001 From: Andrew Marcuse Date: Sat, 20 Jul 2019 11:36:32 -0400 Subject: [PATCH 0037/1182] Update mime.types (#7756) Merge pull request 7756 --- lib/jekyll/mime.types | 64 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/lib/jekyll/mime.types b/lib/jekyll/mime.types index af68d359e11..3fb0529680e 100644 --- a/lib/jekyll/mime.types +++ b/lib/jekyll/mime.types @@ -19,18 +19,17 @@ application/davmount+xml davmou application/docbook+xml dbk application/dssc+der dssc application/dssc+xml xdssc -application/ecmascript ecma +application/ecmascript ecma es application/emma+xml emma application/epub+zip epub application/exi exi application/font-tdpfr pfr -application/font-woff woff -application/font-woff2 woff2 application/geo+json geojson application/gml+xml gml application/gpx+xml gpx application/gxf gxf application/gzip gz +application/hjson hjson application/hyperstudio stk application/inkml+xml ink inkml application/ipfix ipfix @@ -61,6 +60,8 @@ application/mp21 m21 mp application/mp4 mp4s m4p application/msword doc dot application/mxf mxf +application/n-quads nq +application/n-triples nt application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy exe dll deb dmg iso img msi msp msm buffer application/oda oda application/oebps-package+xml opf @@ -86,7 +87,8 @@ application/pls+xml pls application/postscript ai eps ps application/prs.cww cww application/pskc+xml pskcxml -application/rdf+xml rdf +application/raml+yaml raml +application/rdf+xml rdf owl application/reginfo+xml rif application/relax-ng-compact-syntax rnc application/resource-lists+xml rl @@ -107,6 +109,7 @@ application/sdp sdp application/set-payment-initiation setpay application/set-registration-initiation setreg application/shf+xml shf +application/sieve siv sieve application/smil+xml smi smil application/sparql-query rq application/sparql-results+xml srx @@ -143,7 +146,10 @@ application/vnd.anser-web-certificate-issue-initiation cii application/vnd.anser-web-funds-transfer-initiation fti application/vnd.antix.game-component atx application/vnd.apple.installer+xml mpkg +application/vnd.apple.keynote keynote application/vnd.apple.mpegurl m3u8 +application/vnd.apple.numbers numbers +application/vnd.apple.pages pages application/vnd.apple.pkpass pkpass application/vnd.aristanetworks.swi swi application/vnd.astraea-software.iota iota @@ -154,6 +160,7 @@ application/vnd.businessobjects rep application/vnd.chemdraw+xml cdxml application/vnd.chipnuts.karaoke-mmd mmd application/vnd.cinderella cdy +application/vnd.citationstyles.style+xml csl application/vnd.claymore cla application/vnd.cloanto.rp9 rp9 application/vnd.clonk.c4group c4g c4d c4f c4p c4u @@ -482,6 +489,7 @@ application/vnd.yellowriver-custom-menu cmp application/vnd.zul zir zirz application/vnd.zzazz.deck+xml zaz application/voicexml+xml vxml +application/wasm wasm application/widget wgt application/winhlp hlp application/wsdl+xml wsdl @@ -521,10 +529,8 @@ application/x-eva eva application/x-font-bdf bdf application/x-font-ghostscript gsf application/x-font-linux-psf psf -application/x-font-otf otf application/x-font-pcf pcf application/x-font-snf snf -application/x-font-ttf ttf ttc application/x-font-type1 pfa pfb pfm afm application/x-freearc arc application/x-futuresplash spl @@ -661,20 +667,41 @@ chemical/x-cmdf cmdf chemical/x-cml cml chemical/x-csml csml chemical/x-xyz xyz +font/collection ttc +font/otf otf +font/ttf ttf +font/woff woff +font/woff2 woff2 +image/aces exr image/apng apng image/bmp bmp image/cgm cgm +image/dicom-rle drle +image/fits fits image/g3fax g3 image/gif gif +image/heic heic +image/heic-sequence heics +image/heif heif +image/heif-sequence heifs image/ief ief +image/jls jls +image/jp2 jp2 jpg2 image/jpeg jpeg jpg jpe +image/jpm jpm +image/jpx jpx jpf +image/jxr jxr image/ktx ktx image/png png image/prs.btif btif +image/prs.pti pti image/sgi sgi image/svg+xml svg svgz -image/tiff tiff tif +image/t38 t38 +image/tiff tif tiff +image/tiff-fx tfx image/vnd.adobe.photoshop psd +image/vnd.airzip.accelerator.azv azv image/vnd.dece.graphic uvi uvvi uvg uvvg image/vnd.djvu djvu djv image/vnd.dvb.subtitle sub @@ -685,20 +712,22 @@ image/vnd.fpx fpx image/vnd.fst fst image/vnd.fujixerox.edmics-mmr mmr image/vnd.fujixerox.edmics-rlc rlc +image/vnd.microsoft.icon ico image/vnd.ms-modi mdi image/vnd.ms-photo wdp image/vnd.net-fpx npx +image/vnd.tencent.tap tap +image/vnd.valve.source.texture vtf image/vnd.wap.wbmp wbmp image/vnd.xiff xif +image/vnd.zbrush.pcx pcx image/webp webp image/x-3ds 3ds image/x-cmu-raster ras image/x-cmx cmx image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico image/x-jng jng image/x-mrsid-image sid -image/x-pcx pcx image/x-pict pic pct image/x-portable-anymap pnm image/x-portable-bitmap pbm @@ -709,7 +738,14 @@ image/x-tga tga image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd +message/disposition-notification disposition-notification +message/global u8msg +message/global-delivery-status u8dsn +message/global-disposition-notification u8mdn +message/global-headers u8hdr message/rfc822 eml mime +message/vnd.wfa.wsc wsc +model/3mf 3mf model/gltf+json gltf model/gltf-binary glb model/iges igs iges @@ -719,6 +755,11 @@ model/vnd.dwf dwf model/vnd.gdl gdl model/vnd.gtw gtw model/vnd.mts mts +model/vnd.opengex ogex +model/vnd.parasolid.transmit.binary x_b +model/vnd.parasolid.transmit.text x_t +model/vnd.usdz+zip usdz +model/vnd.valve.source.compiled-map bsp model/vnd.vtu vtu model/vrml wrl vrml model/x3d+binary x3db x3dbz @@ -729,18 +770,19 @@ text/calendar ics if text/coffeescript coffee litcoffee text/css css text/csv csv -text/hjson hjson text/html html htm shtml text/jade jade text/jsx jsx text/less less text/markdown markdown md text/mathml mml +text/mdx mdx text/n3 n3 text/plain txt text conf def list log in ini text/prs.lines.tag dsc text/richtext rtx text/sgml sgml sgm +text/shex shex text/slim slim slm text/stylus stylus styl text/tab-separated-values tsv @@ -788,7 +830,7 @@ video/h261 h261 video/h263 h263 video/h264 h264 video/jpeg jpgv -video/jpm jpm jpgm +video/jpm jpgm video/mj2 mj2 mjp2 video/mp2t ts video/mp4 mp4 mp4v mpg4 From 384a8748054cd0a4bd4ee748afd0a3ec121d06c8 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sat, 20 Jul 2019 11:36:34 -0400 Subject: [PATCH 0038/1182] Update history to reflect merge of #7756 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 158b7d23a37..6328aee1f9e 100644 --- a/History.markdown +++ b/History.markdown @@ -165,6 +165,7 @@ * Bump RuboCop to v0.71.0 (#7687) * Use regexp to filter special entries (#7702) * Reduce Array objects generated from utility method (#7749) + * Update mime.types (#7756) ### Documentation From 882279c3075f4b9d036ab0fda00a5ea294968739 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Wed, 24 Jul 2019 15:15:27 +0200 Subject: [PATCH 0039/1182] Add default Sass dir --- docs/_docs/configuration/default.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_docs/configuration/default.md b/docs/_docs/configuration/default.md index 8908578da0a..68ab49fc9bd 100644 --- a/docs/_docs/configuration/default.md +++ b/docs/_docs/configuration/default.md @@ -16,6 +16,8 @@ plugins_dir : _plugins layouts_dir : _layouts data_dir : _data includes_dir : _includes +sass: + sass_dir: _sass collections: posts: output : true From 179599645810f289cbd6cd6eee4e519b7857f478 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 25 Jul 2019 22:05:30 +0530 Subject: [PATCH 0040/1182] Replace redundant Array#map with Array#each (#7761) Merge pull request 7761 --- lib/jekyll/readers/page_reader.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/readers/page_reader.rb b/lib/jekyll/readers/page_reader.rb index 62d7419efec..af4b879db39 100644 --- a/lib/jekyll/readers/page_reader.rb +++ b/lib/jekyll/readers/page_reader.rb @@ -9,14 +9,13 @@ def initialize(site, dir) @unfiltered_content = [] end - # Read all the files in // for Yaml header and create a new Page - # object for each file. + # Create a new `Jekyll::Page` object for each entry in a given array. # - # dir - The String relative path of the directory to read. + # files - An array of file names inside `@dir` # - # Returns an array of static pages. + # Returns an array of publishable `Jekyll::Page` objects. def read(files) - files.map do |page| + files.each do |page| @unfiltered_content << Page.new(@site, @site.source, @dir, page) end @unfiltered_content.select { |page| site.publisher.publish?(page) } From 0f4b7be88ddd39593c226486f056f7402e75299c Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 25 Jul 2019 12:35:32 -0400 Subject: [PATCH 0041/1182] Update history to reflect merge of #7761 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 6328aee1f9e..fecb45a63c2 100644 --- a/History.markdown +++ b/History.markdown @@ -166,6 +166,7 @@ * Use regexp to filter special entries (#7702) * Reduce Array objects generated from utility method (#7749) * Update mime.types (#7756) + * Replace redundant Array#map with Array#each (#7761) ### Documentation From f3a03a14cd26ff716809f1bb01dde95f56d7890a Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Wed, 31 Jul 2019 05:49:38 -0700 Subject: [PATCH 0042/1182] Fix misspelling (#7764) Merge pull request 7764 --- docs/_docs/installation/windows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/installation/windows.md b/docs/_docs/installation/windows.md index 4623b40541e..ceda22b01ce 100644 --- a/docs/_docs/installation/windows.md +++ b/docs/_docs/installation/windows.md @@ -23,7 +23,7 @@ We only cover RubyInstaller-2.4 and newer here, older versions need to 1. Download and Install a **Ruby+Devkit** version from [RubyInstaller Downloads](https://rubyinstaller.org/downloads/). Use default options for installation. 2. Run the `ridk install` step on the last stage of the installation wizard. This is needed for installing gems with native - extensions. You can find addtional information regarding this in the + extensions. You can find additional information regarding this in the [RubyInstaller Documentation](https://github.com/oneclick/rubyinstaller2#using-the-installer-on-a-target-system) 3. Open a new command prompt window from the start menu, so that changes to the `PATH` environment variable becomes effective. Install Jekyll and Bundler via: `gem install jekyll bundler` From 4eec5a55c350200b6b82832731ce4d8ac98d5d6b Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 31 Jul 2019 08:49:40 -0400 Subject: [PATCH 0043/1182] Update history to reflect merge of #7764 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index fecb45a63c2..75f674975f6 100644 --- a/History.markdown +++ b/History.markdown @@ -294,6 +294,7 @@ * Add Jekpack to resources page (#7598) * Introduce frontmatter in step 2 (#7704) * Add recursive navigation tutorial (#7720) + * Fix misspelling of "additional" (#7764) ### Site Enhancements From b55927e8f71b5d3cd6258f7f0d08962dd759cf7d Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 2 Aug 2019 01:51:00 +0530 Subject: [PATCH 0044/1182] Add PathManager class to cache interim paths (#7732) Merge pull request 7732 --- lib/jekyll.rb | 1 + lib/jekyll/entry_filter.rb | 4 ++-- lib/jekyll/page.rb | 2 +- lib/jekyll/path_manager.rb | 31 +++++++++++++++++++++++++++++++ lib/jekyll/reader.rb | 2 +- lib/jekyll/tags/include.rb | 2 +- 6 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 lib/jekyll/path_manager.rb diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 2b0e63826bd..07304057049 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -65,6 +65,7 @@ module Jekyll autoload :LogAdapter, "jekyll/log_adapter" autoload :Page, "jekyll/page" autoload :PageWithoutAFile, "jekyll/page_without_a_file" + autoload :PathManager, "jekyll/path_manager" autoload :PluginManager, "jekyll/plugin_manager" autoload :Publisher, "jekyll/publisher" autoload :Reader, "jekyll/reader" diff --git a/lib/jekyll/entry_filter.rb b/lib/jekyll/entry_filter.rb index 4a238036ec9..b8f4e044238 100644 --- a/lib/jekyll/entry_filter.rb +++ b/lib/jekyll/entry_filter.rb @@ -90,12 +90,12 @@ def symlink_outside_site_source?(entry) # Check if an entry matches a specific pattern. # Returns true if path matches against any glob pattern, else false. def glob_include?(enumerator, entry) - entry_with_source = File.join(site.source, entry) + entry_with_source = PathManager.join(site.source, entry) enumerator.any? do |pattern| case pattern when String - pattern_with_source = File.join(site.source, pattern) + pattern_with_source = PathManager.join(site.source, pattern) File.fnmatch?(pattern_with_source, entry_with_source) || entry_with_source.start_with?(pattern_with_source) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index e6d691c25dc..f353252d825 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -47,7 +47,7 @@ def initialize(site, base, dir, name) end process(name) - read_yaml(File.join(base, dir), name) + read_yaml(PathManager.join(base, dir), name) data.default_proc = proc do |_, key| site.frontmatter_defaults.find(relative_path, type, key) diff --git a/lib/jekyll/path_manager.rb b/lib/jekyll/path_manager.rb new file mode 100644 index 00000000000..eeed1f95890 --- /dev/null +++ b/lib/jekyll/path_manager.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +module Jekyll + # A singleton class that caches frozen instances of path strings returned from its methods. + # + # NOTE: + # This class exists because `File.join` allocates an Array and returns a new String on every + # call using **the same arguments**. Caching the result means reduced memory usage. + # However, the caches are never flushed so that they can be used even when a site is + # regenerating. The results are frozen to deter mutation of the cached string. + # + # Therefore, employ this class only for situations where caching the result is necessary + # for performance reasons. + # + class PathManager + # This class cannot be initialized from outside + private_class_method :new + + # Wraps `File.join` to cache the frozen result. + # Reassigns `nil`, empty strings and empty arrays to a frozen empty string beforehand. + # + # Returns a frozen string. + def self.join(base, item) + base = "" if base.nil? || base.empty? + item = "" if item.nil? || item.empty? + @join ||= {} + @join[base] ||= {} + @join[base][item] ||= File.join(base, item).freeze + end + end +end diff --git a/lib/jekyll/reader.rb b/lib/jekyll/reader.rb index 797e4291a1b..381d9d3165f 100644 --- a/lib/jekyll/reader.rb +++ b/lib/jekyll/reader.rb @@ -85,7 +85,7 @@ def retrieve_posts(dir) def retrieve_dirs(_base, dir, dot_dirs) dot_dirs.each do |file| dir_path = site.in_source_dir(dir, file) - rel_path = File.join(dir, file) + rel_path = PathManager.join(dir, file) @site.reader.read_directories(rel_path) unless @site.dest.chomp("/") == dir_path end end diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 20a41bb779c..7fabe25fea9 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -100,7 +100,7 @@ def tag_includes_dirs(context) def locate_include_file(context, file, safe) includes_dirs = tag_includes_dirs(context) includes_dirs.each do |dir| - path = File.join(dir.to_s, file.to_s) + path = PathManager.join(dir, file) return path if valid_include_file?(path, dir.to_s, safe) end raise IOError, could_not_locate_message(file, includes_dirs, safe) From 532c499751f564512d4f7ae84721afb3a2523ba1 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 1 Aug 2019 16:21:04 -0400 Subject: [PATCH 0045/1182] Update history to reflect merge of #7732 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 75f674975f6..13089508aea 100644 --- a/History.markdown +++ b/History.markdown @@ -109,6 +109,7 @@ * Add `type` attribute to Document instances (#7406) * Reduce allocations from where-filter (#7653) * Memoize SiteDrop#documents to reduce allocations (#7697) + * Add PathManager class to cache interim paths (#7732) ### Development Fixes From 07270c7cfd94aa1b5cfbbd8b9d2e5aedfe203a0b Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Fri, 2 Aug 2019 23:32:07 -0400 Subject: [PATCH 0046/1182] docs: improve how to include rouge stylesheets (#7752) Merge pull request 7752 --- docs/_docs/liquid/tags.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/_docs/liquid/tags.md b/docs/_docs/liquid/tags.md index d402a8558c2..d5ee9d6373f 100644 --- a/docs/_docs/liquid/tags.md +++ b/docs/_docs/liquid/tags.md @@ -78,7 +78,17 @@ end In order for the highlighting to show up, you’ll need to include a highlighting stylesheet. For Pygments or Rouge you can use a stylesheet for Pygments, you -can find an example gallery [here](http://help.farbox.com/pygments.html). +can find an example gallery +[here](https://jwarby.github.io/jekyll-pygments-themes/languages/ruby.html) +or from [its repository](https://github.com/jwarby/jekyll-pygments-themes). + +Copy the CSS file (`native.css` for example) into your css directory and import +the syntax highlighter styles into your `main.css`: + +```css +@import "native.css"; +``` + ## Links From a87ca206dad4e2c026a3141612a02c6bffc72519 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 2 Aug 2019 23:32:09 -0400 Subject: [PATCH 0047/1182] Update history to reflect merge of #7752 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 13089508aea..79c861500fc 100644 --- a/History.markdown +++ b/History.markdown @@ -296,6 +296,7 @@ * Introduce frontmatter in step 2 (#7704) * Add recursive navigation tutorial (#7720) * Fix misspelling of "additional" (#7764) + * docs: improve how to include rouge stylesheets (#7752) ### Site Enhancements From 6a4f8bdbeccee063c4bb823aba3df16bafc88615 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 4 Aug 2019 08:49:34 +0200 Subject: [PATCH 0048/1182] Fix: rubocop offenses (#7769) Merge pull request 7769 --- lib/jekyll/excerpt.rb | 2 +- lib/jekyll/filters.rb | 2 ++ lib/jekyll/readers/post_reader.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/excerpt.rb b/lib/jekyll/excerpt.rb index dee4613fbbc..c7048e6e1cd 100644 --- a/lib/jekyll/excerpt.rb +++ b/lib/jekyll/excerpt.rb @@ -155,7 +155,7 @@ def sanctify_liquid_tags(head) tag_names.flatten! tag_names.reverse_each do |tag_name| next unless liquid_block?(tag_name) - next if head =~ endtag_regex_stash(tag_name) + next if endtag_regex_stash(tag_name).match?(head) modified = true head << "\n{% end#{tag_name} %}" diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index cec65ba3943..0353e857eec 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -368,6 +368,7 @@ def item_property(item, property) end end + # rubocop:disable Performance/RegexpMatch # return numeric values as numbers for proper sorting def parse_sort_input(property) number_like = %r!\A\s*-?(?:\d+\.?\d*|\.\d+)\s*\Z! @@ -375,6 +376,7 @@ def parse_sort_input(property) property end + # rubocop:enable Performance/RegexpMatch def as_liquid(item) case item diff --git a/lib/jekyll/readers/post_reader.rb b/lib/jekyll/readers/post_reader.rb index bdbe6f5c269..17b12321ae4 100644 --- a/lib/jekyll/readers/post_reader.rb +++ b/lib/jekyll/readers/post_reader.rb @@ -50,7 +50,7 @@ def read_publishable(dir, magic_dir, matcher) # Returns klass type of content files def read_content(dir, magic_dir, matcher) @site.reader.get_entries(dir, magic_dir).map do |entry| - next unless entry =~ matcher + next unless matcher.match?(entry) path = @site.in_source_dir(File.join(dir, magic_dir, entry)) Document.new(path, From 9a10ff9b5abc1949083becb2d265abace2ec5215 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 02:49:36 -0400 Subject: [PATCH 0049/1182] Update history to reflect merge of #7769 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 79c861500fc..10518295ff3 100644 --- a/History.markdown +++ b/History.markdown @@ -168,6 +168,7 @@ * Reduce Array objects generated from utility method (#7749) * Update mime.types (#7756) * Replace redundant Array#map with Array#each (#7761) + * Fix: rubocop offenses (#7769) ### Documentation From 0f5e15811fe8f9a33a6cd1e3c05859b627f12e93 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 4 Aug 2019 18:07:45 +0530 Subject: [PATCH 0050/1182] Remove warnings and fixes for deprecated config (#7440) Merge pull request 7440 --- docs/_docs/upgrading/3-to-4.md | 10 +++ features/markdown.feature | 2 +- features/pagination.feature | 6 +- features/plugins.feature | 6 +- features/rendering.feature | 4 +- jekyll.gemspec | 8 +- lib/jekyll/configuration.rb | 151 +++++++-------------------------- test/test_configuration.rb | 108 ++++++++++++----------- 8 files changed, 107 insertions(+), 188 deletions(-) diff --git a/docs/_docs/upgrading/3-to-4.md b/docs/_docs/upgrading/3-to-4.md index 8bd02757e8f..09a46b99b60 100644 --- a/docs/_docs/upgrading/3-to-4.md +++ b/docs/_docs/upgrading/3-to-4.md @@ -156,3 +156,13 @@ Notes: ``` * Vendors that provide a versioned Jekyll Environment Image (e.g. Docker Image, GitHub Pages, etc) will have to manually whitelist kramdown's extension gems in their distributions for Jekyll 4.0. + +## Deprecated Configuration Options + +Jekyll 4.0 has dropped support for all legacy configuration options that were deprecated over multiple +releases in the previous series. + +To that end, we shall no longer output a deprecation warning when we encounter a legacy config key nor +shall we gracefully assign their values to the newer counterparts. Depending on the key, it shall either +be ignored or raise an `InvalidConfigurationError` error if the key is still valid but the associated +value is not of the valid type. diff --git a/features/markdown.feature b/features/markdown.feature index 3649a6d1013..71b13ad969f 100644 --- a/features/markdown.feature +++ b/features/markdown.feature @@ -21,7 +21,7 @@ Feature: Markdown Given I have a configuration file with: | key | value | | paginate | 5 | - | gems | [jekyll-paginate] | + | plugins | [jekyll-paginate] | And I have an "index.html" page that contains "Index - {% for post in paginator.posts %} {{ post.content }} {% endfor %}" And I have a _posts directory And I have the following post: diff --git a/features/pagination.feature b/features/pagination.feature index b8b89ed09cc..e818985066c 100644 --- a/features/pagination.feature +++ b/features/pagination.feature @@ -7,7 +7,7 @@ Feature: Site pagination Given I have a configuration file with: | key | value | | paginate | | - | gems | [jekyll-paginate] | + | plugins | [jekyll-paginate] | And I have a _layouts directory And I have an "index.html" page that contains "{{ paginator.posts.size }}" And I have a _posts directory @@ -35,7 +35,7 @@ Feature: Site pagination | paginate | 1 | | paginate_path | /blog/page-:num | | permalink | /blog/:year/:month/:day/:title | - | gems | [jekyll-paginate] | + | plugins | [jekyll-paginate] | And I have a blog directory And I have an "blog/index.html" page that contains "{{ paginator.posts.size }}" And I have a _posts directory @@ -63,7 +63,7 @@ Feature: Site pagination | paginate | 1 | | paginate_path | /blog/page/:num | | permalink | /blog/:year/:month/:day/:title | - | gems | [jekyll-paginate] | + | plugins | [jekyll-paginate] | And I have a blog directory And I have an "blog/index.html" page that contains "{{ paginator.posts.size }}" And I have an "index.html" page that contains "Don't pick me!" diff --git a/features/plugins.feature b/features/plugins.feature index be01a4a918e..e903783b18d 100644 --- a/features/plugins.feature +++ b/features/plugins.feature @@ -4,7 +4,7 @@ Feature: Configuring and using plugins Scenario: Add a gem-based plugin Given I have an "index.html" file that contains "Whatever" - And I have a configuration file with "gems" set to "[jekyll_test_plugin]" + And I have a configuration file with "plugins" set to "[jekyll_test_plugin]" When I run jekyll build Then I should get a zero exit status And the _site directory should exist @@ -15,7 +15,7 @@ Feature: Configuring and using plugins Given I have an "index.html" file that contains "Whatever" And I have a configuration file with: | key | value | - | gems | [jekyll_test_plugin] | + | plugins | [jekyll_test_plugin] | | whitelist | [] | When I run jekyll build --safe Then I should get a zero exit status @@ -27,7 +27,7 @@ Feature: Configuring and using plugins Given I have an "index.html" file that contains "Whatever" And I have a configuration file with: | key | value | - | gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] | + | plugins | [jekyll_test_plugin, jekyll_test_plugin_malicious] | | whitelist | [jekyll_test_plugin] | When I run jekyll build --safe Then I should get a zero exit status diff --git a/features/rendering.feature b/features/rendering.feature index 0b42d44ba27..654facd5f95 100644 --- a/features/rendering.feature +++ b/features/rendering.feature @@ -98,7 +98,7 @@ Feature: Rendering Scenario: Don't place asset files in layout Given I have an "index.scss" page with layout "simple" that contains ".foo-bar { color:black; }" And I have an "index.coffee" page with layout "simple" that contains "whatever()" - And I have a configuration file with "gems" set to "[jekyll-coffeescript]" + And I have a configuration file with "plugins" set to "[jekyll-coffeescript]" And I have a simple layout that contains "{{ content }}Ahoy, indeed!" When I run jekyll build Then I should get a zero exit status @@ -165,7 +165,7 @@ Feature: Rendering Scenario: Render liquid in CoffeeScript with jekyll-coffeescript enabled Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'" - And I have a configuration file with "gems" set to "[jekyll-coffeescript]" + And I have a configuration file with "plugins" set to "[jekyll-coffeescript]" When I run jekyll build Then I should get a zero exit status And the _site directory should exist diff --git a/jekyll.gemspec b/jekyll.gemspec index cdcb16ea137..acbb41ebdf7 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -48,7 +48,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("safe_yaml", "~> 1.0") s.post_install_message = <<~MSG - ---------------------------------------------------------------------------------- + ------------------------------------------------------------------------------------- This version of Jekyll comes with some major changes. Most notably: @@ -59,6 +59,10 @@ Gem::Specification.new do |s| * Our `post_url` tag now comes with the `relative_url` filter incorporated into it. You shouldn't prepend `{{ site.baseurl }}` to `{% post_url 2019-03-27-hello %}` For further details: https://github.com/jekyll/jekyll/pull/7589 - ---------------------------------------------------------------------------------- + + * Support for deprecated configuration options has been removed. We will no longer + output a warning and gracefully assign their values to the newer counterparts + internally. + ------------------------------------------------------------------------------------- MSG end diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 7b2cb4301a7..2e4d609dd6b 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -79,15 +79,11 @@ class Configuration < Hash class << self # Static: Produce a Configuration ready for use in a Site. - # It takes the input, fills in the defaults where values do not - # exist, and patches common issues including migrating options for - # backwards compatiblity. Except where a key or value is being fixed, - # the user configuration will override the defaults. + # It takes the input, fills in the defaults where values do not exist. # # user_config - a Hash or Configuration of overrides. # - # Returns a Configuration filled with defaults and fixed for common - # problems and backwards-compatibility. + # Returns a Configuration filled with defaults. def from(user_config) Utils.deep_merge_hashes(DEFAULTS, Configuration[user_config].stringify_keys) .add_default_collections.add_default_excludes @@ -132,8 +128,8 @@ def safe_load_file(filename) when %r!\.ya?ml!i SafeYAML.load_file(filename) || {} else - raise ArgumentError, "No parser for '#{filename}' is available. - Use a .y(a)ml or .toml file instead." + raise ArgumentError, + "No parser for '#{filename}' is available. Use a .y(a)ml or .toml file instead." end end @@ -169,7 +165,11 @@ def config_files(override) def read_config_file(file) file = File.expand_path(file) next_config = safe_load_file(file) - check_config_is_hash!(next_config, file) + + unless next_config.is_a?(Hash) + raise ArgumentError, "Configuration file: (INVALID) #{file}".yellow + end + Jekyll.logger.info "Configuration file:", file next_config rescue SystemCallError @@ -177,8 +177,7 @@ def read_config_file(file) Jekyll.logger.warn "Configuration file:", "none" {} else - Jekyll.logger.error "Fatal:", "The configuration file '#{file}' - could not be found." + Jekyll.logger.error "Fatal:", "The configuration file '#{file}' could not be found." raise LoadError, "The Configuration file '#{file}' could not be found." end end @@ -200,12 +199,11 @@ def read_config_files(files) configuration = Utils.deep_merge_hashes(configuration, new_config) end rescue ArgumentError => e - Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ - "Using defaults (and options)." + Jekyll.logger.warn "WARNING:", "Error reading configuration. Using defaults (and options)." warn e end - configuration.backwards_compatibilize.add_default_collections + configuration.validate.add_default_collections end # Public: Split a CSV string into an array containing its values @@ -217,35 +215,18 @@ def csv_to_array(csv) csv.split(",").map(&:strip) end - # Public: Ensure the proper options are set in the configuration to allow for - # backwards-compatibility with Jekyll pre-1.0 + # Public: Ensure the proper options are set in the configuration # - # Returns the backwards-compatible configuration - def backwards_compatibilize + # Returns the configuration Hash + def validate config = clone - # Provide backwards-compatibility - check_auto(config) - check_server(config) - check_plugins(config) - renamed_key "server_port", "port", config - renamed_key "gems", "plugins", config - renamed_key "layouts", "layouts_dir", config - renamed_key "data_source", "data_dir", config - - check_pygments(config) + check_plugins(config) check_include_exclude(config) - check_coderay(config) - check_maruku(config) config end - # DEPRECATED. - def fix_common_issues - self - end - def add_default_collections config = clone @@ -284,15 +265,6 @@ def add_default_excludes config end - def renamed_key(old, new, config) - 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 - private def style_to_permalink(permalink_style) @@ -312,77 +284,13 @@ def style_to_permalink(permalink_style) end end - # Private: Checks if a given config is a hash - # - # extracted_config - the value to check - # file - the file from which the config was extracted - # - # Raises an ArgumentError if given config is not a hash - def check_config_is_hash!(extracted_config, file) - unless extracted_config.is_a?(Hash) - raise ArgumentError, "Configuration file: (INVALID) #{file}".yellow - end - end - - def check_auto(config) - if config.key?("auto") || config.key?("watch") - Jekyll::Deprecator.deprecation_message "Auto-regeneration can no longer" \ - " be set from your configuration file(s). Use the" \ - " --[no-]watch/-w command-line option instead." - config.delete("auto") - config.delete("watch") - end - end - - def check_server(config) - if config.key?("server") - Jekyll::Deprecator.deprecation_message "The 'server' configuration option" \ - " is no longer accepted. Use the 'jekyll serve'" \ - " subcommand to serve your site with WEBrick." - config.delete("server") - end - end - - def check_pygments(config) - if config.key?("pygments") - Jekyll::Deprecator.deprecation_message "The 'pygments' configuration option" \ - " has been renamed to 'highlighter'. Please update your" \ - " config file accordingly. The allowed values are 'rouge', " \ - "'pygments' or null." - - config["highlighter"] = "pygments" if config["pygments"] - config.delete("pygments") - end - end - def check_include_exclude(config) %w(include exclude).each do |option| - if config[option].is_a?(String) - Jekyll::Deprecator.deprecation_message "The '#{option}' configuration option" \ - " must now be specified as an array, but you specified" \ - " a string. For now, we've treated the string you provided" \ - " as a list of comma-separated values." - config[option] = csv_to_array(config[option]) - end - config[option]&.map!(&:to_s) - end - end + next unless config.key?(option) + next if config[option].is_a?(Array) - def check_coderay(config) - if (config["kramdown"] || {}).key?("use_coderay") - Jekyll::Deprecator.deprecation_message "Please change 'use_coderay'" \ - " to 'enable_coderay' in your configuration file." - config["kramdown"]["use_coderay"] = config["kramdown"].delete("enable_coderay") - end - end - - def check_maruku(config) - if config.fetch("markdown", "kramdown").to_s.casecmp("maruku").zero? - Jekyll.logger.abort_with "Error:", "You're using the 'maruku' " \ - "Markdown processor, which has been removed as of 3.0.0. " \ - "We recommend you switch to Kramdown. To do this, replace " \ - "`markdown: maruku` with `markdown: kramdown` in your " \ - "`_config.yml` file." + raise Jekyll::Errors::InvalidConfigurationError, + "'#{option}' should be set as an array, but was: #{config[option].inspect}." end end @@ -391,17 +299,16 @@ def check_maruku(config) # config - the config hash # # Raises a Jekyll::Errors::InvalidConfigurationError if the config `plugins` - # is a string + # is not an Array. def check_plugins(config) - if config.key?("plugins") && config["plugins"].is_a?(String) - Jekyll.logger.error "Configuration Error:", "You specified the" \ - " `plugins` config in your configuration file as a string, please" \ - " use an array instead. If you wanted to set the directory of your" \ - " plugins, use the config key `plugins_dir` instead." - raise Jekyll::Errors::InvalidConfigurationError, - "'plugins' should not be a string, but was: " \ - "#{config["plugins"].inspect}. Use 'plugins_dir' instead." - end + return unless config.key?("plugins") + return if config["plugins"].is_a?(Array) + + Jekyll.logger.error "'plugins' should be set as an array of gem-names, but was: " \ + "#{config["plugins"].inspect}. Use 'plugins_dir' instead to set the directory " \ + "for your non-gemified Ruby plugins." + raise Jekyll::Errors::InvalidConfigurationError, + "'plugins' should be set as an array, but was: #{config["plugins"].inspect}." end end end diff --git a/test/test_configuration.rb b/test/test_configuration.rb index 4f20cd0fa52..75e42e25d9e 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -21,7 +21,7 @@ class TestConfiguration < JekyllUnitTest end should "return a valid Configuration instance" do - assert_instance_of Configuration, Configuration.from({}).fix_common_issues + assert_instance_of Configuration, Configuration.from({}) end should "add default collections" do @@ -92,15 +92,19 @@ class TestConfiguration < JekyllUnitTest should "only assign collections.posts.permalink if a permalink is specified" do result = Configuration[{ "permalink" => "pretty", "collections" => {} }] .add_default_collections - expected = { "posts" => { - "output" => true, - "permalink" => "/:categories/:year/:month/:day/:title/", - } } + + expected = { + "posts" => { + "output" => true, + "permalink" => "/:categories/:year/:month/:day/:title/", + }, + } + assert_equal expected, result["collections"] - result = Configuration[{ "permalink" => nil, "collections" => {} }] - .add_default_collections + result = Configuration[{ "permalink" => nil, "collections" => {} }].add_default_collections expected = { "posts" => { "output" => true } } + assert_equal expected, result["collections"] end @@ -120,6 +124,7 @@ class TestConfiguration < JekyllUnitTest :include => [".htaccess"], :source => "./", }] + @string_keys = Configuration[{ "markdown" => "kramdown", "permalink" => "date", @@ -128,13 +133,16 @@ class TestConfiguration < JekyllUnitTest "source" => "./", }] end + should "stringify symbol keys" do assert_equal @string_keys, @mixed_keys.stringify_keys end + should "not mess with keys already strings" do assert_equal @string_keys, @string_keys.stringify_keys end end + context "#config_files" do setup do @config = Configuration[{ "source" => source_dir }] @@ -150,32 +158,39 @@ class TestConfiguration < JekyllUnitTest assert @config.config_files(@one_config_file).is_a?(Array) assert @config.config_files(@multiple_files).is_a?(Array) end + should "return the default config path if no config files are specified" do assert_equal [source_dir("_config.yml")], @config.config_files(@no_override) end + should "return .yaml if it exists but .yml does not" do allow(File).to receive(:exist?).with(source_dir("_config.yml")).and_return(false) allow(File).to receive(:exist?).with(source_dir("_config.yaml")).and_return(true) assert_equal [source_dir("_config.yaml")], @config.config_files(@no_override) end + should "return .yml if both .yml and .yaml exist" do allow(File).to receive(:exist?).with(source_dir("_config.yml")).and_return(true) assert_equal [source_dir("_config.yml")], @config.config_files(@no_override) end + should "return .toml if that exists" do allow(File).to receive(:exist?).with(source_dir("_config.yml")).and_return(false) allow(File).to receive(:exist?).with(source_dir("_config.yaml")).and_return(false) allow(File).to receive(:exist?).with(source_dir("_config.toml")).and_return(true) assert_equal [source_dir("_config.toml")], @config.config_files(@no_override) end + should "return .yml if both .yml and .toml exist" do allow(File).to receive(:exist?).with(source_dir("_config.yml")).and_return(true) allow(File).to receive(:exist?).with(source_dir("_config.toml")).and_return(true) assert_equal [source_dir("_config.yml")], @config.config_files(@no_override) end + should "return the config if given one config file" do assert_equal %w(config.yml), @config.config_files(@one_config_file) end + should "return an array of the config files if given many config files" do assert_equal( %w(config/site.yml config/deploy.toml configuration.yml), @@ -204,77 +219,59 @@ class TestConfiguration < JekyllUnitTest should "continue to read config files if one is empty" do allow(SafeYAML).to receive(:load_file).with(File.expand_path("empty.yml")).and_return(false) - allow(SafeYAML) - .to receive(:load_file) - .with(File.expand_path("not_empty.yml")) - .and_return("foo" => "bar", "include" => "", "exclude" => "") + allow(SafeYAML).to receive(:load_file).with(File.expand_path("not_empty.yml")).and_return( + "foo" => "bar" + ) Jekyll.logger.log_level = :warn - read_config = @config.read_config_files(["empty.yml", "not_empty.yml"]) + read_config = @config.read_config_files(%w(empty.yml not_empty.yml)) Jekyll.logger.log_level = :info assert_equal "bar", read_config["foo"] end end - context "#backwards_compatibilize" do + + context "#validate" do setup do @config = Configuration[{ "auto" => true, "watch" => true, "server" => true, - "exclude" => "READ-ME.md, Gemfile,CONTRIBUTING.hello.markdown", - "include" => "STOP_THE_PRESSES.txt,.heloses, .git", "pygments" => true, "layouts" => true, "data_source" => true, "gems" => [], }] end - should "unset 'auto' and 'watch'" do - assert @config.key?("auto") - assert @config.key?("watch") - assert !@config.backwards_compatibilize.key?("auto") - assert !@config.backwards_compatibilize.key?("watch") - end - should "unset 'server'" do - assert @config.key?("server") - assert !@config.backwards_compatibilize.key?("server") - end - should "transform string exclude into an array" do - assert @config.key?("exclude") - assert @config.backwards_compatibilize.key?("exclude") - expected = %w(READ-ME.md Gemfile CONTRIBUTING.hello.markdown) - assert_equal expected, @config.backwards_compatibilize["exclude"] - end - should "transform string include into an array" do - assert @config.key?("include") - assert @config.backwards_compatibilize.key?("include") - expected = %w(STOP_THE_PRESSES.txt .heloses .git) - assert_equal expected, @config.backwards_compatibilize["include"] - end - should "set highlighter to pygments" do - assert @config.key?("pygments") - assert !@config.backwards_compatibilize.key?("pygments") - assert_equal "pygments", @config.backwards_compatibilize["highlighter"] - end - should "adjust directory names" do - 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"] + + should "raise an error if `exclude` key is a string" do + config = Configuration[{ "exclude" => "READ-ME.md, Gemfile,CONTRIBUTING.hello.markdown" }] + assert_raises(Jekyll::Errors::InvalidConfigurationError) { config.validate } + end + + should "raise an error if `include` key is a string" do + config = Configuration[{ "include" => "STOP_THE_PRESSES.txt,.heloses, .git" }] + assert_raises(Jekyll::Errors::InvalidConfigurationError) { config.validate } end + should "raise an error if `plugins` key is a string" do config = Configuration[{ "plugins" => "_plugin" }] - assert_raises Jekyll::Errors::InvalidConfigurationError do - config.backwards_compatibilize - end + assert_raises(Jekyll::Errors::InvalidConfigurationError) { config.validate } end - should "set the `gems` config to `plugins`" do + + should "not rename configuration keys" do + assert @config.key?("layouts") + assert @config.validate.key?("layouts") + refute @config.validate.key?("layouts_dir") + + assert @config.key?("data_source") + assert @config.validate.key?("data_source") + refute @config.validate.key?("data_dir") + assert @config.key?("gems") - assert !@config.backwards_compatibilize["gems"] - assert @config.backwards_compatibilize["plugins"] + assert @config.validate.key?("gems") + refute @config.validate.key?("plugins") end end + context "loading configuration" do setup do @path = source_dir("_config.yml") @@ -331,6 +328,7 @@ class TestConfiguration < JekyllUnitTest # as opposed to: assert_equal ':foo', SafeYAML.load(':foo') end end + context "loading config from external file" do setup do @paths = { From 0e591f08dafe284d7326b7d951411b67d5b3eb42 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 08:37:47 -0400 Subject: [PATCH 0051/1182] Update history to reflect merge of #7440 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 10518295ff3..c99f4f95ed1 100644 --- a/History.markdown +++ b/History.markdown @@ -110,6 +110,7 @@ * Reduce allocations from where-filter (#7653) * Memoize SiteDrop#documents to reduce allocations (#7697) * Add PathManager class to cache interim paths (#7732) + * Remove warnings and fixes for deprecated config (#7440) ### Development Fixes From 6511342e159db9d54d247000767cf19c1880d5a9 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sun, 4 Aug 2019 13:20:11 -0500 Subject: [PATCH 0052/1182] Prepare Jekyll 4.0.0 beta1 (#7716) Merge pull request 7716 --- ...0-jekyll-4-0-0-pre-beta1-released.markdown | 40 +++++++++++++++++++ lib/jekyll/version.rb | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown diff --git a/docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown b/docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown new file mode 100644 index 00000000000..24936f38fc7 --- /dev/null +++ b/docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown @@ -0,0 +1,40 @@ +--- +title: Jekyll 4.0.0.pre.beta1 Released +date: 2019-07-20 10:43:31 -0500 +author: mattr- +version: 4.0.0.pre.beta1 +categories: [release] +--- + +Dear Jekyllers, + +It's time for another pre-release of Jekyll 4! 🎉 + +This pre-release moves us further down the path of releasing Jekyll 4.0.0. All the same goodies [from the last pre-release](/news/2019/03/18/jekyll-4-0-0-pre-alpha1-released/) are here, along with a few more things I want to highlight: + +Jekyll 4.0 is a new *major* version and it comes with a few breaking changes, notably : + +1. We dropped support for [Ruby 2.3 which EOL at the end of March 2019](https://www.ruby-lang.org/en/downloads/). + GitHub Pages runs Ruby 2.5.x, services like Netlify or Forestry already upgraded to latest Ruby 2.6.x. +2. `link` tag now include `relative_url` filter, hurray [no more need to prepend `{% raw %}{{ site.baseurl }}{% endraw %}` ](https://github.com/jekyll/jekyll/pull/6727). +3. [`{% raw %}{% highlight %}{% endraw %}` now behaves like `{% raw %}{% raw %}{% endraw %}`](https://github.com/jekyll/jekyll/pull/6821), so you can no longer use `include` tags within. +4. We dropped support for Pygments, RedCarpet and rdiscount. +5. We bumped kramdown to v2. + +If you're a plugin developer, we still need your feedback! Your plugin may not work with version 4 and we'd like to fix those issues before we release. + +Checkout the complete [changelog](https://github.com/jekyll/jekyll/releases/tag/v4.0.0.pre.beta1) for more details. + +To test this pre version run: + +```sh +gem install jekyll --pre +``` + +Please test this version thoroughly and file bugs as you encounter them. + +Thanks to our dear contributors for helping making Jekyll better: + +Aidan Fitzgerald, Akshat Kedia, Alex Wood, Alexey Kopytko, Alexey Pelykh, Ali Thompson, Ana María Martínez Gómez, Ananthakumar, Andreas Möller, Andrew Lyndem, Andy Alt, Anne Gentle, Anny, Arjun Thakur, Arthur Attwell, Ashwin Maroli, Behrang, Belhassen Chelbi, Ben Keith, Ben Otte, Bilawal Hameed, Boris Schapira, Boris van Hoytema, Brett C, Chris Finazzo, Christian Oliff, Damien Solodow, Dan Allen, Dan Friedman, Daniel Höpfl, David J. Malan, Denis McDonald, Derek Smart, Derpy, Dusty Candland, ExE Boss, Frank Taillandier, Gareth Cooper, Grzegorz Kaczorek, Isaac Goodman, Jacob Byers, Jakob Krigovsky, Jan Pobořil, Joe Shannon, Jordan Morgan, Jorie Tappa, Josue Caraballo, Justin Vallelonga, Jörg Steinsträter, Karel Bílek, Keith Mifsud, Kelly-Ann Green, Ken Salomon, Kevin Plattret, Kyle Barbour, Lars Kanis, Leandro Facchinetti, Luis Enrique Perez Alvarez, Luis Guillermo Yáñez, Ma HongJun, Manu Mathew, Mario, Martin Scharm, Matt Massicotte, Matthew Rathbone, Maxwell Gerber, Mertcan Yücel, Michael Hiiva, Mike Kasberg, Mike Neumegen, Monica Powell, Nicolas Hoizey, Nikhil Swaminathan, Nikita Skalkin, Olivia Hugger, Parker Moore, Pat Hawks, Patrick Favre-Bulle, Paul Kim, Philip Belesky, Preston Lim, Ralph, Robert Riemann, Rosário Pereira Fernandes, Samuel Gruetter, Scott Killen, Sri Pravan Paturi, Stephan Fischer, Stephen Weiss, Steven Westmoreland, Sundaram Kalyan Vedala, Thanos Kolovos, Timo Schuhmacher, Tobias, Tom Harvey, Tushar Prajapati, Victor Afanasev, Vitor Oliveira, Wouter Schoot, XhmikosR, Zhang Xiangze, _94gsc, argv-minus-one, chrisfinazzo, ikeji, jess, jpasholk, makmm, mo khan, ninevra, penguinpet, 김정환, 104fps + +Happy Jekylling everyone! diff --git a/lib/jekyll/version.rb b/lib/jekyll/version.rb index 226550da3b1..15b8763be9d 100644 --- a/lib/jekyll/version.rb +++ b/lib/jekyll/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Jekyll - VERSION = "4.0.0.pre.alpha1" + VERSION = "4.0.0.pre.beta1" end From 21202589dea5aa4ca4fe7c5618f2f5269470e285 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 14:20:13 -0400 Subject: [PATCH 0053/1182] Update history to reflect merge of #7716 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index c99f4f95ed1..6f02194e7b2 100644 --- a/History.markdown +++ b/History.markdown @@ -312,6 +312,7 @@ ### release * Release v4.0.0.pre.alpha1 (#7574) + * Prepare Jekyll 4.0.0 beta1 (#7716) ## 3.8.6 / 2019-07-02 From 8e52cdbb6b952230d9468d377e7fa43fcdfca56d Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sun, 4 Aug 2019 13:21:33 -0500 Subject: [PATCH 0054/1182] Release :gem: 4.0.0.pre.beta1 From 91f82907a3dc9c6453a11a74fd637ffd03d9c180 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 4 Aug 2019 21:34:17 +0200 Subject: [PATCH 0055/1182] update date --- ...down => 2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/_posts/{2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown => 2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown} (99%) diff --git a/docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown b/docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown similarity index 99% rename from docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown rename to docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown index 24936f38fc7..cf470f2987e 100644 --- a/docs/_posts/2019-07-20-jekyll-4-0-0-pre-beta1-released.markdown +++ b/docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown @@ -1,6 +1,6 @@ --- title: Jekyll 4.0.0.pre.beta1 Released -date: 2019-07-20 10:43:31 -0500 +date: 2019-08-04 10:43:31 -0500 author: mattr- version: 4.0.0.pre.beta1 categories: [release] From f446aebf07a7c06369c99d98410fc0339fd9040b Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 5 Aug 2019 01:33:56 +0530 Subject: [PATCH 0056/1182] Delegate --profile tabulation to `terminal-table` (#7627) Merge pull request 7627 --- jekyll.gemspec | 1 + lib/jekyll/liquid_renderer/table.rb | 77 +++++++---------------------- test/test_liquid_renderer.rb | 6 +-- 3 files changed, 21 insertions(+), 63 deletions(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index acbb41ebdf7..68d79fc68af 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -46,6 +46,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("pathutil", "~> 0.9") s.add_runtime_dependency("rouge", "~> 3.0") s.add_runtime_dependency("safe_yaml", "~> 1.0") + s.add_runtime_dependency("terminal-table", "~> 1.8") s.post_install_message = <<~MSG ------------------------------------------------------------------------------------- diff --git a/lib/jekyll/liquid_renderer/table.rb b/lib/jekyll/liquid_renderer/table.rb index 1f83529a0bf..a55bb8c9201 100644 --- a/lib/jekyll/liquid_renderer/table.rb +++ b/lib/jekyll/liquid_renderer/table.rb @@ -10,72 +10,29 @@ def initialize(stats) end def to_s(num_of_rows = 50) - data = data_for_table(num_of_rows) - widths = table_widths(data) - generate_table(data, widths) + tabulate(data_for_table(num_of_rows)) end private - def generate_table(data, widths) - str = +"\n" - - table_head = data.shift - table_foot = data.pop - - 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 << generate_table_head_border(table_foot, widths) - str << generate_row(table_foot, widths).rstrip - - 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| - str << if cell_index.zero? - cell_data.ljust(widths[cell_index], " ") - else - 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 = [] - - data.each do |row| - row.each_with_index do |cell, index| - widths[index] = [cell.length, widths[index]].compact.max - end + def tabulate(data) + require "terminal-table" + + header = data.shift + footer = data.pop + output = +"\n" + + table = Terminal::Table.new do |t| + t << header + t << :separator + data.each { |row| t << row } + t << :separator + t << footer + t.style = { :alignment => :right, :border_top => false, :border_bottom => false } + t.align_column(0, :left) end - widths + output << table.to_s << "\n" end # rubocop:disable Metrics/AbcSize diff --git a/test/test_liquid_renderer.rb b/test/test_liquid_renderer.rb index 32e980b8af9..13e6867295b 100644 --- a/test/test_liquid_renderer.rb +++ b/test/test_liquid_renderer.rb @@ -16,9 +16,9 @@ class TestLiquidRenderer < JekyllUnitTest # rubocop:disable Metrics/LineLength expected = [ - %r!^Filename\s+|\s+Count\s+|\s+Bytes\s+|\s+Time$!, - %r!^-+\++-+\++-+\++-+$!, - %r!^_posts/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{2}K\s+|\s+\d+\.\d{3}$!, + %r!^\| Filename\s+|\s+Count\s+|\s+Bytes\s+|\s+Time$!, + %r!^\+(?:-+\+){4}$!, + %r!^\|_posts/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{2}K\s+|\s+\d+\.\d{3}$!, ] # rubocop:enable Metrics/LineLength From f8c66f02e11f10a0797e299ed918cd5833902175 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 16:03:58 -0400 Subject: [PATCH 0057/1182] Update history to reflect merge of #7627 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 6f02194e7b2..5cb511678a3 100644 --- a/History.markdown +++ b/History.markdown @@ -111,6 +111,7 @@ * Memoize SiteDrop#documents to reduce allocations (#7697) * Add PathManager class to cache interim paths (#7732) * Remove warnings and fixes for deprecated config (#7440) + * Delegate --profile tabulation to `terminal-table` (#7627) ### Development Fixes From 764201dc8edc24969d52ccad5d18db9672afe78c Mon Sep 17 00:00:00 2001 From: Michelle Greer Date: Sun, 4 Aug 2019 15:06:00 -0500 Subject: [PATCH 0058/1182] Added Bonsai Search (#7543) Merge pull request 7543 --- docs/pages/resources.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/resources.md b/docs/pages/resources.md index 2626970bf35..30a2d1895d6 100644 --- a/docs/pages/resources.md +++ b/docs/pages/resources.md @@ -67,6 +67,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site ### Search - [Algolia](https://blog.algolia.com/instant-search-blog-documentation-jekyll-plugin/): Add a powerful instant search to your Jekyll site + - [Bonsai Search](https://docs.bonsai.io/article/217-jekyll): The easiest way to use Elasticsearch for your Jekyll site - [CloudSh](https://cloudsh.com/generators/How-to-setup-search-on-Jekyll/): Website search with a few lines of JavaScript ## Other commentary From 2c7cbddeba7f547834fe37273fc513fdee648f61 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 16:06:02 -0400 Subject: [PATCH 0059/1182] Update history to reflect merge of #7543 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 5cb511678a3..01c1d5f9dab 100644 --- a/History.markdown +++ b/History.markdown @@ -300,6 +300,7 @@ * Add recursive navigation tutorial (#7720) * Fix misspelling of "additional" (#7764) * docs: improve how to include rouge stylesheets (#7752) + * Added Bonsai Search (#7543) ### Site Enhancements From 65f88311685c0df5aa3a0ee0970d41b879fd3de8 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 5 Aug 2019 01:38:54 +0530 Subject: [PATCH 0060/1182] Reduce allocations by using #each_with_object (#7758) Merge pull request 7758 --- lib/jekyll/configuration.rb | 10 ++++++---- lib/jekyll/convertible.rb | 7 ++++--- lib/jekyll/site.rb | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 2e4d609dd6b..298a90fa932 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -4,7 +4,7 @@ module Jekyll class Configuration < Hash # Default options. Overridden by values in _config.yml. # Strings rather than symbols are used for compatibility with YAML. - DEFAULTS = Configuration[{ + DEFAULTS = { # Where things are "source" => Dir.pwd, "destination" => File.join(Dir.pwd, "_site"), @@ -75,7 +75,7 @@ class Configuration < Hash "footnote_nr" => 1, "show_warnings" => false, }, - }.map { |k, v| [k, v.freeze] }].freeze + }.each_with_object(Configuration.new) { |(k, v), hsh| hsh[k] = v.freeze }.freeze class << self # Static: Produce a Configuration ready for use in a Site. @@ -94,7 +94,7 @@ def from(user_config) # # Return a copy of the hash where all its keys are strings def stringify_keys - reduce({}) { |hsh, (k, v)| hsh.merge(k.to_s => v) } + each_with_object({}) { |(k, v), hsh| hsh[k.to_s] = v } end def get_config_value_with_override(config_key, override) @@ -235,7 +235,9 @@ def add_default_collections # Ensure we have a hash. if config["collections"].is_a?(Array) - config["collections"] = Hash[config["collections"].map { |c| [c, {}] }] + config["collections"] = config["collections"].each_with_object({}) do |collection, hash| + hash[collection] = {} + end end config["collections"] = Utils.deep_merge_hashes( diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index 35f6b0f4863..3847831f888 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -112,9 +112,10 @@ def render_liquid(content, payload, info, path) # # Returns the Hash representation of this Convertible. def to_liquid(attrs = nil) - further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map do |attribute| - [attribute, send(attribute)] - end] + further_data = \ + (attrs || self.class::ATTRIBUTES_FOR_LIQUID).each_with_object({}) do |attribute, hsh| + hsh[attribute] = send(attribute) + end defaults = site.frontmatter_defaults.all(relative_path, type) Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 50653e9042f..8aca2d655a0 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -145,9 +145,9 @@ def ensure_not_in_dest # # Returns a Hash containing collection name-to-instance pairs. def collections - @collections ||= Hash[collection_names.map do |coll| - [coll, Jekyll::Collection.new(self, coll)] - end] + @collections ||= collection_names.each_with_object({}) do |name, hsh| + hsh[name] = Jekyll::Collection.new(self, name) + end end # The list of collection names. From 93794d9239fefb8e496645bc214df00b82dc4b33 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 16:08:55 -0400 Subject: [PATCH 0061/1182] Update history to reflect merge of #7758 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 01c1d5f9dab..463bcde76d5 100644 --- a/History.markdown +++ b/History.markdown @@ -171,6 +171,7 @@ * Update mime.types (#7756) * Replace redundant Array#map with Array#each (#7761) * Fix: rubocop offenses (#7769) + * Reduce allocations by using #each_with_object (#7758) ### Documentation From a0c3a6bced74661c2810e291e0ab85c3626d2913 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 5 Aug 2019 01:39:27 +0530 Subject: [PATCH 0062/1182] Memoize fallback_data for Drop (#7728) Merge pull request 7728 --- lib/jekyll/drops/url_drop.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/drops/url_drop.rb b/lib/jekyll/drops/url_drop.rb index 6edb7d64d72..98a03f4a305 100644 --- a/lib/jekyll/drops/url_drop.rb +++ b/lib/jekyll/drops/url_drop.rb @@ -125,7 +125,7 @@ def y_day private def fallback_data - {} + @fallback_data ||= {} end end end From 2736589ba19ab8390168be58480df4f359745464 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 16:09:29 -0400 Subject: [PATCH 0063/1182] Update history to reflect merge of #7728 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 463bcde76d5..a1dd6eba518 100644 --- a/History.markdown +++ b/History.markdown @@ -172,6 +172,7 @@ * Replace redundant Array#map with Array#each (#7761) * Fix: rubocop offenses (#7769) * Reduce allocations by using #each_with_object (#7758) + * Memoize fallback_data for Drop (#7728) ### Documentation From 8035a3e153cee4ee48af3dda46f3472c8b524d2f Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 5 Aug 2019 01:41:12 +0530 Subject: [PATCH 0064/1182] Use String#end_with? to check if entry is a backup (#7701) Merge pull request 7701 --- lib/jekyll/entry_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/entry_filter.rb b/lib/jekyll/entry_filter.rb index b8f4e044238..4f527eddf57 100644 --- a/lib/jekyll/entry_filter.rb +++ b/lib/jekyll/entry_filter.rb @@ -53,7 +53,7 @@ def special?(entry) end def backup?(entry) - entry[-1..-1] == "~" + entry.end_with?("~") end def excluded?(entry) From 272360a80b75a79333491ed4876ad7cb668ccee8 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 4 Aug 2019 16:11:13 -0400 Subject: [PATCH 0065/1182] Update history to reflect merge of #7701 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a1dd6eba518..e32abe94383 100644 --- a/History.markdown +++ b/History.markdown @@ -173,6 +173,7 @@ * Fix: rubocop offenses (#7769) * Reduce allocations by using #each_with_object (#7758) * Memoize fallback_data for Drop (#7728) + * Use String#end_with? to check if entry is a backup (#7701) ### Documentation From 0490d71661c1383a815ae9ef85863566acf93087 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 4 Aug 2019 22:25:14 +0200 Subject: [PATCH 0066/1182] Fix 404 --- docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown b/docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown index cf470f2987e..64f16975b13 100644 --- a/docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown +++ b/docs/_posts/2019-08-04-jekyll-4-0-0-pre-beta1-released.markdown @@ -4,6 +4,7 @@ date: 2019-08-04 10:43:31 -0500 author: mattr- version: 4.0.0.pre.beta1 categories: [release] +redirect_from: /news/2019/07/20/jekyll-4-0-0-pre-beta1-released/ --- Dear Jekyllers, From de60632309bdd3a1cc16d2b2bdc6137ca2217d2d Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 14 Aug 2019 23:06:11 +0530 Subject: [PATCH 0067/1182] Remove configuration of theme sass files from Core (#7290) Merge pull request 7290 --- Gemfile | 4 ++++ features/rendering.feature | 2 +- features/theme.feature | 13 ++++++++++--- jekyll.gemspec | 2 +- lib/jekyll/theme.rb | 8 -------- test/fixtures/test-theme/assets/style.scss | 2 +- test/test_filters.rb | 14 +++++++++----- test/test_sass.rb | 7 ++++++- test/test_site.rb | 5 +++-- test/test_theme.rb | 6 ------ test/test_theme_assets_reader.rb | 2 +- 11 files changed, 36 insertions(+), 29 deletions(-) diff --git a/Gemfile b/Gemfile index df6d2f2718d..3828ee7a503 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,10 @@ gemspec :name => "jekyll" # refinements introduced in i18n-1.3.0 gem "i18n", "~> 1.2.0" if RUBY_ENGINE == "jruby" +# Point to the sass-converter's repository to ensure Windows builds render as expected. +# Remove once "jekyll-sass-converter-2.0.0" ships. +gem "jekyll-sass-converter", :github => "jekyll/jekyll-sass-converter" + gem "rake", "~> 12.0" group :development do diff --git a/features/rendering.feature b/features/rendering.feature index 654facd5f95..2ecd86dc37b 100644 --- a/features/rendering.feature +++ b/features/rendering.feature @@ -154,7 +154,7 @@ Feature: Rendering When I run jekyll build Then I should get a zero exit status And the _site directory should exist - And I should see ".foo-bar {\n color: red; }" in "_site/index.css" + And I should see ".foo-bar { color: red; }\n\n\/\*# sourceMappingURL=index.css.map \*\/" in "_site/index.css" Scenario: Not render liquid in CoffeeScript without explicitly including jekyll-coffeescript Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'" diff --git a/features/theme.feature b/features/theme.feature index 3941abc8d86..5f78a233152 100644 --- a/features/theme.feature +++ b/features/theme.feature @@ -16,12 +16,19 @@ Feature: Writing themes Scenario: A theme with SCSS Given I have a configuration file with "theme" set to "test-theme" - And I have a css directory - And I have a "css/main.scss" page that contains "@import 'test-theme-black';" When I run jekyll build Then I should get a zero exit status And the _site directory should exist - And I should see ".sample {\n color: black; }" in "_site/css/main.css" + And I should see ".sample { color: red; }\n\n\/\*# sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css" + + Scenario: Overriding a theme with SCSS + Given I have a configuration file with "theme" set to "test-theme" + And I have an assets directory + And I have an "assets/style.scss" page that contains "@import 'test-theme-black';" + When I run jekyll build + Then I should get a zero exit status + And the _site directory should exist + And I should see ".sample { color: black; }\n\n\/\*# sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css" Scenario: A theme with an include Given I have a configuration file with "theme" set to "test-theme" diff --git a/jekyll.gemspec b/jekyll.gemspec index 68d79fc68af..a3ac65bd2b8 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("colorator", "~> 1.0") s.add_runtime_dependency("em-websocket", "~> 0.5") s.add_runtime_dependency("i18n", ">= 0.9.5", "< 2") - s.add_runtime_dependency("jekyll-sass-converter", "~> 1.0") + s.add_runtime_dependency("jekyll-sass-converter", "= 2.0.0.pre.beta") s.add_runtime_dependency("jekyll-watch", "~> 2.0") s.add_runtime_dependency("kramdown", "~> 2.1") s.add_runtime_dependency("kramdown-parser-gfm", "~> 1.0") diff --git a/lib/jekyll/theme.rb b/lib/jekyll/theme.rb index ac0330201ea..5ef4d044504 100644 --- a/lib/jekyll/theme.rb +++ b/lib/jekyll/theme.rb @@ -10,7 +10,6 @@ def initialize(name) @name = name.downcase.strip Jekyll.logger.debug "Theme:", name Jekyll.logger.debug "Theme source:", root - configure_sass end def root @@ -38,13 +37,6 @@ def assets_path @assets_path ||= path_for "assets" end - def configure_sass - return unless sass_path - - External.require_with_graceful_fail("sass") unless defined?(Sass) - Sass.load_paths << sass_path - end - def runtime_dependencies gemspec.runtime_dependencies end diff --git a/test/fixtures/test-theme/assets/style.scss b/test/fixtures/test-theme/assets/style.scss index 47c4a2f1375..00096523507 100644 --- a/test/fixtures/test-theme/assets/style.scss +++ b/test/fixtures/test-theme/assets/style.scss @@ -1,3 +1,3 @@ --- --- -@import "test-theme-{{ site.theme-color | default: "red" }}"; +@import "test-theme-{{ site.theme-color | default: 'red' }}"; diff --git a/test/test_filters.rb b/test/test_filters.rb index 39ec85653eb..19f841eed25 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -138,14 +138,18 @@ def select; end should "sassify with simple string" do assert_equal( - "p {\n color: #123456; }\n", - @filter.sassify("$blue:#123456\np\n color: $blue") + "p { color: #123456; }\n", + @filter.sassify(<<~SASS) + $blue: #123456 + p + color: $blue + SASS ) end should "scssify with simple string" do assert_equal( - "p {\n color: #123456; }\n", + "p { color: #123456; }\n", @filter.scssify("$blue:#123456; p{color: $blue}") ) end @@ -811,7 +815,7 @@ def to_liquid "The list of grouped items for '' is not an Array." ) # adjust array.size to ignore symlinked page in Windows - qty = Utils::Platforms.really_windows? ? 15 : 16 + qty = Utils::Platforms.really_windows? ? 16 : 18 assert_equal qty, g["items"].size end end @@ -1066,7 +1070,7 @@ def to_liquid "The list of grouped items for '' is not an Array." ) # adjust array.size to ignore symlinked page in Windows - qty = Utils::Platforms.really_windows? ? 15 : 16 + qty = Utils::Platforms.really_windows? ? 16 : 18 assert_equal qty, g["items"].size end end diff --git a/test/test_sass.rb b/test/test_sass.rb index 686631d6020..d4708ef40f0 100644 --- a/test/test_sass.rb +++ b/test/test_sass.rb @@ -14,7 +14,12 @@ class TestSass < JekyllUnitTest end should "import SCSS partial" do - assert_equal ".half {\n width: 50%; }\n", File.read(@test_css_file) + result = <<~CSS + .half { width: 50%; } + + /*# sourceMappingURL=main.css.map */ + CSS + assert_equal result.rstrip, File.read(@test_css_file) end should "register the SCSS converter" do diff --git a/test/test_site.rb b/test/test_site.rb index c8166fed700..70614fdef2e 100644 --- a/test/test_site.rb +++ b/test/test_site.rb @@ -240,6 +240,7 @@ def generate(site) index.html index.html info.md + main.css.map main.scss properties.html sitemap.xml @@ -248,9 +249,9 @@ def generate(site) ) unless Utils::Platforms.really_windows? # files in symlinked directories may appear twice - sorted_pages.push("main.scss", "symlinked-file").sort! + sorted_pages.push("main.css.map", "main.scss", "symlinked-file").sort! end - assert_equal sorted_pages, @site.pages.map(&:name) + assert_equal sorted_pages, @site.pages.map(&:name).sort! end should "read posts" do diff --git a/test/test_theme.rb b/test/test_theme.rb index bc1f8de6821..4c6fee2750c 100644 --- a/test/test_theme.rb +++ b/test/test_theme.rb @@ -26,12 +26,6 @@ def setup Theme.new("foo").version end end - - should "add itself to sass's load path" do - @theme.configure_sass - message = "Sass load paths should include the theme sass dir" - assert Sass.load_paths.include?(@theme.sass_path), message - end end context "path generation" do diff --git a/test/test_theme_assets_reader.rb b/test/test_theme_assets_reader.rb index 983f63b7a80..02ce004fad6 100644 --- a/test/test_theme_assets_reader.rb +++ b/test/test_theme_assets_reader.rb @@ -39,7 +39,7 @@ def refute_file_with_relative_path(haystack, relative_path) file = @site.pages.find { |f| f.relative_path == "assets/style.scss" } refute_nil file assert_equal @site.in_dest_dir("assets/style.css"), file.destination(@site.dest) - assert_includes file.output, ".sample {\n color: black; }" + assert_includes file.output, ".sample { color: black; }" end should "not overwrite site content with the same relative path" do From 65773e19a8aed4d7e7fd6ad7f8cbb33f2fcec6ff Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 14 Aug 2019 13:36:15 -0400 Subject: [PATCH 0068/1182] Update history to reflect merge of #7290 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index e32abe94383..a232a2a1ac3 100644 --- a/History.markdown +++ b/History.markdown @@ -65,6 +65,7 @@ * Don't read symlinks in site.include in safe mode (#7711) * Replace `String#=~` with `String#match?` (#7723) * Update log output for an invalid theme directory (#7679) + * Remove configuration of theme sass files from Core (#7290) ### Minor Enhancements From 4e37fb64200e08d2ea532be1d269064aaedd7ab5 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 14 Aug 2019 23:54:55 +0530 Subject: [PATCH 0069/1182] Use jekyll-sass-converter-2.0 by default (#7778) Merge pull request 7778 --- Gemfile | 4 ---- jekyll.gemspec | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 3828ee7a503..df6d2f2718d 100644 --- a/Gemfile +++ b/Gemfile @@ -7,10 +7,6 @@ gemspec :name => "jekyll" # refinements introduced in i18n-1.3.0 gem "i18n", "~> 1.2.0" if RUBY_ENGINE == "jruby" -# Point to the sass-converter's repository to ensure Windows builds render as expected. -# Remove once "jekyll-sass-converter-2.0.0" ships. -gem "jekyll-sass-converter", :github => "jekyll/jekyll-sass-converter" - gem "rake", "~> 12.0" group :development do diff --git a/jekyll.gemspec b/jekyll.gemspec index a3ac65bd2b8..cec995b90d6 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("colorator", "~> 1.0") s.add_runtime_dependency("em-websocket", "~> 0.5") s.add_runtime_dependency("i18n", ">= 0.9.5", "< 2") - s.add_runtime_dependency("jekyll-sass-converter", "= 2.0.0.pre.beta") + s.add_runtime_dependency("jekyll-sass-converter", "~> 2.0") s.add_runtime_dependency("jekyll-watch", "~> 2.0") s.add_runtime_dependency("kramdown", "~> 2.1") s.add_runtime_dependency("kramdown-parser-gfm", "~> 1.0") From fd476206d7d3690bec8df0f5d0a2407120b9e65d Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 14 Aug 2019 14:24:57 -0400 Subject: [PATCH 0070/1182] Update history to reflect merge of #7778 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a232a2a1ac3..885eb807617 100644 --- a/History.markdown +++ b/History.markdown @@ -175,6 +175,7 @@ * Reduce allocations by using #each_with_object (#7758) * Memoize fallback_data for Drop (#7728) * Use String#end_with? to check if entry is a backup (#7701) + * Use jekyll-sass-converter-2.0 by default (#7778) ### Documentation From 326ab2dfb70f18c3f0e5d9bfafd4f48232ec68f5 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 15 Aug 2019 00:12:34 +0530 Subject: [PATCH 0071/1182] Using jekyll-sass-converter 2.0 is a major change --- History.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index 885eb807617..ca40aba78a5 100644 --- a/History.markdown +++ b/History.markdown @@ -26,6 +26,7 @@ * Remove Jekyll::Utils#strip_heredoc in favor of a Ruby > 2.3 built in (#7584) * Incorporate `relative_url` within `post_url` tag (#7589) * Remove patch to modify config for kramdown (#7699) + * Use jekyll-sass-converter-2.0 by default (#7778) ### Bug Fixes @@ -175,7 +176,6 @@ * Reduce allocations by using #each_with_object (#7758) * Memoize fallback_data for Drop (#7728) * Use String#end_with? to check if entry is a backup (#7701) - * Use jekyll-sass-converter-2.0 by default (#7778) ### Documentation From 26914126c77712637d3e7a53ce52b841e9afe229 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Wed, 14 Aug 2019 21:18:32 +0200 Subject: [PATCH 0072/1182] Cleanup History --- History.markdown | 198 +++++++++++++++++++---------------------------- 1 file changed, 81 insertions(+), 117 deletions(-) diff --git a/History.markdown b/History.markdown index ca40aba78a5..23a3805b17a 100644 --- a/History.markdown +++ b/History.markdown @@ -11,6 +11,7 @@ * Drop support for `jekyll-watch-1.4.0` and older (#7287) * Incorporate `relative_url` filter in `link` tag (#6727) * Upgrade kramdown dependency to v2.x (#7492) + * Upgrade jekyll-sass-converter to v2.x - Sassc + sourcemaps (#7778) * Upgrade i18n to v1.x (#6931) * Add `Jekyll::Cache` class to handle caching on disk (#7169) * Cache converted markdown (#7159) @@ -26,7 +27,6 @@ * Remove Jekyll::Utils#strip_heredoc in favor of a Ruby > 2.3 built in (#7584) * Incorporate `relative_url` within `post_url` tag (#7589) * Remove patch to modify config for kramdown (#7699) - * Use jekyll-sass-converter-2.0 by default (#7778) ### Bug Fixes @@ -71,9 +71,12 @@ ### Minor Enhancements * Enhance `--blank` scaffolding (#7310) + * Use `jekyll-compose` if installed (#6932) + * Disable Liquid via front matter (#6824) + * Configure cache_dir (#7232) + * ISO week date drops (#5981) * Fix custom 404 page for GitHub pages (#7132) * Load config file from within current theme-gem (#7304) - * Use `jekyll-compose` if installed (#6932) * Suggest re-running command with `--trace` on fail (#6551) * Support for binary operators in where_exp filter (#6998) * Automatically load `_config.toml` (#7299) @@ -85,7 +88,6 @@ * Cache globbed paths in front matter defaults (#7345) * Cache computed item property (#7301) * Cleanup Markdown converter (#7519) - * Disable Liquid via front matter (#6824) * Do not process Liquid in post excerpt when disabled in front matter (#7146) * Liquefied link tag (#6269) * Update item_property to return numbers as numbers instead of strings (#6608) @@ -98,10 +100,8 @@ * Add a custom inspect string for StaticFile objects (#7422) * Remind user to include gem in the Gemfile on error (#7476) * Search Front matter defaults for Page objects with relative_path (#7261) - * Configure cache_dir (#7232) * Lock use of `tzinfo` gem to v1.x (#7521, #7562) * Utilize absolute paths of user-provided file paths (#7450) - * ISO week date drops (#5981) * Detect `nil` and empty values in objects with `where` filter (#7580) * Initialize mutations for Drops only if necessary (#7657) * Reduce Array allocations via Jekyll::Cleaner (#7659) @@ -117,209 +117,173 @@ ### Development Fixes + * Upgrade liquid-c to v4.0 (#7375) + * Bump RuboCop to v0.71.0 (#7687) + * Target Ruby 2.4 syntax (#7583) + * Fix: RuboCop offenses (#7769) * Use communicative method parameters (#7566) * Scan `assert_equal` methods and rectify any offenses with a custom RuboCop cop (#7130) - * Add a script to profile docs with CI (#7540) - * Test with Ruby 2.6 on AppVeyor (#7518) + * CI: Test with Ruby 2.6 (#7438) + * CI: Test with Ruby 2.6 on AppVeyor (#7518) + * CI: Update RuboCop config (#7050) + * CI: Add a script to profile docs (#7540) + * CI(Appveyor): shallow clone with 5 last commits (#7312) + * CI: Test with oldest and latest Ruby only (#7412) + * CI: Update excludes for CodeClimate Analyses (#7365) + * CI: Lock Travis to Bundler-1.16.2 (#7144) + * CI: Bump tested version of JRuby to 9.2.7.0 (#7612) + * CI: Do not install docs on updating gems on Travis (#7706) * Update gemspec (#7425) - * Upgrade liquid-c to v4.0 (#7375) - * Bump RuboCop to v0.63.x (#7489) - * Bump RuboCop to v0.62.x (#7449) - * Bump RuboCop to v0.61.x (#7401) - * Bump RuboCop to v0.60.x (#7338) - * Bump RuboCop to v0.59.0 (#7237) - * Bump RuboCop to v0.57.x (#7078) - * Relax version constraint on classifier-reborn gem (#7471) - * Test with Ruby v2.6 (#7438) + * deps: relax version constraint on classifier-reborn gem (#7471) + * deps: update yajl-ruby (#7278) + * deps: bump yajl-ruby to v1.4.0 (#6976) * Create symlink only if target is accessible (#7429) - * Test with oldest and latest Ruby only (#7412) * Switch to `:install_if` for wdm gem (#7372) - * Update excludes for CodeClimate Analyses (#7365) - * CI(Appveyor): shallow clone with 5 last commits (#7312) - * update yajl-ruby (#7278) * Add cucumber feature to test include_relative tag (#7213) * Small benchmark refactoring (#7211) - * Lock Travis to Bundler-1.16.2 (#7144) * Fix incorrectly passed arguments to assert_equal (#7134) * fix up refute_equal call (#7133) * Fix RuboCop offences in test files (#7128) * Use assert_include (#7093) * Remember to release docs gem (#7066) - * Update RuboCop's config (#7050) * Useless privates removed (#6768) * Load Rouge for TestKramdown (#7007) - * yajl-ruby update to v1.4.0 (#6976) * Update instructions for releasing docs Gem (#6975) * We are not using Ruby 2.2 anymore (#6977) * Remove unnecessary Jekyll::Page constant (#6770) * Remove unused error class (#6511) * Add a Cucumber feature for post_url tag (#7586) - * Bump tested version of JRuby to 9.2.7.0 (#7612) * Generate a "TOTAL" row for build-profile table (#7614) - * Target Ruby 2.4 syntax in RuboCop scans (#7583) - * Bump RuboCop to v0.68.x (#7637) * Refactor Jekyll::Cache (#7532) * Store list of expected extnames in a constant (#7638) - * Bump RuboCop to v0.69.x (#7656) * Profile allocations from a build session (#7646) * Update small typo in contributing.md (#7671) - * Bump RuboCop to v0.70.x (#7678) * Remove override to Jekyll::Document#respond_to? (#7695) - * Do not install docs on updating gems on Travis (#7706) * Update TestTags in sync with Rouge v3.4 (#7709) - * Bump RuboCop to v0.71.0 (#7687) * Use regexp to filter special entries (#7702) * Reduce Array objects generated from utility method (#7749) * Update mime.types (#7756) * Replace redundant Array#map with Array#each (#7761) - * Fix: rubocop offenses (#7769) * Reduce allocations by using #each_with_object (#7758) * Memoize fallback_data for Drop (#7728) * Use String#end_with? to check if entry is a backup (#7701) ### Documentation - * Add Installation Instructions for Ubuntu (#6925) - * add liquid tag jekyll-flickr (#6946) - * Updated copy - fixed casing of SaaS on resources page. (#6949) + * Refactor docs (#7205) + * Add a link to Giraffe Academy's tutorial (#7325) * Do not advise users to install Jekyll outside of Bundler (#6927) + * Remove documentation for using Redcarpet (#6990) + * Install Docs that Work on MacOS 10.14 (#7561) + * Add Installation Instructions for Ubuntu (#6925) * Don't prompt for sudo when installing with Ubuntu WSL (#6781) - * Fix typo (#6969) + * Installation instructions for Fedora (#7198) + * Update Windows install docs (#6926) + * List all standard liquid filters (#7333) + * List all static files variables (#7002) + * Improve how to include Rouge stylesheets (#7752) + * Mention CommonMark plugins (#7418) + * Add TSV to list of supported _data files. (#7168) + * How to deploy using pre-push git hook (#7179) + * Hosting with AWS Amplify (#7510) + * CircleCI deployment through CircleCI v2 (#7024) + * GitHub Pages: use themes from other repos (#7112) + * Document page.dir and page.name (#7373) + * Document custom tag blocks (#7359) + * Document converter methods (#7289) + * Document `{{ page.collection }}` (#7430) + * Document Jekyll Filters with YAML data (#7335) + * Document where Jekyll looks for layouts in a site (#7564) + * plugin: liquid tag jekyll-flickr (#6946) + * plugin: jekyll-target-blank (#7046) + * plugin: json-get. (#7086) + * plugin: `jekyll-info` (#7091) + * plugin: jekyll-xml-source (#7114) + * plugin: jekyll-firstimage filter (#7127) + * plugin: CAT (#7011) + * Resources: Statictastic (#7593) + * Resources: Bonsai Search (#7543) + * Resources: Formspark (#7601) + * Resources: Jekpack(#7598) + * Resources: formX (#7536) + * Resources: 99inbound's Jekyll post (#7348) + * Resources: CloudSh (#7497) + * Community: DEV Community's Jekyll tag (#7139) + * Showcase: developer.spotify.com (#7217) + * Showcase: Isomer (#7300) * Add version number for group_by_exp doc (#6956) - * Update Windows install docs (#6926) - * Remove documentation for using Redcarpet (#6990) * Updated nginx configuration for custom-404-page documentation (#6994) - * List all static files variables (#7002) - * Document that _drafts need to be contained within the custom collection directory (#6985) - * Change for passive voice. (#7005) - * Added the CAT plugin to the plugin list (#7011) - * Updated to supported version (#7031) * Clarify definition of 'draft' (#7037) - * Listed the jekyll-target-blank plugin in plugins list. (#7046) - * Typo (#7058) + * _drafts need to be contained within the custom collection directory (#6985) + * Updated to supported version (#7031) * Add Hints for some Improved Travis Config in Doc (#7049) - * Added plugin json-get. (#7086) * Update travis-ci.md to point out "this is an example Gemfile" (#7089) - * Adding `jekyll-info` plugin (#7091) - * GitHub enables you to use themes from other repos (#7112) - * Updates to CODE OF CONDUCT (v1.4.0) (#7105) * Instructions to view theme’s files under Linux (#7095) - * Add jekyll-xml-source (#7114) - * Add the jekyll-firstimage filter plugin (#7127) * Use a real theme in the example (#7125) * Update docs about post creation (#7138) - * Add DEV Community's Jekyll tag to community page (#7139) * Initialize upgrading doc for v4.0 (#7140) * Add version badge for date filters with ordinal (#7162) - * Add closing tags for <a> (#7163) - * Add TSV to list of supported _data files. (#7168) * Corrected sample usage of postfiles (#7181) - * Add missing html end tag for code example in section 'For loops' (#7199) * Resolve "Unable to locate package ruby2.4" error (#7196) - * Installation instructions for Fedora (#7198) - * New docs (#7205) - * List all standard liquid filters (#7333) * Correct stylesheet url in tutorial step 7 (#7210) - * Add some minor improvements to image loading in Showcase page (#7214) - * Fix minor grammatical error (#7215) - * Add developer.spotify.com to the Jekyll Showcase (#7217) * Removes quotes from markdown for assets (#7223) * Clarified front matter requirement (#7234) - * Minor whitespace fixes (#7238) * Explicit location of where to create blog.html (#7241) - * Fix a small grammar error/typo in the docs (#7260) * Reference the build command options that allows multiple config files (#7266) - * Update 10-deployment.md (#7268) * Add more issue template(s) and pull request template (#7269) * Suggest sites use OpenSSL instead of GnuTLS for their site's CI (#7010) * Fix broken Contributors link in README.markdown (#7200) * Add title tag to item in RSS template (#7282) - * More inclusive writing (#7283) - * Document converter methods (#7289) * Add link tag to item in RSS template (#7291) - * Add Isomer to showcase (#7300) - * Added missing semicolon (#7306) - * "This restricts you..." to "This restricts your" (#7307) - * Add a link to Giraffe Academy's tutorial (#7325) - * Grammar correction (#7327) - * Document Jekyll Filters with YAML data (#7335) * Remove redundant instruction comment (#7342) - * Minimize rendering count (#7343) - * Update posts.md (#7360) - * Add info how to deploy using pre-push git hook (#7179) * Textile is only supported through a converter plugin (#7003) - * Add documentation for custom tag blocks (#7359) - * Added 99inbound's Jekyll post to form resources (#7348) - * Document page.dir and page.name (#7373) + * Add recursive navigation tutorial (#7720) * Remove installation instructions with Homebrew (#7381) * Fix dead link and misleading prose (#7383) * Fix content management section (#7385) - * Proposed re-wording of Sass note. :) (#7392) * Apply ruby official guide documents (#7393) * Fix group_by_exp filter example (#7394) - * Adjust team page listings (#7395) - * Update resources.md (#7396) - * Update resources.md (#7397) * Remove alt attribute from a tags (#7407) - * Fix grammatical error in permalinks.md (#7409) * Fix BASH code-block in ubuntu.md (#7420) * zlib is missing (#7428) - * Include docs for `{{ page.collection }}` (#7430) - * Permalink docs typo fixes (#7459) * Fixed unnecessary aticles and pronouns (#7466) - * Grammatical correction (#7464) - * Update resources.md (#7472) * Store SSL key and cert in site source (#7473) - * Minor doc fixes (#7495) - * Changed order of steps (#7503) - * Hosting with AWS Amplify (#7510) * Fix typo in tutorial for converting existing site (#7524) - * Add CloudSh to resource page. (#7497) * Check if var exists before include tag (#7530) - * Added formX to form-backend resources (#7536) * Clarify docs on collections regarding the need for front matter (#7538) * Fix incorrect Windows path in themes.md (#7525) - * Document where Jekyll looks for layouts in a site (#7564) - * Mention CommonMark plugins (#7418) * Addresses bundle not found. (#7351) - * Example of CircleCI deployment through CircleCI v2 (#7024) - * v4.0 development post (#6934) - * Release post for v3.8.0 (#6849) - * Release Post for v3.6.3, v3.7.4 and v3.8.4 (#7259) - * Adds Statictastic to the list of resources (#7593) - * Update 07-assets.md (#7599) - * Fix link space (#7600) - * Added Formspark to form resources (#7601) - * Simplify couple of includes in the docs site (#7607) - * Avoid generating empty classnames (#7610) - * Install Docs that Work on MacOS 10.14 (#7561) * Update the contribution docs for draft pull requests (#7619) - * Doc: Data file section adds TSV (#7640) + * Data file section adds TSV (#7640) * Indicate where the _sass folder is by default (#7644) * Docs: add version tags to new placeholders (#5981) for permalinks (#7647) * Solve "GitHub Page build failure" in 10-deployment.md (#7648) - * Fix typo from 'Github' to 'GitHub' (#7691) * fix link to Site Source config (#7708) - * Add Jekpack to resources page (#7598) * Introduce frontmatter in step 2 (#7704) - * Add recursive navigation tutorial (#7720) - * Fix misspelling of "additional" (#7764) - * docs: improve how to include rouge stylesheets (#7752) - * Added Bonsai Search (#7543) - -### Site Enhancements - * Add @ashmaroli to Core Team listing (#7398) * Lnk to Tidelift in site's footer (#7377) * Link to OpenCollective backing (#7378 * Link to sponsor listing in README (#7405) + * Adjust team page listings (#7395) + * Updates to CODE OF CONDUCT (v1.4.0) (#7105) + * More inclusive writing (#7283) + +### Site Enhancements + * Better Performance (#7388) + * Add some minor improvements to image loading in Showcase page (#7214) * Simplify assigning classname to docs' aside-links (#7609) + * Simplify couple of includes in the docs site (#7607) + * Avoid generating empty classnames (#7610) + * Minimize rendering count (#7343) -### release +### Release - * Release v4.0.0.pre.alpha1 (#7574) - * Prepare Jekyll 4.0.0 beta1 (#7716) + * Release post for v4.0.0 beta1 (#7716) + * Release post for v4.0.0.pre.alpha1 (#7574) + * Release post for v3.8.0 (#6849) + * Release post for v3.6.3, v3.7.4 and v3.8.4 (#7259) + * Post: v4.0 development (#6934) ## 3.8.6 / 2019-07-02 From 759315bfa394191d961e6363b4b527af6cb942c9 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sat, 17 Aug 2019 14:02:14 +0200 Subject: [PATCH 0073/1182] Upgrade documentation for Jekyll v4.0 --- .travis.yml | 4 +-- docs/_config.yml | 3 +- docs/_data/ruby.yml | 3 ++ docs/_docs/collections.md | 3 -- docs/_docs/front-matter.md | 6 ++-- docs/_docs/installation.md | 2 +- docs/_docs/installation/macos.md | 14 ++++----- docs/_docs/liquid/filters.md | 2 +- docs/_docs/liquid/tags.md | 40 ++++++++++-------------- docs/_docs/permalinks.md | 14 ++++----- docs/_docs/ruby-101.md | 8 ++--- docs/_docs/themes.md | 28 +++++++---------- docs/_docs/upgrading/3-to-4.md | 6 ++-- docs/_docs/usage.md | 4 +-- docs/_includes/news_contents_mobile.html | 2 +- docs/latest_version.txt | 2 +- jekyll.gemspec | 3 +- lib/jekyll/commands/new.rb | 4 +-- 18 files changed, 68 insertions(+), 80 deletions(-) create mode 100644 docs/_data/ruby.yml diff --git a/.travis.yml b/.travis.yml index 177239f77cb..6e84755212b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ cache: bundler language: ruby rvm: - - &ruby1 2.6.0 - - &ruby2 2.4.5 + - &ruby1 2.6.3 + - &ruby2 2.4.6 - &jruby jruby-9.2.7.0 matrix: diff --git a/docs/_config.yml b/docs/_config.yml index 0c7a2b1b6d7..e7aebd56fb3 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,6 +1,5 @@ --- version: 3.8.6 -min_ruby_version: 2.4.0 name: Jekyll • Simple, blog-aware, static sites description: Transform your plain text into static websites and blogs url: https://jekyllrb.com @@ -54,6 +53,8 @@ feed: sass: style: compressed +strict_front_matter: true + exclude: - .gitignore - .jekyll-cache diff --git a/docs/_data/ruby.yml b/docs/_data/ruby.yml new file mode 100644 index 00000000000..be3cdb28a14 --- /dev/null +++ b/docs/_data/ruby.yml @@ -0,0 +1,3 @@ +min_version: 2.4.0 +current_version: 2.6.3 +current_version_output: ruby 2.6.3p62 (2019-04-16 revision 67580) diff --git a/docs/_docs/collections.md b/docs/_docs/collections.md index f951564ea5f..e2e6ac6883f 100644 --- a/docs/_docs/collections.md +++ b/docs/_docs/collections.md @@ -114,8 +114,6 @@ You can link to the generated page using the `url` attribute: There are special [permalink variables for collections](/docs/permalinks/) to help you control the output url for the entire collection. -{% if site.version == '4.0.0' %}{% comment %} Remove this encapsulation when v4.0 ships {% endcomment %} - ## Custom Sorting of Documents By default, documents in a collection are sorted by their paths. But you can control this sorting via the collection's metadata. @@ -164,7 +162,6 @@ collections: ``` If both metadata keys have been defined properly, `order` list takes precedence. -{% endif %} ## Liquid Attributes diff --git a/docs/_docs/front-matter.md b/docs/_docs/front-matter.md index 084235133f7..a3deb697193 100644 --- a/docs/_docs/front-matter.md +++ b/docs/_docs/front-matter.md @@ -33,7 +33,7 @@ relies on.
-
ProTip™: Front Matter Variables Are Optional
+
Front Matter Variables Are Optional

If you want to use Liquid tags and variables but don’t need anything in your front matter, just leave it empty! The set @@ -114,7 +114,7 @@ front matter of a page or post.

-
ProTip™: Render Posts Marked As Unpublished
+
Render Posts Marked As Unpublished

To preview unpublished pages, run `jekyll serve` or `jekyll build` with the `--unpublished` switch. Jekyll also has a handy drafts @@ -201,7 +201,7 @@ These are available out-of-the-box to be used in the front matter for a post.

-
ProTip™: Don't repeat yourself
+
Don't repeat yourself

If you don't want to repeat your frequently used front matter variables over and over, define defaults diff --git a/docs/_docs/installation.md b/docs/_docs/installation.md index e40cebd7f7b..22c60276a2a 100644 --- a/docs/_docs/installation.md +++ b/docs/_docs/installation.md @@ -8,7 +8,7 @@ Jekyll is a [Ruby Gem](/docs/ruby-101/#gems) that can be installed on most syste ## Requirements -* [Ruby](https://www.ruby-lang.org/en/downloads/) version {{ site.min_ruby_version }} or above, including all development headers (ruby version can be checked by running `ruby -v`) +* [Ruby](https://www.ruby-lang.org/en/downloads/) version **{{ site.data.ruby.min_version }}** or above, including all development headers (ruby version can be checked by running `ruby -v`) * [RubyGems](https://rubygems.org/pages/download) (which you can check by running `gem -v`) * [GCC](https://gcc.gnu.org/install/) and [Make](https://www.gnu.org/software/make/) (in case your system doesn't have them installed, which you can check by running `gcc -v`,`g++ -v` and `make -v` in your system's command line interface) diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 1a9970917ce..56b1b2ffda1 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -12,7 +12,7 @@ xcode-select --install ## Install Ruby -Jekyll requires Ruby > {{ site.min_ruby_version }}. +Jekyll requires **Ruby > {{ site.data.ruby.min_version }}**. As macOS Mojave 10.14 comes only with ruby 2.3.x, you'll have to install a newer version of Ruby. ### With Homebrew {#brew} @@ -25,7 +25,7 @@ To run the latest Ruby version you need to install it through [Homebrew](https:/ brew install ruby ``` -Don't forget to add the brew ruby path to your shell config : +Add the brew ruby path to your shell config : ``` export PATH=/usr/local/opt/ruby/bin:$PATH @@ -38,7 +38,7 @@ which ruby # /usr/local/opt/ruby/bin/ruby ruby -v -# ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18] +{{ site.data.ruby.current_version_output }} ``` Yay, we are now running current stable Ruby! @@ -66,10 +66,10 @@ Restart your terminal for changes to take effect. Now you can install the Ruby version of our choice, let's go with current latest stable Ruby: ```sh -rbenv install 2.6.2 -rbenv global 2.6.2 +rbenv install {{ site.data.ruby.current_version }} +rbenv global {{ site.data.ruby.current_version }} ruby -v -# ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18] +{{ site.data.ruby.current_version_output }} ``` That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#command-reference) to learn how to use different versions of Ruby in your projects. @@ -88,7 +88,7 @@ and then get your Ruby version using ```sh ruby -v -# ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin18] +{{ site.data.ruby.current_version_output }} ``` Then append your path file with the following, replacing the `X.X` with the first two digits of your Ruby version. diff --git a/docs/_docs/liquid/filters.md b/docs/_docs/liquid/filters.md index bd33c07c2d7..fafcd250313 100644 --- a/docs/_docs/liquid/filters.md +++ b/docs/_docs/liquid/filters.md @@ -104,7 +104,7 @@ The default is `default`. They are as follows (with what they filter): - `ascii`: spaces, non-alphanumeric, and non-ASCII characters - `latin`: like `default`, except Latin characters are first transliterated (e.g. `àèïòü` to `aeiou`) {%- include docs_version_badge.html version="3.7.0" -%}. -### Detecting `nil` values with `where` filter {%- include docs_version_badge.html version="4.0.0" -%} +### Detecting `nil` values with `where` filter {%- include docs_version_badge.html version="4.0" -%} You can use the `where` filter to detect documents and pages with properties that are `nil` or `""`. For example, diff --git a/docs/_docs/liquid/tags.md b/docs/_docs/liquid/tags.md index d5ee9d6373f..cc181593422 100644 --- a/docs/_docs/liquid/tags.md +++ b/docs/_docs/liquid/tags.md @@ -16,19 +16,12 @@ If you have page snippets that you use repeatedly across your site, an Jekyll has built in support for syntax highlighting of over 100 languages thanks to [Rouge](http://rouge.jneen.net). Rouge is the default highlighter -in Jekyll 3 and above. To use it in Jekyll 2, set `highlighter` to `rouge` -and ensure the `rouge` gem is installed properly. - -Alternatively, you can use [Pygments](http://pygments.org) to highlight your -code snippets in Jekyll 3.x and below. To use Pygments, you must have Python -installed on your system, have the `pygments.rb` gem installed and set -`highlighter` to `pygments` in your site's configuration file. Pygments -supports [over 100 languages](http://pygments.org/languages/) - -

-

Using Pygments has been deprecated and will not be officially supported in - Jekyll 4, meaning that the configuration setting highlighter: pygments - will automatically fall back to using Rouge which is written in Ruby +in Jekyll 3 and above. + +

+

Using Pygments has been deprecated and is not supported in + Jekyll 4, the configuration setting highlighter: pygments + now automatically falls back to using Rouge which is written in Ruby and 100% compatible with stylesheets for Pygments.

@@ -47,14 +40,14 @@ end The argument to the `highlight` tag (`ruby` in the example above) is the language identifier. To find the appropriate identifier to use for the language you want to highlight, look for the “short name” on the [Rouge -wiki](https://github.com/jayferd/rouge/wiki/List-of-supported-languages-and-lexers) -or the [Pygments' Lexers page](http://pygments.org/docs/lexers/). +wiki](https://github.com/jayferd/rouge/wiki/List-of-supported-languages-and-lexers). -
+
Jekyll processes all Liquid filters in code blocks

If you are using a language that contains curly braces, you will likely need to place {% raw %} and - {% endraw %} tags around your code.

+ {% endraw %} tags around your code. + Since {% include docs_version_badge.html version="4.0" %} you can add render_with_liquid: false in your front matter to disable Liquid entirely for a particular document.

### Line numbers @@ -89,9 +82,11 @@ the syntax highlighter styles into your `main.css`: @import "native.css"; ``` - ## Links +{: .note } +Since Jekyll {% include docs_version_badge.html version="v4.0"%} you don't need to prepend `link` and `post_url` tags with `site.baseurl` + ### Linking to pages {#link} To link to a post, a page, collection item, or file, the `link` tag will generate the correct permalink URL for the path you specify. For example, if you use the `link` tag to link to `mypage.html`, even if you change your permalink style to include the file extension or omit it, the URL formed by the `link` tag will always be valid. @@ -118,9 +113,6 @@ You can also use the `link` tag to create a link in Markdown as follows: ``` {% endraw %} -{: .note } -Since {% include docs_version_badge.html version="v4.0"%} you don't need to prepend `link` tags with `site.baseurl` - The path to the post, page, or collection is defined as the path relative to the root directory (where your config file is) to the file, not the path from your existing page to the other page. For example, suppose you're creating a link in `page_a.md` (stored in `pages/folder1/folder2`) to `page_b.md` (stored in `pages/folder1`). Your path in the link would not be `../page_b.html`. Instead, it would be `/pages/folder1/page_b.md`. @@ -137,7 +129,7 @@ If you want to include a link to a post on your site, the `post_url` tag will ge {% raw %} ```liquid -{{ site.baseurl }}{% post_url 2010-07-21-name-of-post %} +{% post_url 2010-07-21-name-of-post %} ``` {% endraw %} @@ -145,7 +137,7 @@ If you organize your posts in subdirectories, you need to include subdirectory p {% raw %} ```liquid -{{ site.baseurl }}{% post_url /subdir/2010-07-21-name-of-post %} +{% post_url /subdir/2010-07-21-name-of-post %} ``` {% endraw %} @@ -155,6 +147,6 @@ You can also use this tag to create a link to a post in Markdown as follows: {% raw %} ```liquid -[Name of Link]({{ site.baseurl }}{% post_url 2010-07-21-name-of-post %}) +[Name of Link]({% post_url 2010-07-21-name-of-post %}) ``` {% endraw %} diff --git a/docs/_docs/permalinks.md b/docs/_docs/permalinks.md index 13697c55d82..ccf3ede2b85 100644 --- a/docs/_docs/permalinks.md +++ b/docs/_docs/permalinks.md @@ -110,7 +110,7 @@ Here's the full list of placeholders available:

long_month

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

Full month name, e.g. “January”.

@@ -149,7 +149,7 @@ Here's the full list of placeholders available:

w_year

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

Week year which may differ from the month year for up to three days at the start of January and end of December

@@ -158,7 +158,7 @@ Here's the full list of placeholders available:

week

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

Week number of the current year, starting with the first week having a majority of its days in January. (01..53)

@@ -167,7 +167,7 @@ Here's the full list of placeholders available:

w_day

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

Day of the week, starting with Monday. (1..7)

@@ -176,7 +176,7 @@ Here's the full list of placeholders available:

short_day

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

Three-letter weekday abbreviation, e.g. “Sun”.

@@ -185,7 +185,7 @@ Here's the full list of placeholders available:

long_day

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

Weekday name, e.g. “Sunday”.

@@ -302,7 +302,7 @@ For posts, Jekyll also provides the following built-in styles for convenience:

weekdate

- {% include docs_version_badge.html version="4.0.0" %} + {% include docs_version_badge.html version="4.0" %}

/:categories/:year/W:week/:short_day/:title:output_ext

diff --git a/docs/_docs/ruby-101.md b/docs/_docs/ruby-101.md index f3ec778b043..0b6f32c4cc9 100644 --- a/docs/_docs/ruby-101.md +++ b/docs/_docs/ruby-101.md @@ -24,13 +24,13 @@ A gem is code you can include in Ruby projects. It allows you to package up func A `Gemfile` is a list of gems required for your site. For a simple Jekyll site it might look something like this: ```ruby -source 'https://rubygems.org' +source "https://rubygems.org" -gem 'jekyll' +gem "jekyll" group :jekyll_plugins do - gem 'jekyll-feed' - gem 'jekyll-seo-tag' + gem "jekyll-feed" + gem "jekyll-seo-tag" end ``` diff --git a/docs/_docs/themes.md b/docs/_docs/themes.md index cb7563344b5..0a09e84898a 100644 --- a/docs/_docs/themes.md +++ b/docs/_docs/themes.md @@ -43,7 +43,7 @@ To locate a theme's files on your computer: 1. Run `bundle show` followed by the name of the theme's gem, e.g., `bundle show minima` for Jekyll's default theme. - This returns the location of the gem-based theme files. For example, the Minima theme's files might be located in `/usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0` on macOS. + This returns the location of the gem-based theme files. For example, the Minima theme's files might be located in `/usr/local/lib/ruby/gems/2.6.0/gems/minima-2.5.1` on macOS. 2. Open the theme's directory in Finder or Explorer: @@ -55,10 +55,10 @@ To locate a theme's files on your computer: # First get the gem's installation path: # # bundle show minima - # => C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/minima-2.1.0 + # => C:/Ruby26-x64/lib/ruby/gems/{{ site.data.ruby.current_version }}/gems/minima-2.5.1 # # then invoke explorer with above path, substituting `/` with `\` - explorer C:\Ruby24-x64\lib\ruby\gems\2.4.0\gems\minima-2.1.0 + explorer C:\Ruby26-x64\lib\ruby\gems\{{ site.data.ruby.current_version}}\gems\minima-2.5.1 # On Linux xdg-open $(bundle show minima) @@ -121,8 +121,8 @@ To do this, copy the files from the theme gem's directory into your Jekyll site Then you must tell Jekyll about the plugins that were referenced by the theme. You can find these plugins in the theme's gemspec file as runtime dependencies. If you were converting the Minima theme, for example, you might see: ``` -spec.add_runtime_dependency "jekyll-feed", "~> 0.9" -spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1" +spec.add_runtime_dependency "jekyll-feed", "~> 0.12" +spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.6" ``` You should include these references in the `Gemfile` in one of two ways. @@ -132,8 +132,8 @@ You could list them individually in both `Gemfile` and `_config.yml`. ```ruby # ./Gemfile -gem "jekyll-feed", "~> 0.9" -gem "jekyll-seo-tag", "~> 2.1" +gem "jekyll-feed", "~> 0.12" +gem "jekyll-seo-tag", "~> 2.6" ``` ```yaml @@ -150,8 +150,8 @@ Or you could list them explicitly as Jekyll plugins in your Gemfile, and not upd # ./Gemfile group :jekyll_plugins do - gem "jekyll-feed", "~> 0.9" - gem "jekyll-seo-tag", "~> 2.1" + gem "jekyll-feed", "~> 0.12" + gem "jekyll-seo-tag", "~> 2.6" end ``` @@ -161,7 +161,7 @@ If you're publishing on GitHub Pages you should update only your `_config.yml` a Finally, remove references to the theme gem in `Gemfile` and configuration. For example, to remove `minima`: -- Open `Gemfile` and remove `gem "minima", "~> 2.0"`. +- Open `Gemfile` and remove `gem "minima", "~> 2.5"`. - Open `_config.yml` and remove `theme: minima`. Now `bundle update` will no longer get updates for the theme gem. @@ -187,7 +187,7 @@ To install a gem-based theme: ```diff # ./Gemfile - - gem "minima", "~> 2.0" + - gem "minima", "~> 2.5" + gem "jekyll-theme-minimal" ``` @@ -282,10 +282,7 @@ Jekyll will automatically require all whitelisted `runtime_dependencies` of your With this, the end-user need not keep track of the plugins required to be included in their config file for their theme-gem to work as intended. -{% if site.version == '4.0.0' %} -{% comment %} Remove this encapsulation when `v4.0` ships {% endcomment %} - -### Pre-configuring Theme-gems {%- include docs_version_badge.html version="4.0.0" -%} +### Pre-configuring Theme-gems {%- include docs_version_badge.html version="4.0" -%} Jekyll will read-in a `_config.yml` at the root of the theme-gem and merge its data into the site's existing configuration data. @@ -298,7 +295,6 @@ But unlike other entities loaded from within the theme, loading the config file While this feature is to enable easier adoption of a theme, the restrictions ensure that a theme-config cannot affect the build in a concerning manner. Any plugins required by the theme will have to be listed manually by the user or provided by the theme's `gemspec` file. This feature will let the theme-gem to work with *theme-specific config variables* out-of-the-box. -{% endif %} ### Documenting your theme diff --git a/docs/_docs/upgrading/3-to-4.md b/docs/_docs/upgrading/3-to-4.md index 09a46b99b60..40e73320be0 100644 --- a/docs/_docs/upgrading/3-to-4.md +++ b/docs/_docs/upgrading/3-to-4.md @@ -5,17 +5,17 @@ permalink: /docs/upgrading/3-to-4/ A few things have changed in Jekyll 4. -Before we dive in, you need to have at least Ruby {{ site.min_ruby_version }} +Before we dive in, you need to have at least Ruby {{ site.data.ruby.min_version }} installed. Run the following in your terminal to check ```sh ruby -v -ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18] +{{ site.data.ruby.current_version_output }} ``` -If you're using a supported Ruby version > {{ site.min_ruby_version }}, go ahead +If you're using a supported Ruby version > {{ site.data.ruby.min_version }}, go ahead and fetch the latest version of Jekyll: ```sh diff --git a/docs/_docs/usage.md b/docs/_docs/usage.md index 76d2bd96ae0..9aac2e4d3d3 100644 --- a/docs/_docs/usage.md +++ b/docs/_docs/usage.md @@ -12,9 +12,9 @@ You can use this command in a number of ways: * `jekyll build` or `jekyll b` - Performs a one off build your site to `./_site` (by default) * `jekyll serve` or `jekyll s` - Builds your site any time a source file changes and serves it locally * `jekyll doctor` - Outputs any deprecation or configuration issues -* `jekyll new-theme` - Creates a new Jekyll theme scaffold -* `jekyll clean` - Removes the generated site and metadata file +* `jekyll clean` - Removes all generated files: destination folder, metadata file, Sass and Jekyll caches. * `jekyll help` - Shows help, optionally for a given subcommand, e.g. `jekyll help build` +* `jekyll new-theme` - Creates a new Jekyll theme scaffold Typically you'll use `jekyll serve` while developing locally and `jekyll build` when you need to generate the site for production. diff --git a/docs/_includes/news_contents_mobile.html b/docs/_includes/news_contents_mobile.html index e8fb55e7228..8f8ba563947 100644 --- a/docs/_includes/news_contents_mobile.html +++ b/docs/_includes/news_contents_mobile.html @@ -2,7 +2,7 @@ - {% for section in site.data.docs_nav %} + {% for section in site.data.docs_nav -%} - {% for item in section.docs %} - {% assign p = site.documents | where: "url", item.link | first %} - - {% endfor %} + {%- for item in section.docs -%} + {% assign p = site.documents | where: "url", item.link | first %} + + {%- endfor %} - {% endfor %} + {% endfor -%}
diff --git a/docs/_includes/docs_variables_table.html b/docs/_includes/docs_variables_table.html index df5e9b17a29..feafa7106c3 100644 --- a/docs/_includes/docs_variables_table.html +++ b/docs/_includes/docs_variables_table.html @@ -7,12 +7,12 @@ - {% for var in include.scope %} + {% for var in include.scope -%}

{{ var.name }}

{{- var.description -}}

- {% endfor %} + {% endfor -%}
diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 418e04d5746..b38a89ec25f 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -9,23 +9,19 @@

diff --git a/docs/_includes/mobile-nav-items.html b/docs/_includes/mobile-nav-items.html index fc8f10ef9b6..6b9b0062a55 100644 --- a/docs/_includes/mobile-nav-items.html +++ b/docs/_includes/mobile-nav-items.html @@ -1,18 +1,14 @@
    - {% for p in site.data.primary_nav %} - {%- if p.show_on_mobile %} + {% for p in site.data.primary_nav -%} + {% if p.show_on_mobile -%}
  • - {{ p.title }} -
  • - {%- endif %} - {% endfor %} -
  • - GitHub -
  • + {%- if page.url == '/' %} class="current" {% endif -%} + {% else -%} + {%- if page.url contains p.link %} class="current" {% endif -%} + {% endif -%} + >{{ p.title }} + {% endif -%} + {% endfor -%} +
  • GitHub
diff --git a/docs/_includes/news_contents.html b/docs/_includes/news_contents.html index 737a2114e55..d717b20dd12 100644 --- a/docs/_includes/news_contents.html +++ b/docs/_includes/news_contents.html @@ -10,24 +10,24 @@

Recent Releases

Other News

    - {% for post in site.posts %} - {% unless post.categories contains 'release' %} -
  • - {{ post.title }} -
  • - {% endunless %} - {% endfor %} + {% for post in site.posts -%} + {% unless post.categories contains 'release' -%} +
  • + {{ post.title }} +
  • + {% endunless -%} + {% endfor -%}
diff --git a/docs/_includes/news_contents_mobile.html b/docs/_includes/news_contents_mobile.html index 8f8ba563947..3f8c18f785e 100644 --- a/docs/_includes/news_contents_mobile.html +++ b/docs/_includes/news_contents_mobile.html @@ -3,9 +3,9 @@ - {% for post in site.posts %} + {% for post in site.posts -%} - {% endfor %} + {% endfor -%} diff --git a/docs/_includes/news_item.html b/docs/_includes/news_item.html index db490c8ed5a..e7a7dbc2def 100644 --- a/docs/_includes/news_item.html +++ b/docs/_includes/news_item.html @@ -1,25 +1,25 @@ diff --git a/docs/_includes/primary-nav-items.html b/docs/_includes/primary-nav-items.html index b27cceb6618..eb30a699693 100644 --- a/docs/_includes/primary-nav-items.html +++ b/docs/_includes/primary-nav-items.html @@ -1,13 +1,11 @@
    - {% for p in site.data.primary_nav %} + {% for p in site.data.primary_nav -%}
  • - {{ p.title }} -
  • - {% endfor %} + {% if page.url == p.link %} class="current" {%- endif -%} + {% else -%} + {% if page.url contains p.link %} class="current" {%- endif -%} + {% endif -%} + >{{ p.title }} + {% endfor -%}
diff --git a/docs/_includes/section_nav_tutorials.html b/docs/_includes/section_nav_tutorials.html index 30812bbafe4..8d665f5139b 100644 --- a/docs/_includes/section_nav_tutorials.html +++ b/docs/_includes/section_nav_tutorials.html @@ -1,39 +1,39 @@ -{% comment %} +{%- comment -%} Map grabs the tutorials sections, giving us an array of arrays. Join, flattens all the items to a comma delimited string. Split turns it into an array again. -{% endcomment %} -{% assign tutorials = site.data.tutorials | map: 'tutorials' | join: ',' | split: ',' %} +{%- endcomment -%} +{%- assign tutorials = site.data.tutorials | map: 'tutorials' | join: ',' | split: ',' -%} -{% comment %} +{%- comment -%} Because this is built for every page, lets find where we are in the ordered document list by comparing url strings. Then if there's something previous or next, lets build a link to it. -{% endcomment %} +{%- endcomment -%} -{% for tutorial in tutorials %} - {% assign tutorial_url = tutorial | prepend:"/tutorials/" | append:"/" %} - {% if tutorial_url == page.url %} -
-
- {% if forloop.first %} - Back - {% else %} - {% assign previous = forloop.index0 | minus: 1 %} - {% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" %} - - {% endif %} -
-
- {% if forloop.last %} - Next - {% else %} - {% assign next = forloop.index0 | plus: 1 %} - {% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" %} - - {% endif %} -
+{% for tutorial in tutorials -%} + {% assign tutorial_url = tutorial | prepend:"/tutorials/" | append:"/" -%} + {% if tutorial_url == page.url -%} +
+
+ {% if forloop.first -%} + Back + {% else -%} + {% assign previous = forloop.index0 | minus: 1 -%} + {% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" -%} + + {% endif -%}
-
- {% break %} - {% endif %} -{% endfor %} \ No newline at end of file +
+ {% if forloop.last -%} + Next + {% else -%} + {% assign next = forloop.index0 | plus: 1 -%} + {% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" -%} + + {% endif -%} +
+
+
+ {% break -%} + {% endif -%} +{% endfor -%} diff --git a/docs/_includes/step-index.html b/docs/_includes/step-index.html index eb03b551e93..798fb7c5531 100644 --- a/docs/_includes/step-index.html +++ b/docs/_includes/step-index.html @@ -1,65 +1,34 @@ -{% assign docs = site.docs | where_exp: "doc", "doc.url contains '/step-by-step/'" %} +{% assign docs = site.docs | where_exp: "doc", "doc.url contains '/step-by-step/'" -%} -{% for tutorial in tutorials %} - {% assign tutorial_url = tutorial | prepend:"/tutorials/" | append:"/" %} - {% if tutorial_url == page.url %} +{% for doc in docs -%} + {% if doc.url == page.url -%}
- {% if forloop.first %} - Back - {% else %} - {% assign previous = forloop.index0 | minus: 1 %} - {% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" %} - - {% endif %} + {% if forloop.first -%} + Back + {% else -%} + {% assign previous = forloop.index0 | minus: 1 -%} + + {% endif -%}
- {% if forloop.last %} - Next - {% else %} - {% assign next = forloop.index0 | plus: 1 %} - {% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" %} - - {% endif %} + {% if forloop.last -%} + Next + {% else -%} + {% assign next = forloop.index0 | plus: 1 -%} + + {% endif -%}
- {% break %} - {% endif %} -{% endfor %} - - -{% for doc in docs %} - {% if doc.url == page.url %} -
-
- {% if forloop.first %} - Back - {% else %} - {% assign previous = forloop.index0 | minus: 1 %} - - {% endif %} -
-
- {% if forloop.last %} - Next - {% else %} - {% assign next = forloop.index0 | plus: 1 %} - - {% endif %} -
-
-
- {% break %} - {% endif %} -{% endfor %} + {% break -%} + {% endif -%} +{% endfor -%}
    - {% for step in docs %} -
  1. - - {{ step.title }} - -
  2. - {% endfor %} + {% for step in docs -%} +
  3. + {{- step.title -}} +
  4. + {% endfor -%}
diff --git a/docs/_includes/tutorials_contents.html b/docs/_includes/tutorials_contents.html index 5c9cdc8ee7f..75fe9fc5063 100644 --- a/docs/_includes/tutorials_contents.html +++ b/docs/_includes/tutorials_contents.html @@ -1,10 +1,16 @@
diff --git a/docs/_includes/tutorials_contents_mobile.html b/docs/_includes/tutorials_contents_mobile.html index 901fdf5c435..217bc326752 100644 --- a/docs/_includes/tutorials_contents_mobile.html +++ b/docs/_includes/tutorials_contents_mobile.html @@ -1,10 +1,14 @@
diff --git a/docs/_includes/tutorials_option.html b/docs/_includes/tutorials_option.html deleted file mode 100644 index 482c2143337..00000000000 --- a/docs/_includes/tutorials_option.html +++ /dev/null @@ -1,5 +0,0 @@ -{% for item in include.items %} - {% assign item_url = item | prepend:"/tutorials/" | append:"/" %} - {% assign tutorial = site.tutorials | where: "url", item_url | first %} - -{% endfor %} diff --git a/docs/_includes/tutorials_ul.html b/docs/_includes/tutorials_ul.html deleted file mode 100644 index a2b613262cd..00000000000 --- a/docs/_includes/tutorials_ul.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -{% for item in include.items %} - {% assign item_url = item | prepend:"/tutorials/" | append:"/" %} - {% assign p = site.tutorials | where:"url", item_url | first %} -
  • {{ p.title }}
  • -{% endfor %} -
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 8e9574adc63..9234c13c754 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -1,13 +1,13 @@ -{% include top.html %} +{%- include top.html -%} - {% include header.html %} + {%- include header.html -%} - {{ content }} + {{- content -}} - {% include footer.html %} - {% include anchor_links.html %} - {% include analytics.html %} - {% include search/script.html %} + {%- include footer.html -%} + {%- include anchor_links.html -%} + {%- include analytics.html -%} + {%- include search/script.html -%} diff --git a/docs/_layouts/docs.html b/docs/_layouts/docs.html index ab179e50462..f52e7831cbf 100644 --- a/docs/_layouts/docs.html +++ b/docs/_layouts/docs.html @@ -2,24 +2,20 @@ layout: default --- -
-
- - {% include docs_contents_mobile.html %} - -
- -
- - {% include docs_contents.html %} - -
- +
+
+ {% include docs_contents_mobile.html -%} +
+
-
+ {% include docs_contents.html -%} +
+
+
diff --git a/docs/_layouts/news.html b/docs/_layouts/news.html index 8f7945f345a..7b776bc7446 100644 --- a/docs/_layouts/news.html +++ b/docs/_layouts/news.html @@ -2,18 +2,13 @@ layout: default --- -
-
- - {% include news_contents_mobile.html %} - -
- {{ content }} -
- - {% include news_contents.html %} - -
- +
+
+ {% include news_contents_mobile.html -%} +
+ {{- content -}}
-
+ {% include news_contents.html -%} +
+
+
diff --git a/docs/_layouts/news_item.html b/docs/_layouts/news_item.html index e9fa2aec859..74d5d91b010 100644 --- a/docs/_layouts/news_item.html +++ b/docs/_layouts/news_item.html @@ -12,17 +12,17 @@

diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index bae31bb365c..28364e7dbde 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -4,15 +4,12 @@
-

{{ page.title }}

{{ content }}
-
-
diff --git a/docs/_layouts/step.html b/docs/_layouts/step.html index 7a3a593f9cf..3bf1101cc8e 100644 --- a/docs/_layouts/step.html +++ b/docs/_layouts/step.html @@ -1,26 +1,21 @@ --- layout: default --- -
-
- - {% include docs_contents_mobile.html %} - -
-
- -

Step by Step Tutorial

-

{{ page.position }}. {{ page.title }}

- {{ content }} - {% include step-index.html %} -
-
- - {% include docs_contents.html %} - -
- +
+
+ {% include docs_contents_mobile.html -%} +
+
+ +

Step by Step Tutorial

+

{{ page.position }}. {{ page.title }}

+ {{ content }} + {% include step-index.html -%} +
-
+ {% include docs_contents.html -%} +
+
+
diff --git a/docs/_layouts/tutorials.html b/docs/_layouts/tutorials.html index 3850971c336..26d1aed00a9 100644 --- a/docs/_layouts/tutorials.html +++ b/docs/_layouts/tutorials.html @@ -2,26 +2,21 @@ layout: default --- -
-
- - {% include tutorials_contents_mobile.html %} - -
-
- -

{{ page.title }}

- {{ content }} - {% include section_nav_tutorials.html %} -
-
- - {% include tutorials_contents.html %} - -
- +
+
+ {%- include tutorials_contents_mobile.html -%} +
+
+ +

{{ page.title }}

+ {{- content -}} + {%- include section_nav_tutorials.html -%} +
-
+ {%- include tutorials_contents.html -%} +
+
+
diff --git a/docs/pages/404.html b/docs/pages/404.html index 9edc873bf92..dc4d97355f6 100644 --- a/docs/pages/404.html +++ b/docs/pages/404.html @@ -18,18 +18,10 @@

The resource you requested was not found. Here are some links to help you find your way:

diff --git a/docs/pages/news.html b/docs/pages/news.html index 94139fc00db..b806b0e5f5c 100644 --- a/docs/pages/news.html +++ b/docs/pages/news.html @@ -5,6 +5,6 @@ author: all --- -{% for post in site.posts %} - {% include news_item.html %} -{% endfor %} +{% for post in site.posts -%} + {% include news_item.html -%} +{% endfor -%} diff --git a/docs/pages/releases.html b/docs/pages/releases.html index 153d022c133..9736fbd8afe 100644 --- a/docs/pages/releases.html +++ b/docs/pages/releases.html @@ -5,6 +5,6 @@ author: all --- -{% for post in site.categories.release %} - {% include news_item.html %} -{% endfor %} +{% for post in site.categories.release -%} + {% include news_item.html -%} +{% endfor -%} diff --git a/docs/pages/showcase.html b/docs/pages/showcase.html index 58d52c0a912..98cd89174b6 100644 --- a/docs/pages/showcase.html +++ b/docs/pages/showcase.html @@ -9,18 +9,18 @@

Jekyll is used for all kinds of usecases. Here's some of our favorites:

From 4d131eb069b8de4a982e5b976352175aa882db27 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 24 Feb 2020 18:44:13 -0500 Subject: [PATCH 0233/1182] Update history to reflect merge of #8020 [ci skip] --- History.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.markdown b/History.markdown index 0a0bcb9a18c..fd1ffe3616a 100644 --- a/History.markdown +++ b/History.markdown @@ -76,6 +76,10 @@ * Add Visual Studio Code Development Container (#8016) * Configure kramdown toc_levels as array by default (#8015) +### Site Enhancements + + * Optimize rendering of the documentation site (#8020) + ## 4.0.0 / 2019-08-19 ### Major Enhancements From 39e2a8b5f5eceda74712cbfae9494d4cfdc1ea16 Mon Sep 17 00:00:00 2001 From: Dmitry Egorov <40038420+dmiedev@users.noreply.github.com> Date: Wed, 26 Feb 2020 09:28:36 +0300 Subject: [PATCH 0234/1182] [Docs] Fix asset link ref in step-by-step tutorial (#8026) Merge pull request 8026 --- docs/_docs/step-by-step/07-assets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/step-by-step/07-assets.md b/docs/_docs/step-by-step/07-assets.md index eb1534b7da9..5d8b1b8a92d 100644 --- a/docs/_docs/step-by-step/07-assets.md +++ b/docs/_docs/step-by-step/07-assets.md @@ -70,7 +70,7 @@ Open `_layouts/default.html` and add the stylesheet to the ``: {{ page.title }} - + {% include navigation.html %} From b1573b62921c51d123bf433e64cf6ee2197473c7 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 26 Feb 2020 01:28:38 -0500 Subject: [PATCH 0235/1182] Update history to reflect merge of #8026 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index fd1ffe3616a..bac495b8d9f 100644 --- a/History.markdown +++ b/History.markdown @@ -56,6 +56,7 @@ * Fix file references in Step by Step Tutorial's Assets step (#8007) * docs: improve highlighting of code blocks (#8017) * remove leading slash from Sass file location (#8021) + * [Docs] Fix asset link ref in step-by-step tutorial (#8026) ### Development Fixes From 3d045d277e439d846f9c417ed00e34ba8abbea64 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 26 Feb 2020 22:06:19 +0530 Subject: [PATCH 0236/1182] Optimize markdown parsing with Kramdown by reusing the options and parser objects (#8013) Merge pull request 8013 --- .../converters/markdown/kramdown_parser.rb | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/converters/markdown/kramdown_parser.rb b/lib/jekyll/converters/markdown/kramdown_parser.rb index 64bb1d1c8d2..aebd6ee7fef 100644 --- a/lib/jekyll/converters/markdown/kramdown_parser.rb +++ b/lib/jekyll/converters/markdown/kramdown_parser.rb @@ -1,5 +1,63 @@ # Frozen-string-literal: true +module Kramdown + # A Kramdown::Document subclass meant to optimize memory usage from initializing + # a kramdown document for parsing. + # + # The optimization is by using the same options Hash (and its derivatives) for + # converting all Markdown documents in a Jekyll site. + class JekyllDocument < Document + class << self + attr_reader :options, :parser + + # The implementation is basically the core logic in +Kramdown::Document#initialize+ + # + # rubocop:disable Naming/MemoizedInstanceVariableName + def setup(options) + @cache ||= {} + + # reset variables on a subsequent set up with a different options Hash + unless @cache[:id] == options.hash + @options = @parser = nil + @cache[:id] = options.hash + end + + @options ||= Options.merge(options).freeze + @parser ||= begin + parser_name = (@options[:input] || "kramdown").to_s + parser_name = parser_name[0..0].upcase + parser_name[1..-1] + try_require("parser", parser_name) + + if Parser.const_defined?(parser_name) + Parser.const_get(parser_name) + else + raise Kramdown::Error, "kramdown has no parser to handle the specified " \ + "input format: #{@options[:input]}" + end + end + end + # rubocop:enable Naming/MemoizedInstanceVariableName + + private + + def try_require(type, name) + require "kramdown/#{type}/#{Utils.snake_case(name)}" + rescue LoadError + false + end + end + + def initialize(source, options = {}) + JekyllDocument.setup(options) + + @options = JekyllDocument.options + @root, @warnings = JekyllDocument.parser.parse(source, @options) + end + end +end + +# + module Jekyll module Converters class Markdown @@ -37,7 +95,7 @@ def setup end def convert(content) - document = Kramdown::Document.new(content, @config) + document = Kramdown::JekyllDocument.new(content, @config) html_output = document.to_html if @config["show_warnings"] document.warnings.each do |warning| From aef8f11f6c5bc894f65a6b21aca495ff607b5e7c Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 26 Feb 2020 11:36:22 -0500 Subject: [PATCH 0237/1182] Update history to reflect merge of #8013 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index bac495b8d9f..af2b690d154 100644 --- a/History.markdown +++ b/History.markdown @@ -16,6 +16,7 @@ * Update item_property to recognize integers (#7878) * Include _config.yml in a new theme's gemspec (#7865) * Add an option to easily disable disk-cache (#7928) + * Optimize markdown parsing with Kramdown by reusing the options and parser objects (#8013) ### Documentation From a9fb26fc33a9d1a92f56215645b9a9b8ba053ff0 Mon Sep 17 00:00:00 2001 From: Matt Penna Date: Wed, 26 Feb 2020 19:46:25 -0500 Subject: [PATCH 0238/1182] Corrected command to modify PATH (#8029) Merge pull request 8029 --- docs/_docs/installation/macos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 6bda62648dd..98c656ea389 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -29,7 +29,7 @@ brew install ruby Add the brew ruby path to your shell config: ```bash -export PATH=/usr/local/opt/ruby/bin:$PATH +echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile ``` Then relaunch your terminal and check your updated Ruby setup: From 4a6f91810c2ee14ab13de9687275275f10f9a56a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 26 Feb 2020 19:46:28 -0500 Subject: [PATCH 0239/1182] Update history to reflect merge of #8029 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index af2b690d154..fcdf84d7050 100644 --- a/History.markdown +++ b/History.markdown @@ -58,6 +58,7 @@ * docs: improve highlighting of code blocks (#8017) * remove leading slash from Sass file location (#8021) * [Docs] Fix asset link ref in step-by-step tutorial (#8026) + * Corrected command to modify PATH (#8029) ### Development Fixes From 0378c3628c3e5b2684724c71157fee538dee504e Mon Sep 17 00:00:00 2001 From: Matt Penna Date: Thu, 27 Feb 2020 00:22:03 -0500 Subject: [PATCH 0240/1182] Corrected command to modify PATH (#8030) Merge pull request 8030 --- docs/_docs/installation/macos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 98c656ea389..04d3c77984c 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -95,7 +95,7 @@ ruby -v Then append your path file with the following, replacing the `X.X` with the first two digits of your Ruby version. ```bash -export PATH=$HOME/.gem/ruby/X.X.0/bin:$PATH +echo 'export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"' >> ~/.bash_profile ``` To check that your gem paths point to your home directory run: From 70fc6b377d3f44197ae3f4b7c146e849f49f54b5 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 27 Feb 2020 00:22:06 -0500 Subject: [PATCH 0241/1182] Update history to reflect merge of #8030 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index fcdf84d7050..67ea362d279 100644 --- a/History.markdown +++ b/History.markdown @@ -59,6 +59,7 @@ * remove leading slash from Sass file location (#8021) * [Docs] Fix asset link ref in step-by-step tutorial (#8026) * Corrected command to modify PATH (#8029) + * Corrected command to modify PATH (#8030) ### Development Fixes From 7ba99f0010b207d540f1dc8944cfb4d23589dc22 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 27 Feb 2020 18:44:16 +0530 Subject: [PATCH 0242/1182] Docs: Render full contents of just the latest post (#8032) Merge pull request 8032 --- docs/_includes/news_item.html | 2 +- docs/_includes/news_item_archive.html | 26 ++++++++++++++++++++++ docs/_layouts/news_item.html | 2 +- docs/_sass/_style.scss | 31 ++++++++++++++++++++++++--- docs/pages/news.html | 6 +++++- docs/pages/releases.html | 6 +++++- 6 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 docs/_includes/news_item_archive.html diff --git a/docs/_includes/news_item.html b/docs/_includes/news_item.html index e7a7dbc2def..6070d051f83 100644 --- a/docs/_includes/news_item.html +++ b/docs/_includes/news_item.html @@ -16,7 +16,7 @@

{% assign author = post.author -%}

diff --git a/docs/_includes/news_item_archive.html b/docs/_includes/news_item_archive.html new file mode 100644 index 00000000000..553439f1ef3 --- /dev/null +++ b/docs/_includes/news_item_archive.html @@ -0,0 +1,26 @@ + diff --git a/docs/_layouts/news_item.html b/docs/_layouts/news_item.html index 74d5d91b010..494b86caf85 100644 --- a/docs/_layouts/news_item.html +++ b/docs/_layouts/news_item.html @@ -22,7 +22,7 @@

{% assign author = page.author -%}

diff --git a/docs/_sass/_style.scss b/docs/_sass/_style.scss index deafe505f50..4a17e410b82 100644 --- a/docs/_sass/_style.scss +++ b/docs/_sass/_style.scss @@ -664,13 +664,38 @@ article h2:first-child { margin-top: 0; } } .post-date, -.post-author { margin-left: 10px; } +.post-author { margin-left: 15px; } +.post-author .author-name { margin-left: 8px } .news article + article { - margin-top: -10px; - @include border-radius(0 0 10px 10px); + margin-top: -6px; + padding: 15px 40px; border-top: 1px solid #555; + border-radius: 0; @include box-shadow(0 -1px 0 #2f2f2f); + + h2.post-title { + margin-bottom: 0.45em; + } + .post-category { + margin-right: 20px; + padding-left: 0; + width: 150px; + box-sizing: border-box; + .label { + float: right; + } + } + .cell-left, .cell-right { + display: inline-block; + } + .cell-left { + max-width: 180px; + } + .cell-right { + width: calc(100% - 130px); + } + .post-date { margin-left: 0 } } /* Code Highlighting */ diff --git a/docs/pages/news.html b/docs/pages/news.html index b806b0e5f5c..c010d2d3a0e 100644 --- a/docs/pages/news.html +++ b/docs/pages/news.html @@ -6,5 +6,9 @@ --- {% for post in site.posts -%} - {% include news_item.html -%} + {% if forloop.index == 1 -%} + {% include news_item.html -%} + {% else -%} + {% include news_item_archive.html -%} + {% endif -%} {% endfor -%} diff --git a/docs/pages/releases.html b/docs/pages/releases.html index 9736fbd8afe..f8416c07e11 100644 --- a/docs/pages/releases.html +++ b/docs/pages/releases.html @@ -6,5 +6,9 @@ --- {% for post in site.categories.release -%} - {% include news_item.html -%} + {% if forloop.index == 1 -%} + {% include news_item.html -%} + {% else -%} + {% include news_item_archive.html -%} + {% endif -%} {% endfor -%} From 53bb8bd7d38b13b41b7db4340054d0d544aedebe Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 27 Feb 2020 08:14:17 -0500 Subject: [PATCH 0243/1182] Update history to reflect merge of #8032 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 67ea362d279..38814144263 100644 --- a/History.markdown +++ b/History.markdown @@ -60,6 +60,7 @@ * [Docs] Fix asset link ref in step-by-step tutorial (#8026) * Corrected command to modify PATH (#8029) * Corrected command to modify PATH (#8030) + * Docs: Render full contents of just the latest post (#8032) ### Development Fixes From b05e6ee8aef4b04a83bd4082b9d7a81d77cc4737 Mon Sep 17 00:00:00 2001 From: Eric Knibbe Date: Fri, 28 Feb 2020 14:29:47 -0500 Subject: [PATCH 0244/1182] docs: improvements for note boxes (#8037) Merge pull request 8037 --- docs/_docs/collections.md | 8 +++--- docs/_docs/configuration/environments.md | 10 +++---- docs/_docs/installation/macos.md | 4 +-- docs/_docs/installation/windows.md | 10 ++++--- docs/_docs/liquid/tags.md | 17 ++++++------ .../maintaining/affinity-team-captain.md | 2 +- docs/_docs/maintaining/avoiding-burnout.md | 2 +- .../maintaining/becoming-a-maintainer.md | 2 +- docs/_docs/maintaining/index.md | 2 +- .../maintaining/merging-a-pull-request.md | 2 +- .../maintaining/releasing-a-new-version.md | 2 +- .../maintaining/reviewing-a-pull-request.md | 2 +- docs/_docs/maintaining/special-labels.md | 2 +- docs/_docs/maintaining/triaging-an-issue.md | 2 +- docs/_docs/pages.md | 14 +++++----- docs/_docs/plugins/commands.md | 2 +- docs/_docs/plugins/installation.md | 13 ++++------ docs/_docs/plugins/tags.md | 11 ++++---- docs/_docs/posts.md | 2 +- docs/_docs/step-by-step/07-assets.md | 6 ++--- docs/_docs/structure.md | 26 +++++++++---------- docs/_docs/themes.md | 6 ++--- docs/_docs/upgrading/2-to-3.md | 4 +-- docs/_sass/_style.scss | 10 +++++++ .../convert-existing-site-to-jekyll.md | 2 +- docs/_tutorials/index.md | 4 +-- docs/_tutorials/navigation.md | 4 +-- 27 files changed, 90 insertions(+), 81 deletions(-) diff --git a/docs/_docs/collections.md b/docs/_docs/collections.md index 00e41181b68..4e591d3b587 100644 --- a/docs/_docs/collections.md +++ b/docs/_docs/collections.md @@ -25,9 +25,11 @@ collections: people: true ``` -
-

When defining a collection as a sequence, its pages will not be rendered by default. To enable this, output: true must be specified on the collection, which requires defining the collection as a mapping. For more information, see the section Output

-
+{: .note .info} +When defining a collection as a sequence, its pages will not be rendered by +default. To enable this, output: true must be specified on the +collection, which requires defining the collection as a mapping. For more +information, see the section Output.
Gather your collections {%- include docs_version_badge.html version="3.7.0" -%}
diff --git a/docs/_docs/configuration/environments.md b/docs/_docs/configuration/environments.md index be8d376fc45..95250cc854a 100644 --- a/docs/_docs/configuration/environments.md +++ b/docs/_docs/configuration/environments.md @@ -42,8 +42,8 @@ environment but not include it in production environments. By specifying the option in the build command, you avoid having to change values in your configuration files when moving from one environment to another. -
-

- To switch part of your config settings depending on the environment, use the build command option, for example --config _config.yml,_config_development.yml. Settings in later files override settings in earlier files. -

-
+{: .note} +To switch part of your config settings depending on the environment, use the +build command option, +for example --config _config.yml,_config_development.yml. Settings +in later files override settings in earlier files. diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 04d3c77984c..836c8e77772 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -104,9 +104,9 @@ To check that your gem paths point to your home directory run: gem env ``` -And check that `GEM PATHS:` points to a path in your home directory +And check that `GEM PATHS:` points to a path in your home directory. -{: .note } +{: .note .info} Every time you update Ruby to a version with a different first two digits, you will need to update your path to match. ### Global Install diff --git a/docs/_docs/installation/windows.md b/docs/_docs/installation/windows.md index 73020ba81c0..e564edde35f 100644 --- a/docs/_docs/installation/windows.md +++ b/docs/_docs/installation/windows.md @@ -35,7 +35,8 @@ That's it, you're ready to use Jekyll! If you are using Windows 10 version 1607 or later, another option to run Jekyll is by [installing](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) the Windows Subsystem for Linux. -*Note:* You must have [Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/about) enabled. +{: .note .info} +You must have [Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/about) enabled. First let's make sure all our packages / repositories are up to date. Open a new Command Prompt instance, and type the following: @@ -89,7 +90,8 @@ with the current date in the filename. the "Running Jekyll as Non-Superuser" instructions in Troubleshooting.

-**Note:** Bash on Ubuntu on Windows is still under development, so you may run into issues. +{: .note .info} +Bash on Ubuntu on Windows is still under development, so you may run into issues. ## Encoding @@ -125,11 +127,11 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
TZInfo 2.0 incompatibility

- v2.0 of the TZInfo library has introduced a change in how timezone offsets are calculated. + Version 2.0 of the TZInfo library has introduced a change in how timezone offsets are calculated. This will result in incorrect date and time for your posts when the site is built with Jekyll 3.x on Windows.

- We therefore recommend that you lock the Timezone library to v1.2 and above by listing + We therefore recommend that you lock the Timezone library to version 1.2 and above by listing gem 'tzinfo', '~> 1.2' in your Gemfile.

diff --git a/docs/_docs/liquid/tags.md b/docs/_docs/liquid/tags.md index 508684527ba..a813cd9c5d4 100644 --- a/docs/_docs/liquid/tags.md +++ b/docs/_docs/liquid/tags.md @@ -18,12 +18,11 @@ Jekyll has built in support for syntax highlighting of over 100 languages thanks to [Rouge](http://rouge.jneen.net). Rouge is the default highlighter in Jekyll 3 and above. -
-

Using Pygments has been deprecated and is not supported in - Jekyll 4, the configuration setting highlighter: pygments - now automatically falls back to using Rouge which is written in Ruby - and 100% compatible with stylesheets for Pygments.

-
+{: .note .warning} +Using Pygments has been deprecated and is not supported in +Jekyll 4; the configuration setting highlighter: pygments +now automatically falls back to using Rouge which is written in Ruby +and 100% compatible with stylesheets for Pygments. To render a code block with syntax highlighting, surround your code as follows: @@ -47,7 +46,7 @@ wiki](https://github.com/jayferd/rouge/wiki/List-of-supported-languages-and-lexe

If you are using a language that contains curly braces, you will likely need to place {% raw %} and {% endraw %} tags around your code. - Since {% include docs_version_badge.html version="4.0" %} you can add render_with_liquid: false in your front matter to disable Liquid entirely for a particular document.

+ Since Jekyll {% include docs_version_badge.html version="4.0" %}, you can add render_with_liquid: false in your front matter to disable Liquid entirely for a particular document.

### Line numbers @@ -84,8 +83,8 @@ the syntax highlighter styles into your `main.css`: ## Links -{: .note } -Since Jekyll {% include docs_version_badge.html version="v4.0"%} you don't need to prepend `link` and `post_url` tags with `site.baseurl` +{: .note} +Since Jekyll {% include docs_version_badge.html version="4.0"%}, you don't need to prepend `link` and `post_url` tags with `site.baseurl`. ### Linking to pages {#link} diff --git a/docs/_docs/maintaining/affinity-team-captain.md b/docs/_docs/maintaining/affinity-team-captain.md index 70d0e10da16..a1d982f9e85 100644 --- a/docs/_docs/maintaining/affinity-team-captain.md +++ b/docs/_docs/maintaining/affinity-team-captain.md @@ -3,7 +3,7 @@ title: Affinity Team Captains --- **This guide is for affinity team captains.** These special people are **team maintainers** of one of our [affinity teams][] and help triage and evaluate the issues and contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} ## Affinity teams & their captains diff --git a/docs/_docs/maintaining/avoiding-burnout.md b/docs/_docs/maintaining/avoiding-burnout.md index ea9f88a2c84..42f4b7d3207 100644 --- a/docs/_docs/maintaining/avoiding-burnout.md +++ b/docs/_docs/maintaining/avoiding-burnout.md @@ -3,7 +3,7 @@ title: "Avoiding Burnout" --- **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} # 1. Use Jekyll diff --git a/docs/_docs/maintaining/becoming-a-maintainer.md b/docs/_docs/maintaining/becoming-a-maintainer.md index 00abef54bd8..21474b0e1e5 100644 --- a/docs/_docs/maintaining/becoming-a-maintainer.md +++ b/docs/_docs/maintaining/becoming-a-maintainer.md @@ -3,7 +3,7 @@ title: "Becoming a Maintainer" --- **This guide is for contributors.** These special people have contributed to one or more of Jekyll's repositories, but do not yet have write access to any. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} So you want to become a maintainer of a Jekyll project? We'd love to have you! Here are some things we like to see from community members before we promote them to maintainers. diff --git a/docs/_docs/maintaining/index.md b/docs/_docs/maintaining/index.md index 645030e28c9..1d517ce47cd 100644 --- a/docs/_docs/maintaining/index.md +++ b/docs/_docs/maintaining/index.md @@ -4,7 +4,7 @@ permalink: /docs/maintaining/ --- **This guide is for Jekyll contributors and maintainers.** These special people contribute to one or more of Jekyll's repositories or help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} Hello! This is where we document various processes for maintaining Jekyll. Being a maintainer for any Jekyll project is a big responsibility, so we put together some helpful documentation for various tasks you might do as a maintainer. diff --git a/docs/_docs/maintaining/merging-a-pull-request.md b/docs/_docs/maintaining/merging-a-pull-request.md index 34fa1fec3c6..d24a298c895 100644 --- a/docs/_docs/maintaining/merging-a-pull-request.md +++ b/docs/_docs/maintaining/merging-a-pull-request.md @@ -3,7 +3,7 @@ title: "Merging a Pull Request" --- **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} ## Code Review diff --git a/docs/_docs/maintaining/releasing-a-new-version.md b/docs/_docs/maintaining/releasing-a-new-version.md index f85f499e408..5e1cbc3f0db 100644 --- a/docs/_docs/maintaining/releasing-a-new-version.md +++ b/docs/_docs/maintaining/releasing-a-new-version.md @@ -3,7 +3,7 @@ title: "Releasing a new version" --- **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} The most important thing to understand before making a release is that there's no need to feel nervous. Most things are revertable, and even if you do publish an incomplete gem version, we can always skip that one. Don't hestitate to contact the other maintainers if you feel unsure or don't know what to do next. diff --git a/docs/_docs/maintaining/reviewing-a-pull-request.md b/docs/_docs/maintaining/reviewing-a-pull-request.md index a0a6e353de5..cff0efd3874 100644 --- a/docs/_docs/maintaining/reviewing-a-pull-request.md +++ b/docs/_docs/maintaining/reviewing-a-pull-request.md @@ -3,7 +3,7 @@ title: "Reviewing a Pull Request" --- **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} ## Respond Kindly diff --git a/docs/_docs/maintaining/special-labels.md b/docs/_docs/maintaining/special-labels.md index 964ff0e2e07..4d89841f6cf 100644 --- a/docs/_docs/maintaining/special-labels.md +++ b/docs/_docs/maintaining/special-labels.md @@ -3,7 +3,7 @@ title: "Special Labels" --- **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} We use a series of "special labels" on GitHub.com to automate handling of some parts of the pull request and issue process. @jekyllbot may automatically apply or remove certain labels based on actions taken by users or maintainers. Below are the labels and how they work: diff --git a/docs/_docs/maintaining/triaging-an-issue.md b/docs/_docs/maintaining/triaging-an-issue.md index 36bfdcc95a9..ac0833b1f08 100644 --- a/docs/_docs/maintaining/triaging-an-issue.md +++ b/docs/_docs/maintaining/triaging-an-issue.md @@ -3,7 +3,7 @@ title: "Triaging an Issue" --- **This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. -{: .note .info } +{: .note .info} Before evaluating an issue, it is important to identify if it is a feature request or a bug. For the Jekyll project the following definitions are used diff --git a/docs/_docs/pages.md b/docs/_docs/pages.md index 98b21b7d098..d707d0f44da 100644 --- a/docs/_docs/pages.md +++ b/docs/_docs/pages.md @@ -15,8 +15,8 @@ and associated URLs might look like: ``` . -|-- about.md # => http://example.com/about.html -|-- index.html # => http://example.com/ +├── about.md # => http://example.com/about.html +├── index.html # => http://example.com/ └── contact.html # => http://example.com/contact.html ``` @@ -24,11 +24,11 @@ If you have a lot of pages, you can organize them into subfolders. The same subf ``` . -|-- about.md # => http://example.com/about.html -|-- documentation # folder containing pages - └── doc1.md # => http://example.com/documentation/doc1.html -|-- design # folder containing pages - └── draft.md # => http://example.com/design/draft.html +├── about.md # => http://example.com/about.html +├── documentation # folder containing pages +│ └── doc1.md # => http://example.com/documentation/doc1.html +├── design # folder containing pages +│ └── draft.md # => http://example.com/design/draft.html ``` ## Changing the output URL diff --git a/docs/_docs/plugins/commands.md b/docs/_docs/plugins/commands.md index cd704346ea8..0666c779a5f 100644 --- a/docs/_docs/plugins/commands.md +++ b/docs/_docs/plugins/commands.md @@ -2,7 +2,7 @@ title: Commands permalink: /docs/plugins/commands/ --- -As of version 2.5.0, Jekyll can be extended with plugins which provide +As of version {% include docs_version_badge.html version="2.5.0"%}, Jekyll can be extended with plugins which provide subcommands for the `jekyll` executable. This is possible by including the relevant plugins in a `Gemfile` group called `:jekyll_plugins`: diff --git a/docs/_docs/plugins/installation.md b/docs/_docs/plugins/installation.md index 02e7b628b53..2e4fad122d2 100644 --- a/docs/_docs/plugins/installation.md +++ b/docs/_docs/plugins/installation.md @@ -52,7 +52,7 @@ You have 3 options for installing plugins:

-
+
_plugins, _config.yml and Gemfile can be used simultaneously @@ -73,10 +73,7 @@ processing the rest of your source directory. A gem included here will be activated even if its not explicitly listed under the `plugins:` key in your site's config file. -
-

- Gems included in the :jekyll-plugins group are activated - regardless of the --safe mode setting. Be aware of what - gems are included under this group! -

-
+{: .note .warning} +Gems included in the :jekyll-plugins group are activated +regardless of the --safe mode setting. Be aware of which +gems are included under this group! diff --git a/docs/_docs/plugins/tags.md b/docs/_docs/plugins/tags.md index fff0a45fd3a..3695a94c712 100644 --- a/docs/_docs/plugins/tags.md +++ b/docs/_docs/plugins/tags.md @@ -107,9 +107,8 @@ And we would still get the same output as above on the page:

page rendered at: Tue June 22 23:38:47 –0500 2010

``` -
-

In the above example, the tag block and the tag are both registered with - the name render_time but to register a tag and a tag block using - the same name in the same project is not recommended as this may lead to - conflicts.

-
+{: .note .info} +In the above example, the tag block and the tag are both registered with +the name render_time, but to register a tag and a tag block using +the same name in the same project is not recommended as this may lead to +conflicts. diff --git a/docs/_docs/posts.md b/docs/_docs/posts.md index 6fff5a08f56..34e21f5c717 100644 --- a/docs/_docs/posts.md +++ b/docs/_docs/posts.md @@ -200,7 +200,7 @@ create a `_drafts` folder in your site's root and create your first draft: ``` . ├── _drafts -| └── a-draft-post.md +│ └── a-draft-post.md ... ``` diff --git a/docs/_docs/step-by-step/07-assets.md b/docs/_docs/step-by-step/07-assets.md index 5d8b1b8a92d..8399f15bfb4 100644 --- a/docs/_docs/step-by-step/07-assets.md +++ b/docs/_docs/step-by-step/07-assets.md @@ -11,9 +11,9 @@ Jekyll sites often use this structure to keep assets organized: ``` . ├── assets -| ├── css -| ├── images -| └── js +│ ├── css +│ ├── images +│ └── js ... ``` diff --git a/docs/_docs/structure.md b/docs/_docs/structure.md index 33a74aa710d..1843bc0e4d6 100644 --- a/docs/_docs/structure.md +++ b/docs/_docs/structure.md @@ -8,31 +8,31 @@ A basic Jekyll site usually looks something like this: . ├── _config.yml ├── _data -| └── members.yml +│ └── members.yml ├── _drafts -| ├── begin-with-the-crazy-ideas.md -| └── on-simplicity-in-technology.md +│ ├── begin-with-the-crazy-ideas.md +│ └── on-simplicity-in-technology.md ├── _includes -| ├── footer.html -| └── header.html +│ ├── footer.html +│ └── header.html ├── _layouts -| ├── default.html -| └── post.html +│ ├── default.html +│ └── post.html ├── _posts -| ├── 2007-10-29-why-every-programmer-should-play-nethack.md -| └── 2009-04-26-barcamp-boston-4-roundup.md +│ ├── 2007-10-29-why-every-programmer-should-play-nethack.md +│ └── 2009-04-26-barcamp-boston-4-roundup.md ├── _sass -| ├── _base.scss -| └── _layout.scss +│ ├── _base.scss +│ └── _layout.scss ├── _site ├── .jekyll-metadata └── index.html # can also be an 'index.md' with valid front matter ``` -
+
Directory structure of Jekyll sites using gem-based themes

- Starting Jekyll 3.2, a new Jekyll project bootstrapped with jekyll new uses gem-based themes to define the look of the site. This results in a lighter default directory structure : _layouts, _includes and _sass are stored in the theme-gem, by default. + Since version {% include docs_version_badge.html version="3.2"%}, a new Jekyll project bootstrapped with jekyll new uses gem-based themes to define the look of the site. This results in a lighter default directory structure: _layouts, _includes and _sass are stored in the theme-gem, by default.


diff --git a/docs/_docs/themes.md b/docs/_docs/themes.md index a518ee2b0b8..99ab3cbf2db 100644 --- a/docs/_docs/themes.md +++ b/docs/_docs/themes.md @@ -120,8 +120,8 @@ Jekyll will look first to your site's content before looking to the theme's defa Note that making copies of theme files will prevent you from receiving any theme updates on those files. An alternative, to continue getting theme updates on all stylesheets, is to use higher specificity CSS selectors in your own additional, originally named CSS files. -Refer to your selected theme's documentation and source repository for more information on what files you can override. {: .note .info} +Refer to your selected theme's documentation and source repository for more information on which files you can override. ## Converting gem-based themes to regular themes @@ -221,8 +221,8 @@ To install a gem-based theme: bundle exec jekyll serve ``` +{: .note .info} You can have multiple themes listed in your site's `Gemfile`, but only one theme can be selected in your site's `_config.yml`. -{: .note .info } If you're publishing your Jekyll site on [GitHub Pages](https://pages.github.com/), note that GitHub Pages supports only [some gem-based themes](https://pages.github.com/themes/). GitHub Pages also supports [using any theme hosted on GitHub](https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site/#adding-a-jekyll-theme-in-your-sites-_configyml-file) using the `remote_theme` configuration as if it were a gem-based theme. @@ -320,8 +320,8 @@ Themes are visual. Show users what your theme looks like by including a screensh To preview your theme as you're authoring it, it may be helpful to add dummy content in, for example, `/index.html` and `/page.html` files. This will allow you to use the `jekyll build` and `jekyll serve` commands to preview your theme, just as you'd preview a Jekyll site. +{: .note .info} If you do preview your theme locally, be sure to add `/_site` to your theme's `.gitignore` file to prevent the compiled site from also being included when you distribute your theme. -{: .info .note} ### Publishing your theme diff --git a/docs/_docs/upgrading/2-to-3.md b/docs/_docs/upgrading/2-to-3.md index 0c45fe0224e..f034d492c39 100644 --- a/docs/_docs/upgrading/2-to-3.md +++ b/docs/_docs/upgrading/2-to-3.md @@ -12,8 +12,8 @@ Before we dive in, go ahead and fetch the latest version of Jekyll: gem update jekyll ``` -Since v3.2 Jekyll requires Ruby version >= 2.1 -{: .note .warning } +{: .note .warning} +Since version {% include docs_version_badge.html version="3.2"%}, Jekyll requires Ruby version >= 2.1.

Diving in
diff --git a/docs/_sass/_style.scss b/docs/_sass/_style.scss index 4a17e410b82..324609fe3c5 100644 --- a/docs/_sass/_style.scss +++ b/docs/_sass/_style.scss @@ -991,6 +991,16 @@ code.output { } } +p.note { + color: #fff; + font-weight: 400; + font-size: .75em; + + &:after { + line-height: 1.21; + } +} + .info { background-color: #0389aa; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAzODlhYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDYxN2YiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); diff --git a/docs/_tutorials/convert-existing-site-to-jekyll.md b/docs/_tutorials/convert-existing-site-to-jekyll.md index cbfd859373c..bdac10306b5 100644 --- a/docs/_tutorials/convert-existing-site-to-jekyll.md +++ b/docs/_tutorials/convert-existing-site-to-jekyll.md @@ -83,8 +83,8 @@ cd my_jekyll_site jekyll serve ``` -If you have a Gemfile, [use Bundler](/docs/ruby-101/#bundler) by typing `bundle exec jekyll serve` instead. {: .note .info} +If you have a Gemfile, [use Bundler](/docs/ruby-101/#bundler) by typing `bundle exec jekyll serve` instead. When you serve the site, you get a preview URL such as `http://127.0.0.1:4000/` (which is the same as `http://localhost:4000/`). The site's files are built into the `_site` folder by default. diff --git a/docs/_tutorials/index.md b/docs/_tutorials/index.md index ec537203ba9..4deb89bcf98 100644 --- a/docs/_tutorials/index.md +++ b/docs/_tutorials/index.md @@ -15,8 +15,8 @@ In contrast to [Docs](/docs/home/), Tutorials provide more detailed, narrative i In short, tutorials aren't the core reference information in docs. They walk users through processes from beginning to end. -{: .info .note} -**Note:** The Tutorials section is new, so there aren't many tutorials yet. You can add a tutorial here to help populate this section. +{: .note .info} +The Tutorials section is new, so there aren't many tutorials yet. You can add a tutorial here to help populate this section. Some of these techniques might even guide you through a supporting tool, script, service, or other hack used with your Jekyll site. Feel free to include tutorials involving external services with Jekyll as well. However, note that Jekyll in no way endorses any third-party tools mentioned in tutorials. diff --git a/docs/_tutorials/navigation.md b/docs/_tutorials/navigation.md index 7ba036ef8b8..c1c86a259b8 100644 --- a/docs/_tutorials/navigation.md +++ b/docs/_tutorials/navigation.md @@ -69,8 +69,8 @@ docs:
-{: .note .info } -For the results in these fictitious samples, `#` is manually substituted for the actual link value to avoid 404 errors.) +{: .note .info} +For the results in these fictitious samples, `#` is manually substituted for the actual link value (to avoid 404 errors.) When you use a `for` loop, you choose how you want to refer to the items you're looping through. The variable you choose (in this case, `item`) becomes how you access the properties of each item in the list. Dot notation is used to get a property of the item (for example, `item.url`). From e6d082488cf4805096b4dd5399a40b761771bfdf Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 28 Feb 2020 14:29:49 -0500 Subject: [PATCH 0245/1182] Update history to reflect merge of #8037 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 38814144263..c402d3b83af 100644 --- a/History.markdown +++ b/History.markdown @@ -61,6 +61,7 @@ * Corrected command to modify PATH (#8029) * Corrected command to modify PATH (#8030) * Docs: Render full contents of just the latest post (#8032) + * docs: improvements for note boxes (#8037) ### Development Fixes From 028c306c11fa86eaa7e540617af36b47a7fffaa8 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Mon, 2 Mar 2020 16:21:28 +0100 Subject: [PATCH 0246/1182] chore: redirect questions to the forum --- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..ef9a6e1abae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Jekyll Community Forum + url: https://talk.jekyllrb.com/ + about: Please ask and answer questions here. From 6ae640755fc1608358c45afd9b06e2aa1ec6e56e Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Mon, 2 Mar 2020 16:22:42 +0100 Subject: [PATCH 0247/1182] chore: remove question template --- .github/ISSUE_TEMPLATE/question.md | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index abde4c60018..00000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Question -about: Have any questions about how Jekyll works? -title: '' -labels: '' -assignees: '' - ---- - - From ea57ef78da1c358f578ddb2ae7b222476fa0b118 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 4 Mar 2020 20:44:53 +0530 Subject: [PATCH 0248/1182] Simplify Jekyll::Hooks.trigger logic (#8044) Merge pull request 8044 --- lib/jekyll/hooks.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/hooks.rb b/lib/jekyll/hooks.rb index a6fbc74370f..47cdae4c613 100644 --- a/lib/jekyll/hooks.rb +++ b/lib/jekyll/hooks.rb @@ -91,11 +91,8 @@ def self.insert_hook(owner, event, priority, &block) # interface for Jekyll core components to trigger hooks def self.trigger(owner, event, *args) # proceed only if there are hooks to call - return unless @registry[owner] - return unless @registry[owner][event] - - # hooks to call for this owner and event - hooks = @registry[owner][event] + hooks = @registry.dig(owner, event) + return if hooks.nil? || hooks.empty? # sort and call hooks according to priority and load order hooks.sort_by { |h| @hook_priority[h] }.each do |hook| From ab6ef0b257e4c7aafec0518d93bea3e9c4b75b75 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Wed, 4 Mar 2020 10:14:55 -0500 Subject: [PATCH 0249/1182] Update history to reflect merge of #8044 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index c402d3b83af..9e3d417f677 100644 --- a/History.markdown +++ b/History.markdown @@ -81,6 +81,7 @@ * Update unit tests for Kramdown-based converter (#8014) * Add Visual Studio Code Development Container (#8016) * Configure kramdown toc_levels as array by default (#8015) + * Simplify Jekyll::Hooks.trigger logic (#8044) ### Site Enhancements From 0f4c8d22482fdc65c4d91ce657d9fceb07e16319 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 6 Mar 2020 21:38:56 +0530 Subject: [PATCH 0250/1182] Allow multiple binary operator in where_exp filter (#8047) Merge pull request 8047 --- lib/jekyll/filters.rb | 10 +++++++--- test/test_filters.rb | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 31b24d7a9b3..fcfe6477903 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -432,10 +432,14 @@ def parse_condition(exp) # # Returns an instance of Liquid::Condition def parse_binary_comparison(parser) - parse_comparison(parser).tap do |condition| - binary_operator = parser.id?("and") || parser.id?("or") - condition.send(binary_operator, parse_comparison(parser)) if binary_operator + condition = parse_comparison(parser) + first_condition = condition + while (binary_operator = parser.id?("and") || parser.id?("or")) + child_condition = parse_comparison(parser) + condition.send(binary_operator, child_condition) + condition = child_condition end + first_condition end # Generates a Liquid::Condition object from a Liquid::Parser object based on whether the parsed diff --git a/test/test_filters.rb b/test/test_filters.rb index c9358a610a1..89a586cca4e 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -997,6 +997,23 @@ def to_liquid ) end + should "filter objects across multiple conditions" do + sample = [ + { "color" => "teal", "size" => "large", "type" => "variable" }, + { "color" => "red", "size" => "large", "type" => "fixed" }, + { "color" => "red", "size" => "medium", "type" => "variable" }, + { "color" => "blue", "size" => "medium", "type" => "fixed" }, + ] + assert_equal( + [ + { "color" => "red", "size" => "large", "type" => "fixed" }, + ], + @filter.where_exp( + sample, "item", "item.type == 'fixed' and item.color == 'red' or item.color == 'teal'" + ) + ) + end + should "stringify during comparison for compatibility with liquid parsing" do hash = { "The Words" => { "rating" => 1.2, "featured" => false }, From 27ca06326a00a6c783270027a35b4b59844cb45c Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 6 Mar 2020 11:08:59 -0500 Subject: [PATCH 0251/1182] Update history to reflect merge of #8047 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 9e3d417f677..0bdab578b54 100644 --- a/History.markdown +++ b/History.markdown @@ -9,6 +9,7 @@ * Memoize absolute_url and relative_url filters (#7793) * Fix documentation comment for Jekyll::Converters::Identity (#7883) * Optimize Jekyll::Filters#item_property (#7696) + * Allow multiple binary operators in where_exp filter (#8047) ### Minor Enhancements From c8d673c98415cd91e0b35e13b6341310969de006 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sat, 7 Mar 2020 09:57:14 +0100 Subject: [PATCH 0252/1182] docs: external links Third-party services, deployment services --- docs/_tutorials/convert-existing-site-to-jekyll.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/_tutorials/convert-existing-site-to-jekyll.md b/docs/_tutorials/convert-existing-site-to-jekyll.md index bdac10306b5..650006744ce 100644 --- a/docs/_tutorials/convert-existing-site-to-jekyll.md +++ b/docs/_tutorials/convert-existing-site-to-jekyll.md @@ -515,14 +515,7 @@ You can also auto-generate your sitemap by adding a gem called [`jekyll-sitemap` ## 12. Add external services -For other services you might need (such as contact forms, search, comments, and more), look for third-party services. For example, you might use the following: - - * For comments: [Disqus](https://disqus.com/) - * For a newsletter: [Tinyletter](https://tinyletter.com/) - * For contact forms: [Wufoo](https://www.wufoo.com/) - * For search: [Algolia Docsearch](https://community.algolia.com/docsearch/) - -For more details on services for static sites, see the [Third Parties](https://learn.cloudcannon.com/jekyll-third-parties/) list and tutorials from CloudCannon. +For other services you might need (such as contact forms, search, comments, and more), [look for third-party services](https://serverless.css-tricks.com/services/). We listed some [integrations on our resources page](/resources/#integrations) but in todays's world of SaaS and APis the list is endless. Your Jekyll pages consist of HTML, CSS, and JavaScript, so pretty much any code you need to embed will work without a problem. @@ -540,7 +533,7 @@ layout: null Although websites can implement more sophisticated features and functionality, we've covered the basics in this tutorial. You now have a fully functional Jekyll site. -To deploy your site, consider using [GitHub Pages](https://pages.github.com/), [Netlify](https://www.netlify.com/), [Amazon AWS S3](https://aws.amazon.com/s3/) using the [s3_website plugin](https://github.com/laurilehmijoki/s3_website), or just FTP your files to your web server. +To deploy your site, consider using [GitHub Pages](https://pages.github.com/), [Netlify](https://www.netlify.com/), [ZEIT](https://zeit.co), [Render](https://render.com), [Amazon AWS S3](https://aws.amazon.com/s3/) using the [s3_website plugin](https://github.com/laurilehmijoki/s3_website), or just FTP your files to your web server. You can also package your layouts, includes and assets into a Ruby `gem` and [make it a Jekyll theme](/docs/themes/). From 422470dc6ee53c1b6af3052bc288678d4cfa4b29 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sat, 7 Mar 2020 10:36:49 +0100 Subject: [PATCH 0253/1182] docs: ZEIT and Render --- docs/_docs/deployment/third-party.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/_docs/deployment/third-party.md b/docs/_docs/deployment/third-party.md index 7c25c5746dc..7882e48368a 100644 --- a/docs/_docs/deployment/third-party.md +++ b/docs/_docs/deployment/third-party.md @@ -35,10 +35,18 @@ Install the Kickster gem and you are good to go. More documentation can here fou ## Netlify -Netlify provides Global CDN, Continuous Deployment, one click HTTPS and [much more](https://www.netlify.com/features/), providing developers the most robust toolset available for modern web projects, without added complexity. Netlify supports custom plugins for Jekyll and has a free plan for open source projects. +Netlify provides Global CDN, Continuous Deployment, one click HTTPS and [much more](https://www.netlify.com/features/), providing developers a robust toolset for modern web projects, without added complexity. Netlify supports custom plugins for Jekyll and has a free plan for open source projects. Read this [Jekyll step-by-step guide](https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/) to setup your Jekyll site on Netlify. +## Render + +[Render](https://render.com) provides zero config continuous deployment for static sites. The service is free under 100GB monthly bandwith. + ## 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). + +## ZEIT + +[ZEIT](https://zeit.co/) provides zero config continuous deployment, HTTPS Custom domains, high performance smart CDN, you get instant static deploy for free. From 3e182ef25e707748528d25a7f8a385b96524e4e5 Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Sat, 7 Mar 2020 17:40:24 +0100 Subject: [PATCH 0254/1182] Non-deprecated `vendor/bundle` path configuration (#8048) Merge pull request 8048 --- docs/_tutorials/using-jekyll-with-bundler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_tutorials/using-jekyll-with-bundler.md b/docs/_tutorials/using-jekyll-with-bundler.md index 069602e2061..73e77679469 100644 --- a/docs/_tutorials/using-jekyll-with-bundler.md +++ b/docs/_tutorials/using-jekyll-with-bundler.md @@ -41,7 +41,7 @@ other gems on your system. If you skip this step, Bundler will install your dependencies globally on your system. ```sh -bundle install --path vendor/bundle +bundle config set path 'vendor/bundle' ```
From a1c18b6e8712dfce12cece11d4f68245e8f18c62 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sat, 7 Mar 2020 11:40:26 -0500 Subject: [PATCH 0255/1182] Update history to reflect merge of #8048 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 0bdab578b54..89468543248 100644 --- a/History.markdown +++ b/History.markdown @@ -63,6 +63,7 @@ * Corrected command to modify PATH (#8030) * Docs: Render full contents of just the latest post (#8032) * docs: improvements for note boxes (#8037) + * Non-deprecated `vendor/bundle` path configuration (#8048) ### Development Fixes From 256b0875cb944512da5daa4e5cecf3b3c9aaee9f Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 10 Mar 2020 01:20:31 +0100 Subject: [PATCH 0256/1182] site: make resources editable --- docs/_layouts/page.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index 28364e7dbde..caa618649fd 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -6,6 +6,11 @@
+ {%- if page.permalink contains "resources" %} + + {% endif -%}

{{ page.title }}

{{ content }}
From 325e6bb3f8b5026618df7d8940a251229b1d1476 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 10 Mar 2020 01:21:06 +0100 Subject: [PATCH 0257/1182] docs: add page layout to philosophy --- docs/pages/philosophy.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/philosophy.md b/docs/pages/philosophy.md index e6c08397934..93021fbe163 100644 --- a/docs/pages/philosophy.md +++ b/docs/pages/philosophy.md @@ -1,4 +1,5 @@ --- +layout: page title: Philosophy permalink: /philosophy/ --- From 1115eebe15316b992870f6ba4d41971b11af97b2 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 10 Mar 2020 01:24:32 +0100 Subject: [PATCH 0258/1182] docs: add typeform --- docs/pages/resources.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/resources.md b/docs/pages/resources.md index f15684e608d..dd57de83acf 100644 --- a/docs/pages/resources.md +++ b/docs/pages/resources.md @@ -69,6 +69,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site - [formX](https://formx.stream) - [Simple Form](https://getsimpleform.com/) - [SmartForms](https://smartforms.dev/) + - [Typeform](https://www.typeform.com/templates/c/forms/) ### Search - [Algolia](https://blog.algolia.com/instant-search-blog-documentation-jekyll-plugin/): Add a powerful instant search to your Jekyll site From f826b8b5eab9bdce08868c5e09de87a02dd536a4 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 12 Mar 2020 20:28:17 +0530 Subject: [PATCH 0259/1182] Fix documents custom-ordering logic (#8028) Merge pull request 8028 --- lib/jekyll/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/collection.rb b/lib/jekyll/collection.rb index 874d26f2215..318642151a1 100644 --- a/lib/jekyll/collection.rb +++ b/lib/jekyll/collection.rb @@ -239,7 +239,7 @@ def sort_docs_by_key! # Fall back to `Document#<=>` if the properties were equal or were non-sortable # Otherwise continue with current sort-order - if order.zero? || order.nil? + if order.nil? || order.zero? apples[-1] <=> olives[-1] else order From 88360bd17d5824a5cff01321722a3f0e7418a620 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 12 Mar 2020 10:58:20 -0400 Subject: [PATCH 0260/1182] Update history to reflect merge of #8028 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 89468543248..259f50d56cc 100644 --- a/History.markdown +++ b/History.markdown @@ -10,6 +10,7 @@ * Fix documentation comment for Jekyll::Converters::Identity (#7883) * Optimize Jekyll::Filters#item_property (#7696) * Allow multiple binary operators in where_exp filter (#8047) + * Fix documents custom-ordering logic (#8028) ### Minor Enhancements From a4b1ca2c757fcbd96e14f8701702dbba41070977 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 15 Mar 2020 23:49:54 +0100 Subject: [PATCH 0261/1182] chore: simplify require for Jekyll::VERSION (#8057) Merge pull request 8057 --- jekyll.gemspec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 370084ab4d6..6ebe33dbe85 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -1,8 +1,6 @@ # frozen_string_literal: true -lib = File.expand_path("lib", __dir__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require "jekyll/version" +require_relative "lib/jekyll/version" Gem::Specification.new do |s| s.name = "jekyll" From 190a35dc9a5d3ff5f2cea1837f55c2f38f272ee6 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 15 Mar 2020 18:49:57 -0400 Subject: [PATCH 0262/1182] Update history to reflect merge of #8057 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 259f50d56cc..da80fcffc37 100644 --- a/History.markdown +++ b/History.markdown @@ -85,6 +85,7 @@ * Add Visual Studio Code Development Container (#8016) * Configure kramdown toc_levels as array by default (#8015) * Simplify Jekyll::Hooks.trigger logic (#8044) + * chore: simplify require for Jekyll::VERSION (#8057) ### Site Enhancements From ee5d0cffd6dc2934d665259a4799bc4e74fcc3d7 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 16 Mar 2020 12:36:30 +0530 Subject: [PATCH 0263/1182] Remove version-constraint relaxation for i18n gem (#8055) Merge pull request 8055 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 6ebe33dbe85..1c7682adf4f 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("addressable", "~> 2.4") s.add_runtime_dependency("colorator", "~> 1.0") s.add_runtime_dependency("em-websocket", "~> 0.5") - s.add_runtime_dependency("i18n", ">= 0.9.5", "< 2") + s.add_runtime_dependency("i18n", "~> 1.0") s.add_runtime_dependency("jekyll-sass-converter", "~> 2.0") s.add_runtime_dependency("jekyll-watch", "~> 2.0") s.add_runtime_dependency("kramdown", "~> 2.1") From e9174dfd3bd3c8470606bd5e17702e926c8c3625 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 16 Mar 2020 03:06:32 -0400 Subject: [PATCH 0264/1182] Update history to reflect merge of #8055 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index da80fcffc37..73da178e041 100644 --- a/History.markdown +++ b/History.markdown @@ -86,6 +86,7 @@ * Configure kramdown toc_levels as array by default (#8015) * Simplify Jekyll::Hooks.trigger logic (#8044) * chore: simplify require for Jekyll::VERSION (#8057) + * Remove version-constraint relaxation for i18n gem (#8055) ### Site Enhancements From 7948578cd3eecae4ffc78522b17160da2f99ca48 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 16 Mar 2020 13:54:45 +0530 Subject: [PATCH 0265/1182] Mirror `spec.homepage` as `metadata["homepage_uri"]` (#8056) Merge pull request 8056 --- jekyll.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 1c7682adf4f..e02bb29a184 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -19,10 +19,10 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.metadata = { + "source_code_uri" => "https://github.com/jekyll/jekyll", "bug_tracker_uri" => "https://github.com/jekyll/jekyll/issues", "changelog_uri" => "https://github.com/jekyll/jekyll/releases", - "homepage_uri" => "https://jekyllrb.com", - "source_code_uri" => "https://github.com/jekyll/jekyll", + "homepage_uri" => s.homepage, } s.rdoc_options = ["--charset=UTF-8"] From c193677dc52166f551a72ab4c1ec05890c46577f Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 16 Mar 2020 04:24:46 -0400 Subject: [PATCH 0266/1182] Update history to reflect merge of #8056 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 73da178e041..228663c976a 100644 --- a/History.markdown +++ b/History.markdown @@ -87,6 +87,7 @@ * Simplify Jekyll::Hooks.trigger logic (#8044) * chore: simplify require for Jekyll::VERSION (#8057) * Remove version-constraint relaxation for i18n gem (#8055) + * Mirror `spec.homepage` as `metadata["homepage_uri"]` (#8056) ### Site Enhancements From dc5e1d7056949415358993749a69d96ad25dd06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kl=C3=BCpfel?= Date: Thu, 19 Mar 2020 11:10:25 +0100 Subject: [PATCH 0267/1182] Update 09-collections.md (#8060) Merge pull request 8060 --- docs/_docs/step-by-step/09-collections.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_docs/step-by-step/09-collections.md b/docs/_docs/step-by-step/09-collections.md index b41003292cf..d7a33b15910 100644 --- a/docs/_docs/step-by-step/09-collections.md +++ b/docs/_docs/step-by-step/09-collections.md @@ -112,6 +112,8 @@ collections: output: true ``` +Restart the jekyll server once more for the configuration changes to take effect. + You can link to the output page using `author.url`. Add the link to the `staff.html` page: From 0683ab143ea5e6a0ee8bc9fc1d8694666da43d6b Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 19 Mar 2020 06:10:27 -0400 Subject: [PATCH 0268/1182] Update history to reflect merge of #8060 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 228663c976a..3a59d1fa48b 100644 --- a/History.markdown +++ b/History.markdown @@ -65,6 +65,7 @@ * Docs: Render full contents of just the latest post (#8032) * docs: improvements for note boxes (#8037) * Non-deprecated `vendor/bundle` path configuration (#8048) + * Update 09-collections.md (#8060) ### Development Fixes From 1fe5bd0cf5bc03b376bd9ca446192f7285233298 Mon Sep 17 00:00:00 2001 From: Kieran Barker <29986418+kieranbarker@users.noreply.github.com> Date: Fri, 20 Mar 2020 10:40:17 +0000 Subject: [PATCH 0269/1182] Remove extra paragraph tags (#8063) Merge pull request 8063 --- docs/_docs/step-by-step/08-blogging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/step-by-step/08-blogging.md b/docs/_docs/step-by-step/08-blogging.md index 07c6ae32317..249d2c35f10 100644 --- a/docs/_docs/step-by-step/08-blogging.md +++ b/docs/_docs/step-by-step/08-blogging.md @@ -76,7 +76,7 @@ title: Blog {% for post in site.posts %}
  • {{ post.title }}

    -

    {{ post.excerpt }}

    + {{ post.excerpt }}
  • {% endfor %} From 83decb42f6998b047c3310245b5a3fe59bfc7b91 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 20 Mar 2020 06:40:19 -0400 Subject: [PATCH 0270/1182] Update history to reflect merge of #8063 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 3a59d1fa48b..993dea2f544 100644 --- a/History.markdown +++ b/History.markdown @@ -66,6 +66,7 @@ * docs: improvements for note boxes (#8037) * Non-deprecated `vendor/bundle` path configuration (#8048) * Update 09-collections.md (#8060) + * Remove extra paragraph tags (#8063) ### Development Fixes From a1401c6fe9d4cfc5c00de4e926cc14dd107be008 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 22 Mar 2020 21:34:33 +0530 Subject: [PATCH 0271/1182] Use `layout.path` when rendering the Liquid layout (#8069) Merge pull request 8069 --- lib/jekyll/renderer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index dff212ef961..7ecd1cb3d33 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -197,7 +197,7 @@ def render_layout(output, layout, info) layout.content, payload, info, - layout.relative_path + layout.path ) end From a011579fe42ca76fbd531670ed4bc03286b49157 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 22 Mar 2020 12:04:36 -0400 Subject: [PATCH 0272/1182] Update history to reflect merge of #8069 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 993dea2f544..f4ba8338098 100644 --- a/History.markdown +++ b/History.markdown @@ -11,6 +11,7 @@ * Optimize Jekyll::Filters#item_property (#7696) * Allow multiple binary operators in where_exp filter (#8047) * Fix documents custom-ordering logic (#8028) + * Use `layout.path` when rendering the Liquid layout (#8069) ### Minor Enhancements From b84ba5acccd0d3c33144ce5013851969d86ca196 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 26 Mar 2020 19:09:47 +0530 Subject: [PATCH 0273/1182] Add PageDrop to provide Liquid templates with data (#7992) Merge pull request 7992 --- docs/_docs/pages.md | 35 +++++++++++++++++++++++++++++++ lib/jekyll/drops/page_drop.rb | 14 +++++++++++++ lib/jekyll/page.rb | 32 ++++++++++++++++++++++++++++ test/test_page.rb | 36 ++++++++++++++++++++++++++++++++ test/test_page_without_a_file.rb | 6 ++++++ 5 files changed, 123 insertions(+) create mode 100644 lib/jekyll/drops/page_drop.rb diff --git a/docs/_docs/pages.md b/docs/_docs/pages.md index d707d0f44da..6b29267fc69 100644 --- a/docs/_docs/pages.md +++ b/docs/_docs/pages.md @@ -34,3 +34,38 @@ If you have a lot of pages, you can organize them into subfolders. The same subf ## Changing the output URL You might want to have a particular folder structure for your source files that changes for the built site. With [permalinks](/docs/permalinks) you have full control of the output URL. + +## Liquid Representation + +From Jekyll 4.1 onwards, there is a minor change in how instances of `Jekyll::Page` are exposed to layouts and other Liquid +templates. `Jekyll::Page` instances now use a `Liquid::Drop` instead of a `Hash`. This change results in greater performance +for a site with numerous *standlone pages not within a collection*. + +### For plugin developers + +While end-users do not need to take any extra action due to this change, plugin authors depending on the existing behavior *may* +need to make minor changes to their plugins. + +If a `Jekyll::Page` subclass' `to_liquid` method calls `super`, it will have to be slightly modified. +```ruby +class Foo::BarPage < Jekyll::Page + def to_liquid(*) + payload = super # This needs to be changed to `super.to_h` + # to obtain a Hash as in v4.0.0. + + do_something(payload) # Logic specific to `Foo::BarPage` objects + end +end +``` + +`Jekyll::Page` subclasses won't inherit the optimization automatically until the next major version. However, plugin authors +can opt-in to the optimization in their subclasses by wrapping the temporary `liquid_drop` method if the subclass doesn't +override the superclass method: +```ruby +class Foo::BarPage < Jekyll::Page + def to_liquid(*) + liquid_drop # Returns an instance of `Jekyll::Drops::PageDrop`. + # Will be removed in Jekyll 5.0. + end +end +``` diff --git a/lib/jekyll/drops/page_drop.rb b/lib/jekyll/drops/page_drop.rb new file mode 100644 index 00000000000..3a6e961367b --- /dev/null +++ b/lib/jekyll/drops/page_drop.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Jekyll + module Drops + class PageDrop < Drop + extend Forwardable + + mutable false + + def_delegators :@obj, :content, :dir, :name, :path, :url + private def_delegator :@obj, :data, :fallback_data + end + end +end diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index f353252d825..2e346fc5f25 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -70,6 +70,38 @@ def dir end end + # For backwards-compatibility in subclasses that do not redefine + # the `:to_liquid` method, stash existing definition under a new name + # + # TODO: Remove in Jekyll 5.0 + alias_method :legacy_to_liquid, :to_liquid + private :legacy_to_liquid + + # Private + # Subclasses can choose to optimize their `:to_liquid` method by wrapping + # it around this definition. + # + # TODO: Remove in Jekyll 5.0 + def liquid_drop + @liquid_drop ||= begin + defaults = site.frontmatter_defaults.all(relative_path, type) + unless defaults.empty? + Utils.deep_merge_hashes!(data, Utils.deep_merge_hashes!(defaults, data)) + end + Drops::PageDrop.new(self) + end + end + private :liquid_drop + + # Public + # + # Liquid representation of current page + # + # TODO: Remove optional parameter in Jekyll 5.0 + def to_liquid(attrs = nil) + self.class == Jekyll::Page ? liquid_drop : legacy_to_liquid(attrs) + end + # The full path and filename of the post. Defined in the YAML of the post # body. # diff --git a/test/test_page.rb b/test/test_page.rb index 16aa3ff90f3..023560c90e6 100644 --- a/test/test_page.rb +++ b/test/test_page.rb @@ -50,6 +50,42 @@ def do_render(page) assert_equal "/+/%25%23%20+.html", @page.url end + should "be exposed to Liquid as a Liquid::Drop subclass" do + page = setup_page("properties.html") + liquid_rep = page.to_liquid + refute_equal Hash, liquid_rep.class + assert_equal true, liquid_rep.is_a?(Liquid::Drop) + assert_equal Jekyll::Drops::PageDrop, liquid_rep.class + end + + should "make attributes accessible for use in Liquid templates" do + page = setup_page("/contacts", "index.html") + template = Liquid::Template.parse(<<~TEXT) + Name: {{ page.name }} + Path: {{ page.path }} + URL: {{ page.url }} + TEXT + expected = <<~TEXT + Name: index.html + Path: contacts/index.html + URL: /contacts/ + TEXT + assert_equal(expected, template.render!("page" => page.to_liquid)) + end + + should "make front matter data accessible for use in Liquid templates" do + page = setup_page("properties.html") + template = Liquid::Template.parse(<<~TEXT) + TITLE: {{ page.title }} + FOO: {{ page.foo }} + TEXT + expected = <<~TEXT + TITLE: Properties Page + FOO: bar + TEXT + assert_equal expected, template.render!("page" => page.to_liquid) + end + context "in a directory hierarchy" do should "create URL based on filename" do @page = setup_page("/contacts", "bar.html") diff --git a/test/test_page_without_a_file.rb b/test/test_page_without_a_file.rb index f06706962c2..6deca7b537c 100644 --- a/test/test_page_without_a_file.rb +++ b/test/test_page_without_a_file.rb @@ -76,6 +76,12 @@ def render_and_write end end end + + should "be exposed to Liquid as a Hash" do + liquid_rep = @page.to_liquid + refute_equal Jekyll::Drops::PageDrop, liquid_rep.class + assert_equal Hash, liquid_rep.class + end end context "with site-wide permalink configuration" do From ef6b382a480294185df652445529ea9b5ad96a4a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 26 Mar 2020 09:39:49 -0400 Subject: [PATCH 0274/1182] Update history to reflect merge of #7992 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index f4ba8338098..0d4708cf633 100644 --- a/History.markdown +++ b/History.markdown @@ -20,6 +20,7 @@ * Include _config.yml in a new theme's gemspec (#7865) * Add an option to easily disable disk-cache (#7928) * Optimize markdown parsing with Kramdown by reusing the options and parser objects (#8013) + * Add PageDrop to provide Liquid templates with data (#7992) ### Documentation From 237d08a76cc1bf36351e2aedd97fd3246b4c1fb2 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 26 Mar 2020 19:41:33 +0530 Subject: [PATCH 0275/1182] Optimize `Kramdown::JekyllDocument#to_html` calls (#8041) Merge pull request 8041 --- lib/jekyll/converters/markdown/kramdown_parser.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/jekyll/converters/markdown/kramdown_parser.rb b/lib/jekyll/converters/markdown/kramdown_parser.rb index aebd6ee7fef..8a5543c5ddd 100644 --- a/lib/jekyll/converters/markdown/kramdown_parser.rb +++ b/lib/jekyll/converters/markdown/kramdown_parser.rb @@ -53,6 +53,16 @@ def initialize(source, options = {}) @options = JekyllDocument.options @root, @warnings = JekyllDocument.parser.parse(source, @options) end + + # Use Kramdown::Converter::Html class to convert this document into HTML. + # + # The implementation is basically an optimized version of core logic in + # +Kramdown::Document#method_missing+ from kramdown-2.1.0. + def to_html + output, warnings = Kramdown::Converter::Html.convert(@root, @options) + @warnings.concat(warnings) + output + end end end From 7860d1bac0dcf313371a4b25ae7edf5b5a928777 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 26 Mar 2020 10:11:35 -0400 Subject: [PATCH 0276/1182] Update history to reflect merge of #8041 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 0d4708cf633..76afe05ef17 100644 --- a/History.markdown +++ b/History.markdown @@ -21,6 +21,7 @@ * Add an option to easily disable disk-cache (#7928) * Optimize markdown parsing with Kramdown by reusing the options and parser objects (#8013) * Add PageDrop to provide Liquid templates with data (#7992) + * Optimize `Kramdown::JekyllDocument#to_html` calls (#8041) ### Documentation From e972065325bc96bcd2bcd9a651cd0f61d4b2b8d7 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 29 Mar 2020 22:10:28 +0530 Subject: [PATCH 0277/1182] Reduce Pathname objects from front matter defaults (#8067) Merge pull request 8067 --- lib/jekyll/frontmatter_defaults.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb index 21e3cc6faf1..a7d7975cf84 100644 --- a/lib/jekyll/frontmatter_defaults.rb +++ b/lib/jekyll/frontmatter_defaults.rb @@ -103,15 +103,15 @@ def applies?(scope, path, type) end def applies_path?(scope, path) - return true if !scope.key?("path") || scope["path"].empty? + rel_scope_path = scope["path"] + return true if !rel_scope_path.is_a?(String) || rel_scope_path.empty? - sanitized_path = Pathname.new(sanitize_path(path)) - rel_scope_path = Pathname.new(scope["path"]) + sanitized_path = sanitize_path(path) - if scope["path"].to_s.include?("*") + if rel_scope_path.include?("*") glob_scope(sanitized_path, rel_scope_path) else - path_is_subpath?(sanitized_path, strip_collections_dir(scope["path"])) + path_is_subpath?(sanitized_path, strip_collections_dir(rel_scope_path)) end end @@ -134,11 +134,7 @@ def glob_cache(path) end def path_is_subpath?(path, parent_path) - path.ascend do |ascended_path| - return true if ascended_path.to_s == parent_path.to_s - end - - false + path.start_with?(parent_path) end def strip_collections_dir(path) From 8d3c2f6a96d4324fb7d61218a225a3bc35ed6113 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 29 Mar 2020 12:40:30 -0400 Subject: [PATCH 0278/1182] Update history to reflect merge of #8067 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 76afe05ef17..a8f35498f2f 100644 --- a/History.markdown +++ b/History.markdown @@ -93,6 +93,7 @@ * chore: simplify require for Jekyll::VERSION (#8057) * Remove version-constraint relaxation for i18n gem (#8055) * Mirror `spec.homepage` as `metadata["homepage_uri"]` (#8056) + * Reduce Pathname objects from front matter defaults (#8067) ### Site Enhancements From 09c448449e1b2e3edf5ad4b852877a952148c63d Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 30 Mar 2020 01:41:17 +0530 Subject: [PATCH 0279/1182] Add default front matter for tutorials collection (#8081) Merge pull request 8081 --- docs/_config.yml | 6 ++++++ docs/_tutorials/{cache_api.md => cache-api.md} | 2 -- ...existing-site-to-jekyll.md => convert-site-to-jekyll.md} | 2 -- docs/_tutorials/custom-404-page.md | 2 -- docs/_tutorials/index.md | 1 - docs/_tutorials/navigation.md | 2 -- docs/_tutorials/orderofinterpretation.md | 2 -- docs/_tutorials/using-jekyll-with-bundler.md | 2 -- docs/_tutorials/video-walkthroughs.md | 2 -- 9 files changed, 6 insertions(+), 15 deletions(-) rename docs/_tutorials/{cache_api.md => cache-api.md} (98%) rename docs/_tutorials/{convert-existing-site-to-jekyll.md => convert-site-to-jekyll.md} (99%) diff --git a/docs/_config.yml b/docs/_config.yml index bec8b14f035..80e58d301b5 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -18,6 +18,7 @@ collections: permalink: "/news/:year/:month/:day/:title/" output: true tutorials: + permalink: "/:collection/:path/" output: true defaults: - scope: @@ -30,6 +31,11 @@ defaults: type: posts values: layout: news_item +- scope: + path: _tutorials + type: tutorials + values: + layout: tutorials - scope: path: '' values: diff --git a/docs/_tutorials/cache_api.md b/docs/_tutorials/cache-api.md similarity index 98% rename from docs/_tutorials/cache_api.md rename to docs/_tutorials/cache-api.md index 84a7d047d6e..491572df704 100644 --- a/docs/_tutorials/cache_api.md +++ b/docs/_tutorials/cache-api.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/cache-api/ title: Cache API --- diff --git a/docs/_tutorials/convert-existing-site-to-jekyll.md b/docs/_tutorials/convert-site-to-jekyll.md similarity index 99% rename from docs/_tutorials/convert-existing-site-to-jekyll.md rename to docs/_tutorials/convert-site-to-jekyll.md index 650006744ce..f90b3bdf534 100644 --- a/docs/_tutorials/convert-existing-site-to-jekyll.md +++ b/docs/_tutorials/convert-site-to-jekyll.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/convert-site-to-jekyll/ title: Convert an HTML site to Jekyll --- diff --git a/docs/_tutorials/custom-404-page.md b/docs/_tutorials/custom-404-page.md index d739735d190..29e93420007 100644 --- a/docs/_tutorials/custom-404-page.md +++ b/docs/_tutorials/custom-404-page.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/custom-404-page/ title: Custom 404 Page --- diff --git a/docs/_tutorials/index.md b/docs/_tutorials/index.md index 4deb89bcf98..8f5e8211817 100644 --- a/docs/_tutorials/index.md +++ b/docs/_tutorials/index.md @@ -1,5 +1,4 @@ --- -layout: tutorials title: Tutorials permalink: /tutorials/home/ redirect_from: /tutorials/index.html diff --git a/docs/_tutorials/navigation.md b/docs/_tutorials/navigation.md index c1c86a259b8..2ba30ab0ba0 100644 --- a/docs/_tutorials/navigation.md +++ b/docs/_tutorials/navigation.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/navigation/ title: Navigation --- diff --git a/docs/_tutorials/orderofinterpretation.md b/docs/_tutorials/orderofinterpretation.md index e5aa4ea6f0b..d938564e89c 100644 --- a/docs/_tutorials/orderofinterpretation.md +++ b/docs/_tutorials/orderofinterpretation.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/orderofinterpretation/ title: Order of interpretation --- diff --git a/docs/_tutorials/using-jekyll-with-bundler.md b/docs/_tutorials/using-jekyll-with-bundler.md index 73e77679469..bfc6c6a7fc6 100644 --- a/docs/_tutorials/using-jekyll-with-bundler.md +++ b/docs/_tutorials/using-jekyll-with-bundler.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/using-jekyll-with-bundler/ title: Using Jekyll with Bundler --- diff --git a/docs/_tutorials/video-walkthroughs.md b/docs/_tutorials/video-walkthroughs.md index 635b883fa6d..55cfe99fab8 100644 --- a/docs/_tutorials/video-walkthroughs.md +++ b/docs/_tutorials/video-walkthroughs.md @@ -1,6 +1,4 @@ --- -layout: tutorials -permalink: /tutorials/video-walkthroughs/ title: Video Walkthroughs --- From f7bff1c5c4c3f9300c6e434b7ad6919dcd5a0372 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 29 Mar 2020 16:11:19 -0400 Subject: [PATCH 0280/1182] Update history to reflect merge of #8081 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index a8f35498f2f..f5bb90945ec 100644 --- a/History.markdown +++ b/History.markdown @@ -70,6 +70,7 @@ * Non-deprecated `vendor/bundle` path configuration (#8048) * Update 09-collections.md (#8060) * Remove extra paragraph tags (#8063) + * Add default front matter for tutorials collection (#8081) ### Development Fixes From 6bc27f9fdf290544e7e12083a9321ae0666bfd93 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 30 Mar 2020 20:06:37 +0530 Subject: [PATCH 0281/1182] Quicker categories for documents without superdirs (#7987) Merge pull request 7987 --- lib/jekyll/document.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 0c7b2f67b51..6622d2a3c24 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -414,9 +414,13 @@ def respond_to_missing?(method, *) # # Returns nothing. def categories_from_path(special_dir) - superdirs = relative_path.sub(Document.superdirs_regex(special_dir), "") - superdirs = superdirs.split(File::SEPARATOR) - superdirs.reject! { |c| c.empty? || c == special_dir || c == basename } + if relative_path.start_with?(special_dir) + superdirs = [] + else + superdirs = relative_path.sub(Document.superdirs_regex(special_dir), "") + superdirs = superdirs.split(File::SEPARATOR) + superdirs.reject! { |c| c.empty? || c == special_dir || c == basename } + end merge_data!({ "categories" => superdirs }, :source => "file path") end From 539e712c414f93f1c12e10fb75511d51cb22760a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 30 Mar 2020 10:36:40 -0400 Subject: [PATCH 0282/1182] Update history to reflect merge of #7987 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index f5bb90945ec..73789d2dcb7 100644 --- a/History.markdown +++ b/History.markdown @@ -95,6 +95,7 @@ * Remove version-constraint relaxation for i18n gem (#8055) * Mirror `spec.homepage` as `metadata["homepage_uri"]` (#8056) * Reduce Pathname objects from front matter defaults (#8067) + * Quicker categories for documents without superdirs (#7987) ### Site Enhancements From f0ab09968ed666069c701febe9d87ce92110c2ee Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 30 Mar 2020 20:14:04 +0530 Subject: [PATCH 0283/1182] Reduce array allocations from `StaticFile#path` (#8083) Merge pull request 8083 --- lib/jekyll/static_file.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 9f988a7b0bd..d3a9b8591cd 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -40,11 +40,13 @@ def initialize(site, base, dir, name, collection = nil) # Returns source file path. def path - # Static file is from a collection inside custom collections directory - if !@collection.nil? && !@site.config["collections_dir"].empty? - File.join(*[@base, @site.config["collections_dir"], @dir, @name].compact) - else - File.join(*[@base, @dir, @name].compact) + @path ||= begin + # Static file is from a collection inside custom collections directory + if !@collection.nil? && !@site.config["collections_dir"].empty? + File.join(*[@base, @site.config["collections_dir"], @dir, @name].compact) + else + File.join(*[@base, @dir, @name].compact) + end end end From 9614cb67d427bb89443ad0ada890a98702311411 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 30 Mar 2020 10:44:07 -0400 Subject: [PATCH 0284/1182] Update history to reflect merge of #8083 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 73789d2dcb7..6bc4f22a359 100644 --- a/History.markdown +++ b/History.markdown @@ -12,6 +12,7 @@ * Allow multiple binary operators in where_exp filter (#8047) * Fix documents custom-ordering logic (#8028) * Use `layout.path` when rendering the Liquid layout (#8069) + * Reduce array allocations from `StaticFile#path` (#8083) ### Minor Enhancements From 1412928dde0f24731489acbfa03eb1f717bce9b9 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 1 Apr 2020 14:21:24 +0530 Subject: [PATCH 0285/1182] Bump RuboCop to v0.81.x --- .rubocop.yml | 4 ++++ Gemfile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index b49da571bf6..07ce3243190 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -40,6 +40,10 @@ Layout/EmptyComment: Enabled: false Layout/EndAlignment: Severity: error +Lint/RaiseException: + Enabled: true +Lint/StructNewOverride: + Enabled: true Lint/UnreachableCode: Severity: error Lint/Void: diff --git a/Gemfile b/Gemfile index 3026f996e58..4203dcae640 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ group :test do gem "nokogiri", "~> 1.7" gem "rspec" gem "rspec-mocks" - gem "rubocop", "~> 0.80.0" + gem "rubocop", "~> 0.81.0" gem "rubocop-performance" gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__) gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__) From bc9774561b5d2a634619758aec9e8f0e7d3709db Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 1 Apr 2020 18:11:30 +0530 Subject: [PATCH 0286/1182] Utilize relative_url filter in documentation site (#8089) Merge pull request 8089 --- docs/_docs/assets.md | 2 +- docs/_docs/collections.md | 4 ++-- docs/_docs/community/community.md | 12 ++++++------ docs/_docs/configuration.md | 16 ++++++++-------- docs/_docs/configuration/environments.md | 2 +- .../_docs/configuration/front-matter-defaults.md | 8 +++++--- docs/_docs/configuration/options.md | 7 ++++--- docs/_docs/contributing.md | 2 +- docs/_docs/datafiles.md | 4 ++-- docs/_docs/deployment.md | 6 +++--- docs/_docs/deployment/automated.md | 6 +++--- docs/_docs/front-matter.md | 11 ++++++----- docs/_docs/github-pages.md | 8 ++++---- docs/_docs/index.md | 10 +++++----- docs/_docs/installation.md | 8 ++++---- docs/_docs/installation/macos.md | 4 ++-- docs/_docs/installation/windows.md | 3 ++- docs/_docs/liquid.md | 4 ++-- docs/_docs/liquid/tags.md | 4 ++-- docs/_docs/plugins.md | 16 ++++++++-------- docs/_includes/docs_contents.html | 2 +- docs/_includes/docs_contents_mobile.html | 2 +- docs/_includes/footer.html | 4 ++-- docs/_includes/header.html | 4 ++-- docs/_includes/mobile-nav-items.html | 2 +- docs/_includes/news_contents.html | 10 +++++----- docs/_includes/news_contents_mobile.html | 4 ++-- docs/_includes/news_item.html | 2 +- docs/_includes/news_item_archive.html | 2 +- docs/_includes/primary-nav-items.html | 2 +- docs/_includes/section_nav_tutorials.html | 4 ++-- docs/_includes/top.html | 12 ++++++------ docs/_includes/tutorials_contents.html | 2 +- docs/_includes/tutorials_contents_mobile.html | 2 +- docs/_layouts/news_item.html | 2 +- docs/_tutorials/index.md | 2 +- docs/pages/404.html | 8 ++++---- docs/pages/index.html | 6 +++--- docs/pages/resources.md | 4 ++-- docs/pages/showcase.html | 4 ++-- 40 files changed, 111 insertions(+), 106 deletions(-) diff --git a/docs/_docs/assets.md b/docs/_docs/assets.md index ee4e698b39b..2090414867d 100644 --- a/docs/_docs/assets.md +++ b/docs/_docs/assets.md @@ -28,7 +28,7 @@ will process it and put it in your site's destination folder under
    Jekyll processes all Liquid filters and tags in asset files

    If you are using Mustache or another JavaScript templating language that conflicts with - the Liquid template syntax, you + the Liquid template syntax, you will need to place {% raw %} and {% endraw %} tags around your code.

    diff --git a/docs/_docs/collections.md b/docs/_docs/collections.md index 4e591d3b587..9e4ea99569e 100644 --- a/docs/_docs/collections.md +++ b/docs/_docs/collections.md @@ -51,7 +51,7 @@ information, see the section Output. Create a corresponding folder (e.g. `/_staff_members`) and add documents. Front matter is processed if the front matter exists, and everything after the front matter is pushed into the document's `content` attribute. If no front -matter is provided, Jekyll will consider it to be a [static file](/docs/static-files/) +matter is provided, Jekyll will consider it to be a [static file]({{ '/docs/static-files/' | relative_url }}) and the contents will not undergo further processing. If front matter is provided, Jekyll will process the file contents into the expected output. @@ -126,7 +126,7 @@ You can link to the generated page using the `url` attribute: ## Permalinks -There are special [permalink variables for collections](/docs/permalinks/) to +There are special [permalink variables for collections]({{ '/docs/permalinks/' | relative_url }}) to help you control the output url for the entire collection. ## Custom Sorting of Documents diff --git a/docs/_docs/community/community.md b/docs/_docs/community/community.md index 7176dfe5b77..273bff7c48d 100644 --- a/docs/_docs/community/community.md +++ b/docs/_docs/community/community.md @@ -8,13 +8,13 @@ redirect_from: "/help/index.html" 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. -Read the full [code of conduct](/docs/conduct/) +Read the full [code of conduct]({{ '/docs/conduct/' | relative_url }}) ## Where to get support If you're looking for support for Jekyll, there are a lot of options: -* Read the [Jekyll Documentation](https://jekyllrb.com/docs/) +* Read the [Jekyll Documentation]({{ '/docs/' | relative_url }}) * If you have a question about using Jekyll, start a discussion on the [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll) * Chat with Jekyllers — Join our [Gitter channel](https://gitter.im/jekyll/jekyll) or our [IRC channel on Freenode](irc:irc.freenode.net/jekyll) @@ -24,13 +24,13 @@ There are a bunch of helpful community members on these services that should be ## Ways to contribute -* [How to Contribute](/docs/contributing/) -* [How to file a bug](/docs/community/bug/) -* [Guide for maintaining Jekyll](/docs/maintaining/) +* [How to Contribute]({{ '/docs/contributing/' | relative_url }}) +* [How to file a bug]({{ '/docs/community/bug/' | relative_url }}) +* [Guide for maintaining Jekyll]({{ '/docs/maintaining/' | relative_url }}) ## Jekyllconf -[Watch videos](/jekyllconf/) from members of the Jekyll community speak about interesting use cases, tricks they’ve learned or meta Jekyll topics. +[Watch videos]({{ '/jekyllconf/' | relative_url }}) from members of the Jekyll community speak about interesting use cases, tricks they’ve learned or meta Jekyll topics. ## Jekyll on Twitter diff --git a/docs/_docs/configuration.md b/docs/_docs/configuration.md index 1f7660cbf17..b542bd97de9 100644 --- a/docs/_docs/configuration.md +++ b/docs/_docs/configuration.md @@ -8,11 +8,11 @@ options can either be specified in a `_config.yml` or `_config.toml` file placed in your site’s root directory, or can be specified as flags for the `jekyll` executable in the terminal. -* [Configuration Options](/docs/configuration/options/) -* [Default Configuration](/docs/configuration/default/) -* [Front Matter Defaults](/docs/configuration/front-matter-defaults/) -* [Environments](/docs/configuration/environments/) -* [Markdown Options](/docs/configuration/markdown/) -* [Liquid Options](/docs/configuration/liquid/) -* [Webrick Options](/docs/configuration/webrick/) -* [Incremental Regeneration](/docs/configuration/incremental-regeneration/) +* [Configuration Options]({{ '/docs/configuration/options/' | relative_url }}) +* [Default Configuration]({{ '/docs/configuration/default/' | relative_url }}) +* [Front Matter Defaults]({{ '/docs/configuration/front-matter-defaults/' | relative_url }}) +* [Environments]({{ '/docs/configuration/environments/' | relative_url }}) +* [Markdown Options]({{ '/docs/configuration/markdown/' | relative_url }}) +* [Liquid Options]({{ '/docs/configuration/liquid/' | relative_url }}) +* [Webrick Options]({{ '/docs/configuration/webrick/' | relative_url }}) +* [Incremental Regeneration]({{ '/docs/configuration/incremental-regeneration/' | relative_url }}) diff --git a/docs/_docs/configuration/environments.md b/docs/_docs/configuration/environments.md index 95250cc854a..6b06c84c75f 100644 --- a/docs/_docs/configuration/environments.md +++ b/docs/_docs/configuration/environments.md @@ -44,6 +44,6 @@ values in your configuration files when moving from one environment to another. {: .note} To switch part of your config settings depending on the environment, use the -build command option, +build command option, for example --config _config.yml,_config_development.yml. Settings in later files override settings in earlier files. diff --git a/docs/_docs/configuration/front-matter-defaults.md b/docs/_docs/configuration/front-matter-defaults.md index 2f19954efdb..5f7355e1327 100644 --- a/docs/_docs/configuration/front-matter-defaults.md +++ b/docs/_docs/configuration/front-matter-defaults.md @@ -30,7 +30,7 @@ defaults: during automatic regeneration are not loaded until the next execution.

    - Note Data Files are included and reloaded during automatic regeneration. + Note Data Files are included and reloaded during automatic regeneration.

    @@ -68,7 +68,9 @@ defaults: author: "Mr. Hyde" ``` -With these defaults, all pages would use the `my-site` layout. Any html files that exist in the `projects/` folder will use the `project` layout, if it exists. Those files will also have the `page.author` [liquid variable](/docs/variables/) set to `Mr. Hyde`. +With these defaults, all pages would use the `my-site` layout. Any html files that exist in the `projects/` +folder will use the `project` layout, if it exists. Those files will also have the `page.author` +[liquid variable]({{ '/docs/variables/' | relative_url }}) set to `Mr. Hyde`. ```yaml collections: @@ -85,7 +87,7 @@ defaults: ``` In this example, the `layout` is set to `default` inside the -[collection](/docs/collections/) with the name `my_collection`. +[collection]({{ '/docs/collections/' | relative_url }}) with the name `my_collection`. ### Glob patterns in Front Matter defaults diff --git a/docs/_docs/configuration/options.md b/docs/_docs/configuration/options.md index 1a5e96f01b5..90bfaff1478 100644 --- a/docs/_docs/configuration/options.md +++ b/docs/_docs/configuration/options.md @@ -150,12 +150,12 @@ class="flag">flags (specified on the command-line) that control them.

    Defaults

    - Set defaults for front matter + Set defaults for front matter variables.

    -

    see below

    +

    see below

    @@ -247,7 +247,8 @@ class="flag">flags (specified on the command-line) that control them.

    LSI

    -

    Produce an index for related posts. Requires the classifier-reborn plugin.

    +

    Produce an index for related posts. Requires the + classifier-reborn plugin.

    lsi: BOOL

    diff --git a/docs/_docs/contributing.md b/docs/_docs/contributing.md index d22dc861e3c..b1a5b7d241d 100644 --- a/docs/_docs/contributing.md +++ b/docs/_docs/contributing.md @@ -8,7 +8,7 @@ Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is a ## Where to get help or report a problem -See the [support guidelines](https://jekyllrb.com/docs/support/) +See the [support guidelines]({{ '/docs/support/' | relative_url }}) ## Ways to contribute diff --git a/docs/_docs/datafiles.md b/docs/_docs/datafiles.md index 9a9961c75f2..7050512c6ab 100644 --- a/docs/_docs/datafiles.md +++ b/docs/_docs/datafiles.md @@ -3,7 +3,7 @@ title: Data Files permalink: /docs/datafiles/ --- -In addition to the [built-in variables](../variables/) available from Jekyll, +In addition to the [built-in variables]({{'/docs/variables/' | relative_url }}) available from Jekyll, you can specify your own custom data that can be accessed via the [Liquid templating system](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers). @@ -147,4 +147,4 @@ author: dave ``` {% endraw %} -For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation](/tutorials/navigation). +For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation]({{ '/tutorials/navigation/' | relative_url }}). diff --git a/docs/_docs/deployment.md b/docs/_docs/deployment.md index d6e841c0ae9..45722e4e93c 100644 --- a/docs/_docs/deployment.md +++ b/docs/_docs/deployment.md @@ -6,6 +6,6 @@ redirect_from: "/docs/deployment-methods/index.html" Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. Here's some of the most common ways: -* [Manually](/docs/deployment/manual/) -* [Automated](/docs/deployment/automated/) -* [Third Party](/docs/deployment/third-party/) +* [Manually]({{ '/docs/deployment/manual/' | relative_url }}) +* [Automated]({{ '/docs/deployment/automated/' | relative_url }}) +* [Third Party]({{ '/docs/deployment/third-party/' | relative_url }}) diff --git a/docs/_docs/deployment/automated.md b/docs/_docs/deployment/automated.md index 0e68e90f17e..ac6ac49bae4 100644 --- a/docs/_docs/deployment/automated.md +++ b/docs/_docs/deployment/automated.md @@ -15,9 +15,9 @@ service of your choice. We have guides for the following providers: -* [Travis CI](/docs/continuous-integration/travis-ci/) -* [CircleCI](/docs/continuous-integration/circleci/) -* [Buddy](/docs/continuous-integration/buddyworks/) +* [Travis CI]({{ '/docs/continuous-integration/travis-ci/' | relative_url }}) +* [CircleCI]({{ '/docs/continuous-integration/circleci/' | relative_url }}) +* [Buddy]({{ '/docs/continuous-integration/buddyworks/' | relative_url }}) ## Git post-receive hook diff --git a/docs/_docs/front-matter.md b/docs/_docs/front-matter.md index a3deb697193..f7700bb8d83 100644 --- a/docs/_docs/front-matter.md +++ b/docs/_docs/front-matter.md @@ -28,14 +28,14 @@ relies on. If you use UTF-8 encoding, make sure that no BOM header characters exist in your files or very, very bad things will happen to Jekyll. This is especially relevant if you’re running - Jekyll on Windows. + Jekyll on Windows.

    Front Matter Variables Are Optional

    - If you want to use Liquid tags and variables + If you want to use Liquid tags and variables but don’t need anything in your front matter, just leave it empty! The set of triple-dashed lines with nothing in between will still get Jekyll to process your file. (This is useful for things like CSS and RSS feeds!) @@ -72,7 +72,7 @@ front matter of a page or post.

  • Using null will produce a file without using a layout file. This is overridden if the file is a post/document and has a - layout defined in the + layout defined in the front matter defaults.
  • @@ -117,7 +117,7 @@ front matter of a page or post.
    Render Posts Marked As Unpublished

    To preview unpublished pages, run `jekyll serve` or `jekyll build` - with the `--unpublished` switch. Jekyll also has a handy drafts + with the `--unpublished` switch. Jekyll also has a handy drafts feature tailored specifically for blog posts.

  • @@ -204,7 +204,8 @@ These are available out-of-the-box to be used in the front matter for a post.
    Don't repeat yourself

    If you don't want to repeat your frequently used front matter variables - over and over, define defaults + over and over, define + defaults for them and only override them where necessary (or not at all). This works both for predefined and custom variables.

    diff --git a/docs/_docs/github-pages.md b/docs/_docs/github-pages.md index 3aed957ddf4..5f51e9da02a 100644 --- a/docs/_docs/github-pages.md +++ b/docs/_docs/github-pages.md @@ -58,12 +58,12 @@ Be sure to run `bundle update` often. Sometimes it's nice to preview your Jekyll site before you push your `gh-pages` branch to GitHub. The subdirectory-like URL structure GitHub uses for Project Pages complicates the proper resolution of URLs. In order to assure your -site builds properly, use the handy [URL filters](/docs/liquid/filters/): +site builds properly, use the handy [URL filters]({{ '/docs/liquid/filters/' | relative_url }}): {% raw %} ```liquid - + [{{ page.title }}]("{{ page.url | relative_url }}") ``` @@ -122,7 +122,7 @@ to see more detailed examples.
    Source files must be in the root directory

    GitHub Pages overrides - the “Site Source” + the “Site Source” configuration value, so if you locate your files anywhere other than the root directory, your site may not build correctly.

    @@ -135,6 +135,6 @@ to see more detailed examples. While Windows is not officially supported, it is possible to install the github-pages gem on Windows. Special instructions can be found on our - Windows-specific docs page. + Windows-specific docs page.

    diff --git a/docs/_docs/index.md b/docs/_docs/index.md index e46da606454..ab373c916d8 100644 --- a/docs/_docs/index.md +++ b/docs/_docs/index.md @@ -13,12 +13,12 @@ site, and more. ## Prerequisites -See [requirements](/docs/installation/#requirements). +See [requirements]({{ '/docs/installation/#requirements' | relative_url }}). ## Instructions -1. Install a full [Ruby development environment](/docs/installation/). -2. Install Jekyll and [bundler](/docs/ruby-101/#bundler) [gems](/docs/ruby-101/#gems). +1. Install a full [Ruby development environment]({{ '/docs/installation/' | relative_url }}). +2. Install Jekyll and [bundler]({{ '/docs/ruby-101/#bundler' | relative_url }}) [gems]({{ '/docs/ruby-101/#gems' | relative_url }}). ``` gem install jekyll bundler ``` @@ -37,6 +37,6 @@ bundle exec jekyll serve 6. Browse to [http://localhost:4000](http://localhost:4000){:target="_blank"} If you encounter any errors during this process, see the -[troubleshooting](/docs/troubleshooting/#configuration-problems) page. Also, +[troubleshooting]({{ '/docs/troubleshooting/#configuration-problems' | relative_url }}) page. Also, make sure you've installed the development headers and other prerequisites as -mentioned on the [requirements](/docs/installation/#requirements) page. +mentioned on the [requirements]({{ '/docs/installation/#requirements' | relative_url }}) page. diff --git a/docs/_docs/installation.md b/docs/_docs/installation.md index 70c251746a9..76cf42888fe 100644 --- a/docs/_docs/installation.md +++ b/docs/_docs/installation.md @@ -16,7 +16,7 @@ Jekyll is a [Ruby Gem](/docs/ruby-101/#gems) that can be installed on most syste For detailed install instructions have a look at the guide for your operating system. -* [macOS](/docs/installation/macos/) -* [Ubuntu Linux](/docs/installation/ubuntu/) -* [Other Linux distros](/docs/installation/other-linux) -* [Windows](/docs/installation/windows/) \ No newline at end of file +* [macOS]({{ '/docs/installation/macos/' | relative_url }}) +* [Ubuntu Linux]({{ '/docs/installation/ubuntu/' | relative_url }}) +* [Other Linux distros]({{ '/docs/installation/other-linux/' | relative_url }}) +* [Windows]({{ '/docs/installation/windows/' | relative_url }}) \ No newline at end of file diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 836c8e77772..162c6f09c56 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -77,7 +77,7 @@ That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#c ## Install Jekyll -Now all that is left is installing [Bundler](/docs/ruby-101/#bundler) and Jekyll. +Now all that is left is installing [Bundler]({{ '/docs/ruby-101/#bundler' | relative_url }}) and Jekyll. ### Local Install @@ -133,4 +133,4 @@ sudo gem install bundler jekyll ## Problems? -Check out the [troubleshooting](/docs/troubleshooting/) page or [ask for help on our forum](https://talk.jekyllrb.com). +Check out the [troubleshooting]({{ '/docs/troubleshooting/' | relative_url }}) page or [ask for help on our forum](https://talk.jekyllrb.com). diff --git a/docs/_docs/installation/windows.md b/docs/_docs/installation/windows.md index e564edde35f..f3a5160b0d3 100644 --- a/docs/_docs/installation/windows.md +++ b/docs/_docs/installation/windows.md @@ -87,7 +87,8 @@ with the current date in the filename.
    Non-superuser account issues

    If the `jekyll new` command prints the error "Your user account isn't allowed to install to the system RubyGems", see - the "Running Jekyll as Non-Superuser" instructions in Troubleshooting.

    + the "Running Jekyll as Non-Superuser" instructions in + Troubleshooting.

    {: .note .info} diff --git a/docs/_docs/liquid.md b/docs/_docs/liquid.md index d09ba99b535..9dead2b8b7c 100644 --- a/docs/_docs/liquid.md +++ b/docs/_docs/liquid.md @@ -15,5 +15,5 @@ out the [official Liquid Documentation](https://shopify.github.io/liquid/). Jekyll provides a number of useful Liquid additions to help you build your site: -* [Filters](/docs/liquid/filters/) -* [Tags](/docs/liquid/tags/) +* [Filters]({{ '/docs/liquid/filters/' | relative_url }}) +* [Tags]({{ '/docs/liquid/tags/' | relative_url }}) diff --git a/docs/_docs/liquid/tags.md b/docs/_docs/liquid/tags.md index a813cd9c5d4..c21f7a01090 100644 --- a/docs/_docs/liquid/tags.md +++ b/docs/_docs/liquid/tags.md @@ -5,12 +5,12 @@ permalink: "/docs/liquid/tags/" All of the standard Liquid [tags](https://shopify.github.io/liquid/tags/control-flow/) are supported. Jekyll has a few built in tags to help you build your site. You can also create -your own tags using [plugins](/docs/plugins/). +your own tags using [plugins]({{ '/docs/plugins/' | relative_url }}). ## Includes If you have page snippets that you use repeatedly across your site, an -[include](/docs/includes/) is the perfect way to make this more maintainable. +[include]({{ '/docs/includes/' | relative_url }}) is the perfect way to make this more maintainable. ## Code snippet highlighting diff --git a/docs/_docs/plugins.md b/docs/_docs/plugins.md index b53ed8d65e0..79a30d3c01d 100644 --- a/docs/_docs/plugins.md +++ b/docs/_docs/plugins.md @@ -7,11 +7,11 @@ Jekyll has a plugin system with hooks that allow you to create custom generated content specific to your site. You can run custom code for your site without having to modify the Jekyll source itself. -* [Installation](/docs/plugins/installation/) - How to install plugins -* [Your first plugin](/docs/plugins/your-first-plugin/) - How to write plugins -* [Generators](/docs/plugins/generators/) - Create additional content on your site -* [Converters](/docs/plugins/converters/) - Change a markup language into another format -* [Commands](/docs/plugins/commands/) - Extend the `jekyll` executable with subcommands -* [Tags](/docs/plugins/tags) - Create custom Liquid tags -* [Filters](/docs/plugins/filters/) - Create custom Liquid filters -* [Hooks](/docs/plugins/hooks/) - Fine-grained control to extend the build process +* [Installation]({{ '/docs/plugins/installation/' | relative_url }}) - How to install plugins +* [Your first plugin]({{ '/docs/plugins/your-first-plugin/' | relative_url }}) - How to write plugins +* [Generators]({{ '/docs/plugins/generators/' | relative_url }}) - Create additional content on your site +* [Converters]({{ '/docs/plugins/converters/' | relative_url }}) - Change a markup language into another format +* [Commands]({{ '/docs/plugins/commands/' | relative_url }}) - Extend the `jekyll` executable with subcommands +* [Tags]({{ '/docs/plugins/tags/' | relative_url }}) - Create custom Liquid tags +* [Filters]({{ '/docs/plugins/filters/' | relative_url }}) - Create custom Liquid filters +* [Hooks]({{ '/docs/plugins/hooks/' | relative_url }}) - Fine-grained control to extend the build process diff --git a/docs/_includes/docs_contents.html b/docs/_includes/docs_contents.html index 4c004fe278e..f46df08f960 100644 --- a/docs/_includes/docs_contents.html +++ b/docs/_includes/docs_contents.html @@ -5,7 +5,7 @@

    {{ section.title }}

      {%- for item in section.docs -%} {%- assign p = site.documents | where: "url", item.link | first %} -
    • +
    • {{- p.menu_name | default: p.title -}}
    • {%- endfor %} diff --git a/docs/_includes/docs_contents_mobile.html b/docs/_includes/docs_contents_mobile.html index 5df8039fec4..b259744d2c4 100644 --- a/docs/_includes/docs_contents_mobile.html +++ b/docs/_includes/docs_contents_mobile.html @@ -5,7 +5,7 @@ {%- for item in section.docs -%} {% assign p = site.documents | where: "url", item.link | first %} - {%- endfor %} diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html index 7e28b8edde6..6c2a8b49f90 100644 --- a/docs/_includes/footer.html +++ b/docs/_includes/footer.html @@ -1,14 +1,14 @@

      Proudly hosted by - GitHub • Social coding + GitHub • Social coding

      diff --git a/docs/_includes/header.html b/docs/_includes/header.html index b38a89ec25f..b03a850dc6a 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -2,9 +2,9 @@
      diff --git a/docs/_includes/mobile-nav-items.html b/docs/_includes/mobile-nav-items.html index 6b9b0062a55..5dd9b86d206 100644 --- a/docs/_includes/mobile-nav-items.html +++ b/docs/_includes/mobile-nav-items.html @@ -7,7 +7,7 @@ {% else -%} {%- if page.url contains p.link %} class="current" {% endif -%} {% endif -%} - >{{ p.title }} + >{{ p.title }} {% endif -%} {% endfor -%}
    • GitHub
    • diff --git a/docs/_includes/news_contents.html b/docs/_includes/news_contents.html index d717b20dd12..ea0a558e401 100644 --- a/docs/_includes/news_contents.html +++ b/docs/_includes/news_contents.html @@ -2,21 +2,21 @@
    diff --git a/docs/_includes/section_nav_tutorials.html b/docs/_includes/section_nav_tutorials.html index 8d665f5139b..7a684b644b7 100644 --- a/docs/_includes/section_nav_tutorials.html +++ b/docs/_includes/section_nav_tutorials.html @@ -20,7 +20,7 @@ {% else -%} {% assign previous = forloop.index0 | minus: 1 -%} {% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" -%} - + {% endif -%}
    @@ -29,7 +29,7 @@ {% else -%} {% assign next = forloop.index0 | plus: 1 -%} {% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" -%} - + {% endif -%}
    diff --git a/docs/_includes/top.html b/docs/_includes/top.html index 0cce753ff94..c0e203c33f4 100644 --- a/docs/_includes/top.html +++ b/docs/_includes/top.html @@ -4,13 +4,13 @@ {% feed_meta %} - + - - - - - + + + + + {% seo %} + +
    If you see a bunch of garbage + +If it relates to a ... +
    well-formed pattern + +See if there's a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it. + +If not, try writing one and adding it to the `patterns.txt` file. + +Patterns are Perl 5 Regular Expressions - you can [test]( +https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. + +Note that patterns can't match multiline strings. +
    +
    binary-ish string + +Please add a file path to the `excludes.txt` file instead of just accepting the garbage. + +File paths are Perl 5 Regular Expressions - you can [test]( +https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. + +`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( +../tree/HEAD/README.md) (on whichever branch you're using). +
    + +
    diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt new file mode 100644 index 00000000000..0d035882ec3 --- /dev/null +++ b/.github/actions/spelling/excludes.txt @@ -0,0 +1,31 @@ +# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes +(?:^|/)(?i)COPYRIGHT +(?:^|/)(?i)LICEN[CS]E +(?:^|/)package(?:-lock|)\.json$ +(?:^|/)vendor/ +/fonts/ +ignore$ +\.avi$ +\.eot$ +\.ico$ +\.jpe?g$ +\.lock$ +\.map$ +\.min\. +\.mod$ +\.mp[34]$ +\.png$ +\.svg$ +\.ttf$ +\.wav$ +\.woff$ +\.woff2$ +^docs/pages/redirects/github\.html$ +^lib/jekyll/mime\.types$ +^lib/theme_template/example/index\.html$ +^lib/theme_template/example/_post\.md$ +^test/fixtures/empty_permalink\.erb$ +^test/fixtures/webrick/bar/baz\.html$ +^test/fixtures/webrick/bar/foo\.xhtml$ +^test/source/_posts/2009-06-22-no-yaml\.markdown$ +^\.github/ diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt new file mode 100644 index 00000000000..7fd61c7195a --- /dev/null +++ b/.github/actions/spelling/expect.txt @@ -0,0 +1,684 @@ +acl +activesupport +adaoraul +addons +aeiou +AFile +afterall +alfredxing +algolia +allowfullscreen +apps +appveyor +arengu +args +ariejan +arounds +asciinema +asdf +ashmaroli +attr +Autobuild +autocompletion +autogenerated +Autolink +autoload +autoreconf +autosave +aws +awscli +backend +backlink +backport +backtick +barcamp +baseurl +bashrc +baz +bbatsov +bdimcheff +binstubs +bip +bitbucket +blog +Blogger +blogging +bonafide +breadcrumbs +briandoll +bridgetown +bridgetownrb +brightbox +brighterplanet +buddyworks +Bugfix +Burela +byparker +cachegrind +calavera +callgraphs +cartera +cavalle +CDNs +cgi +changefreq +changelog +chango +charset +chcp +chdir +Cheatsheet +chmod +chown +Chrononaut +chruby +cibuild +circleci +CJK +classname +cloudcannon +Cloudinary +cloudsh +CLT +codebase +codeclimate +CODEOWNERS +coderay +codeslinger +coffeescript +colorator +commandline +commonmark +compat +compatibilize +concat +config +configyml +contentblocks +CORS +Cov +CRLFs +cron +crontab +cruft +css +csv +Currin +CWD +cygwin +daringfireball +datafiles +datetime +DCEU +Debian +debuggability +defunkt +delegators +deployer +deps +dest +Devkit +devops +digitalocean +dirs +disqus +ditaa +dnf +doclist +doctype +doeorg +dommmel +dotfile +downcase +downcased +duckduckgo +duritong +dysinger +ecf +editorconfig +eduardoboucas +Elasticsearch +elsif +Emacs +emails +emoji +endcapture +endfor +endhighlight +endif +endraw +endrender +endtablerow +Enumerables +EOL'd +erb +errordocument +eugenebolshakov +evaled +exe +execjs +extensionpack +extname +exts +favicon +Fengyun +ffi +figcaption +filesystem +firstimage +FIXME +flakey +flickr +fnmatch +fontello +forloop +formcake +formester +formingo +formkeep +formspark +formspree +formx +Forwardable +frameborder +freenode +frontmatter +fsnotify +ftp +fullstory +gcc +gcnovus +gemfile +gemset +gemspec +getform +getset +getsimpleform +gettalong +gfm +ghp +ghpages +giraffeacademy +github +githubusercontent +gitignore +gitlab +gjtorikian +globbed +globbing +google +gotcha +gridism +GSo +gsub +gsubbing +Hakiri +hardcode +hashbang +hashmap +helaili +henrik +heredoc +heroku +highlighter +hilighting +homepage +hostman +hostname +href +htaccess +htm +html +htmlproofer +http +httpd +httpdocs +hyperlinks +Iaa +ial +ico +icomoon +iconset +ified +iframe +img +Impl +Inlining +invokables +irc +ivey +ize +jalali +jameshamann +jamstackthemes +javascript +Jax +jayferd +jcon +jdoe +jeffreytse +jeffrydegrande +Jekpack +jekyllbot +jekyllconf +Jekyllers +Jekyllin +jekyllized +jekylllayoutconcept +jekyllrb +jekyllthemes +jemoji +jmcglone +jneen +johnreilly +jpg +jqr +jruby +json +jsonify +juretta +jwarby +kbd +Kentico +keycdn +kickster +kiwifruit +konklone +kontent +kramdown +Lamprecht +laquo +lastmod +launchctl +launchy +laurilehmijoki +ldquo +learnxinyminutes +lexer +LGTM +libcurl +libffi +lifecycle +lightgray +limjh +linenos +linkify +linux +liufengyun +livereload +localhost +localtime +loglevel +Losslessly +lovin +lsi +lsquo +lstrip +lyche +macos +macromates +mademistakes +mailto +markdownify +maruku +mathjax +mathml +mattr +mchung +mdash +memberspace +Memoize +memoized +memoizing +mergable +metadata +microdata +microsoft +mimetype +mingw +minibundle +minifier +minitest +mixin +mkasberg +mkd +mkdir +mkdn +mkdown +modernizr +mojombo +moz +mreid +msdn +mswin +MSYS +mtime +multiline +munging +Mvvm +myblog +mycontent +mydata +mydoc +myimage +mypage +myposts +myrepo +mysite +myvalue +myvar +myvariable +namespace +namespaced +navbar +nbsp +nearlyfreespeech +nethack +netlify +netlifycms +Neue +nginx +ngx +nielsenramon +nodejs +noifniof +nokogiri +notextile +onclick +onebox +oneclick +onschedule +opensource +openssl +Optim +orderofinterpretation +orgs +OSVDB +osx +packagecontrol +pacman +paginator +pandoc +pantulis +params +parkr +parseable +paspagon +passthrough +pathawks +Pathutil +paywall +pdf +permalink +PHP +pinboard +Piwigo +pjhyett +pkill +pkpass +placeholders +planetjekyll +plantuml +plugin +png +podcasts +popen +Posterous +postfiles +postlayout +postmodern +prepends +Prioritise +Probot +projectlist +pubstorm +pufuwozu +pwa +pwd +pygments +qrush +Quaid +quickstart +rackup +Rakefile +raquo +razorops +rbenv +rdiscount +rdoc +rdquo +readme +realz +rebund +redcarpet +redcloth +redgreen +redhat +refactor +refactoring +Refheap +regen +regex +regexp +remi +reqs +Responsify +revertable +rfc +rfelix +RHEL +ridk +roadmap +rowspan +rspec +rsquo +rss +rstrip +rsync +rtomayko +Rubo +rubocop +rubygem +rubyinstaller +rubyprof +rvm +ryanflorence +saas +samplelist +samrayner +sandboxed +Sassc +sassify +schemastore +Schwartzian +scp +screenshot +scrollbar +scroller +scss +scssify +sectore +semver +seo +serverless +setenv +SFTP +shopify +shortlog +shoulda +sieversii +sigpipe +simplecov +siteleaf +sitemap +SITENAME +Slicehost +slugified +slugify +smartforms +smartify +snipcart +socio +somedir +sonnym +Sonomy +sourced +sourcemaps +spam +spotify +src +ssg +ssh +SSL +stackoverflow +standalone +staticfiles +staticman +statictastic +STDERR +stdout +Stickyposts +strftime +stringified +Stringify +styleguide +stylesheet +subdir +subdomain +subfolder +subfolderitems +subnav +subpages +subpath +subpiece +subsubfolderitems +subthing +subvalues +subwidget +sudo +superdirectories +superdirs +SUSE +sverrirs +svg +svn +swfobject +swupd +symlink +symlinking +tablerow +tada +talkyard +tbody +technicalpickles +templating +templatize +Termux +textilize +textpattern +thead +therubyracer +Thornquest +thoughtbot +throughs +Tidelift +timeago +timezone +titleize +TLS +tmm +tmp +toc +tok +tomjoht +toml +tomo +toolset +toshimaru +triaged +triaging +truncatewords +tsv +ttf +Tudou +Tumblr +Tweetsert +txtpen +tzinfo +ubuntu +uby +ujh +ultron +undumpable +unencode +Unescape +unescaping +unicode +uniq +upcase +uppercasing +uri +url +urlset +username +usr +utf +utils +utime +utm +vanpelt +vendored +vercel +versioned +versioning +vertycal +Veyor +vilcans +visualstudio +vnd +vps +vscode +vwochnik +Walkthroughs +wdm +We'd +webfont +webhook +webhosting +webmentions +webrick +website +weekdate +whitelist +whitelisting +wiki +wikipedia +willcodeforfoo +woff +wordpress +Workaround +workflow +wsl +www +xcode +xdg +xhtml +XMinutes +xml +xmlns +xmlschema +yajl +yaml +Yarp +yml +Youku +youtube +yunbox +zeropadding +zlib +zoneinfo +zpinter +Zsh +zshrc +zypper +zzot diff --git a/.github/actions/spelling/only.txt b/.github/actions/spelling/only.txt new file mode 100644 index 00000000000..af5f5b1cceb --- /dev/null +++ b/.github/actions/spelling/only.txt @@ -0,0 +1 @@ +^docs/.*\.md$ diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt new file mode 100644 index 00000000000..b4c2bffcfe6 --- /dev/null +++ b/.github/actions/spelling/patterns.txt @@ -0,0 +1,61 @@ +# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns + +# data urls +(['"])data:.*?\g{-1} +data:[-a-zA-Z=;:/0-9+]*,\S* + +# YouTube +https?://(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_]* +<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"] +\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]* +youtube_id:\s*[-a-zA-Z0-9?&=_]* +# Google Analytics +\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]* +# Google APIs +\bgoogleapis\.com/[a-z]+/v\d+/[a-z]+/[@./?=\w]+ +\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|) +# Google Calendar +\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+ +\w+\@group\.calendar\.google\.com\b +# Google DataStudio +\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|) +# The leading `/` here is as opposed to the `\b` above +# ... a short way to match `https://` or `http://` since most urls have one of those prefixes +# Google Docs +/docs\.google\.com/[a-z]+/d/(?:e/|)[0-9a-zA-Z_-]+/? +# Google Groups +https://groups\.google\.com/d/topic/[^/]+/[a-zA-Z0-9]+/discussion +https://groups\.google\.com/d/msg/[^/]+/[a-zA-Z0-9]+/[a-zA-Z0-9]+ +# Google themes +themes\.googleusercontent\.com/static/fonts/[^/]+/v\d+/[^.]+. +# Google CDN +\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]* +# Goo.gl +/goo\.gl/[a-zA-Z0-9]+ +# Google Chrome Store +\bchrome\.google\.com/webstore/detail/\w*(?:/\w*|) +# google_site_verification: +google_site_verification: [-a-zA-Z=;:/0-9+]* + +# Contributors +alphabetical order.*:.* +twitter_handle: .* + +# apiKey +apiKey: '[a-f0-9]+' + +# FontAwesome +/(?:(?i)FontAwesome\.\w+\?\w+) + +# Lorem +(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus|ultrices)\b(?:\w|\s|[,.])* + +# URL escaped characters +\%[0-9A-F]{2} +# c99 hex digits (not the full format, just one I've seen) + +# hex digits including css/html color classes: +(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9a-fA-FgGrR_]{2,}(?:[uU]?[lL]{0,2}|u\d+)\b + +# ignore long runs of a single character: +\b([A-Za-z])\g{-1}{3,}\b diff --git a/.github/actions/spelling/reject.txt b/.github/actions/spelling/reject.txt new file mode 100644 index 00000000000..a5ba6f6390e --- /dev/null +++ b/.github/actions/spelling/reject.txt @@ -0,0 +1,7 @@ +^attache$ +benefitting +occurence +Sorce +^[Ss]pae +^untill +^wether diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 00000000000..cbc72ae28ea --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,19 @@ +name: Spell checking +on: + pull_request_target: + push: + +jobs: + build: + name: Spell checking + runs-on: ubuntu-latest + steps: + - name: checkout-merge + if: "contains(github.event_name, 'pull_request')" + uses: actions/checkout@v2.0.0 + with: + ref: refs/pull/${{github.event.pull_request.number}}/merge + - name: checkout + if: "!contains(github.event_name, 'pull_request')" + uses: actions/checkout@v2.0.0 + - uses: check-spelling/check-spelling@v0.0.18 diff --git a/docs/_docs/continuous-integration/razorops.md b/docs/_docs/continuous-integration/razorops.md index f34ad082d9c..fc92d339596 100644 --- a/docs/_docs/continuous-integration/razorops.md +++ b/docs/_docs/continuous-integration/razorops.md @@ -25,7 +25,7 @@ With [Razorops][razorops-homepage] you can set up your Jekyll websites project's 1. Log in at [https://razorops.com/][razorops-homepage] with your GitHub/Bitbucket or Gitlab account 2. Create a pipeline, choose your Git provider and select your Jekyll Project 3. Add .razorops.yaml file in your root directory of your project -4. Add envirommant var and your deployment is ready +4. Add environment var and your deployment is ready 5. Add build and deployment steps as shown in this post [How to Deploy a Static Website to AWS S3 with Razorops CI/CD][deploy-s3] ## 2. How it works From 02b12e5dfc63f41aeaebfdbacee6593f87394299 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 16 May 2021 08:14:48 -0400 Subject: [PATCH 0774/1182] Update history to reflect merge of #8675 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 44d5f8fe80a..9344c8e5c28 100644 --- a/History.markdown +++ b/History.markdown @@ -36,6 +36,7 @@ * Cross Version Testing Locally and Faster CI (#8610) * style: run rubocop -a (#8654) * Use official Ruby setup GH action (#8614) + * Spell check action for markdown documentation (#8675) ### Minor Enhancements From 92633c699617123eeef22f5a63bd9253500b58a2 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 16 May 2021 15:58:44 -0400 Subject: [PATCH 0775/1182] Update expect to cover docs/_posts (#8677) Merge pull request 8677 --- .github/actions/spelling/expect.txt | 68 ++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 7fd61c7195a..ceceb3fdf80 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -5,9 +5,14 @@ addons aeiou AFile afterall +Alexey alfredxing algolia allowfullscreen +Anatoliy +andreyvit +Ankit +Anning apps appveyor arengu @@ -25,6 +30,7 @@ Autolink autoload autoreconf autosave +awood aws awscli backend @@ -37,6 +43,9 @@ bashrc baz bbatsov bdimcheff +bellvat +benbalter +Beney binstubs bip bitbucket @@ -44,6 +53,7 @@ blog Blogger blogging bonafide +Bou breadcrumbs briandoll bridgetown @@ -65,9 +75,11 @@ changefreq changelog chango charset +Chayoung chcp chdir Cheatsheet +Checkoway chmod chown Chrononaut @@ -107,6 +119,7 @@ Currin CWD cygwin daringfireball +Dassonville datafiles datetime DCEU @@ -129,10 +142,12 @@ doctype doeorg dommmel dotfile +Dousse downcase downcased duckduckgo duritong +Dusseau dysinger ecf editorconfig @@ -150,9 +165,11 @@ endraw endrender endtablerow Enumerables -EOL'd +EOL +eol erb errordocument +Espinaco eugenebolshakov evaled exe @@ -165,6 +182,7 @@ Fengyun ffi figcaption filesystem +Finazzo firstimage FIXME flakey @@ -186,6 +204,7 @@ frontmatter fsnotify ftp fullstory +Gaudino gcc gcnovus gemfile @@ -200,6 +219,7 @@ ghp ghpages giraffeacademy github +githubcom githubusercontent gitignore gitlab @@ -208,6 +228,7 @@ globbed globbing google gotcha +Goulven gridism GSo gsub @@ -222,6 +243,7 @@ heredoc heroku highlighter hilighting +Hoizey homepage hostman hostname @@ -251,6 +273,7 @@ ize jalali jameshamann jamstackthemes +jan javascript Jax jayferd @@ -263,6 +286,7 @@ jekyllbot jekyllconf Jekyllers Jekyllin +Jekylling jekyllized jekylllayoutconcept jekyllrb @@ -278,14 +302,22 @@ json jsonify juretta jwarby +Kacper +Kasberg kbd Kentico +Kewin keycdn kickster +Kinnula kiwifruit +Kolesky konklone kontent +Kotvinsky kramdown +Kulig +Kwokfu Lamprecht laquo lastmod @@ -306,8 +338,10 @@ linkify linux liufengyun livereload +localheinz localhost localtime +Locher loglevel Losslessly lovin @@ -319,18 +353,25 @@ macos macromates mademistakes mailto +Manmeet markdownify +Maroli +Marsceill maruku mathjax mathml mattr +Maximiliano mchung mdash memberspace Memoize memoized memoizing +mentoring mergable +Mertcan +mertkahyaoglu metadata microdata microsoft @@ -339,12 +380,14 @@ mingw minibundle minifier minitest +Mittal mixin mkasberg mkd mkdir mkdn mkdown +mmistakes modernizr mojombo moz @@ -363,11 +406,14 @@ mydoc myimage mypage myposts +myproject myrepo mysite myvalue myvar myvariable +Nadjib +nakanishi namespace namespaced navbar @@ -380,6 +426,7 @@ Neue nginx ngx nielsenramon +nior nodejs noifniof nokogiri @@ -409,6 +456,7 @@ pathawks Pathutil paywall pdf +Pelykh permalink PHP pinboard @@ -423,6 +471,7 @@ plugin png podcasts popen +Porcel Posterous postfiles postlayout @@ -481,6 +530,8 @@ rubocop rubygem rubyinstaller rubyprof +Ruparelia +Rusiczki rvm ryanflorence saas @@ -490,6 +541,7 @@ sandboxed Sassc sassify schemastore +Schroers Schwartzian scp screenshot @@ -503,12 +555,14 @@ seo serverless setenv SFTP +shingo shopify shortlog shoulda sieversii sigpipe simplecov +Singhaniya siteleaf sitemap SITENAME @@ -568,6 +622,7 @@ symlink symlinking tablerow tada +Taillandier talkyard tbody technicalpickles @@ -578,6 +633,7 @@ textilize textpattern thead therubyracer +Theunissen Thornquest thoughtbot throughs @@ -604,6 +660,7 @@ Tudou Tumblr Tweetsert txtpen +Tyborska tzinfo ubuntu uby @@ -627,6 +684,7 @@ utils utime utm vanpelt +Vasovi vendored vercel versioned @@ -634,8 +692,10 @@ versioning vertycal Veyor vilcans +Vishesh visualstudio vnd +vohedge vps vscode vwochnik @@ -653,6 +713,7 @@ whitelist whitelisting wiki wikipedia +wildcards willcodeforfoo woff wordpress @@ -662,7 +723,9 @@ wsl www xcode xdg +Xhmikos xhtml +Xiaoiver XMinutes xml xmlns @@ -670,11 +733,14 @@ xmlschema yajl yaml Yarp +Yashu +Yastreb yml Youku youtube yunbox zeropadding +Zlatan zlib zoneinfo zpinter From 0274943bcd561639c69b2e24cc8463e48380dedc Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 16 May 2021 15:58:45 -0400 Subject: [PATCH 0776/1182] Update history to reflect merge of #8677 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 9344c8e5c28..8a28be948a7 100644 --- a/History.markdown +++ b/History.markdown @@ -37,6 +37,7 @@ * style: run rubocop -a (#8654) * Use official Ruby setup GH action (#8614) * Spell check action for markdown documentation (#8675) + * Update expect to cover docs/_posts (#8677) ### Minor Enhancements From 7e350ac031303a650b6dba70a868a33c187eaffb Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sun, 16 May 2021 20:00:53 +0000 Subject: [PATCH 0777/1182] Revert "style: run rubocop -a" (#8676) Merge pull request 8676 --- lib/jekyll/cache.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/jekyll/cache.rb b/lib/jekyll/cache.rb index e688c2ed0b7..be9a1893ef0 100644 --- a/lib/jekyll/cache.rb +++ b/lib/jekyll/cache.rb @@ -163,6 +163,7 @@ def delete_cache_files # Load `path` from disk and return the result. # This MUST NEVER be called in Safe Mode + # rubocop:disable Security/MarshalLoad def load(path) raise unless disk_cache_enabled? @@ -171,6 +172,7 @@ def load(path) cached_file.close value end + # rubocop:enable Security/MarshalLoad # Given a path and a value, save value to disk at path. # This should NEVER be called in Safe Mode From 6a6d735db27cf9cb3975ad58edad62b1e82e7b2e Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 16 May 2021 16:00:55 -0400 Subject: [PATCH 0778/1182] Update history to reflect merge of #8676 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 8a28be948a7..57dd053949e 100644 --- a/History.markdown +++ b/History.markdown @@ -25,6 +25,7 @@ * Add webrick as a dependency (#8524) * fix: pin rubocop to 1.12 due to error with ruby 2.4 (#8651) + * Revert "style: run rubocop -a" (#8676) ### Development Fixes From 93ef9389bae191daf3bb396257810224b0dfa21c Mon Sep 17 00:00:00 2001 From: Liam Bigelow <40188355+bglw@users.noreply.github.com> Date: Mon, 17 May 2021 08:06:05 +1200 Subject: [PATCH 0779/1182] Load Jekyll plugins from BUNDLE_GEMFILE location (#8585) Merge pull request 8585 --- lib/jekyll/plugin_manager.rb | 9 ++++++++- test/test_plugin_manager.rb | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/plugin_manager.rb b/lib/jekyll/plugin_manager.rb index d7785338c40..fe2e43f9904 100644 --- a/lib/jekyll/plugin_manager.rb +++ b/lib/jekyll/plugin_manager.rb @@ -46,7 +46,7 @@ def require_theme_deps end def self.require_from_bundler - if !ENV["JEKYLL_NO_BUNDLER_REQUIRE"] && File.file?("Gemfile") + if !ENV["JEKYLL_NO_BUNDLER_REQUIRE"] && gemfile_exists? require "bundler" Bundler.setup @@ -61,6 +61,13 @@ def self.require_from_bundler end end + # Check for the existence of a Gemfile. + # + # Returns true if a Gemfile exists in the places bundler will look + def self.gemfile_exists? + File.file?("Gemfile") || (ENV["BUNDLE_GEMFILE"] && File.file?(ENV["BUNDLE_GEMFILE"])) + end + # Check whether a gem plugin is allowed to be used during this build. # # plugin_name - the name of the plugin diff --git a/test/test_plugin_manager.rb b/test/test_plugin_manager.rb index dfcb4dfec32..a7b9359e225 100644 --- a/test/test_plugin_manager.rb +++ b/test/test_plugin_manager.rb @@ -10,6 +10,13 @@ def with_no_gemfile FileUtils.mv "Gemfile.old", "Gemfile" end + def with_bundle_gemfile + FileUtils.mv "Gemfile", "AlternateGemfile" + yield + ensure + FileUtils.mv "AlternateGemfile", "Gemfile" + end + context "JEKYLL_NO_BUNDLER_REQUIRE set to `nil`" do should "require from bundler" do with_env("JEKYLL_NO_BUNDLER_REQUIRE", nil) do @@ -20,6 +27,18 @@ def with_no_gemfile end end + context "BUNDLE_GEMFILE set to `AlternateGemfile`" do + should "require from bundler" do + with_env("BUNDLE_GEMFILE", "AlternateGemfile") do + with_bundle_gemfile do + assert Jekyll::PluginManager.require_from_bundler, + "require_from_bundler should return true" + assert ENV["JEKYLL_NO_BUNDLER_REQUIRE"], "Gemfile plugins were not required." + end + end + end + end + context "JEKYLL_NO_BUNDLER_REQUIRE set to `true`" do should "not require from bundler" do with_env("JEKYLL_NO_BUNDLER_REQUIRE", "true") do From 30b397c0467ec6b73bca9c1ddf1a5220b1e8ca4a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 16 May 2021 16:06:06 -0400 Subject: [PATCH 0780/1182] Update history to reflect merge of #8585 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 57dd053949e..53c214aeeb6 100644 --- a/History.markdown +++ b/History.markdown @@ -26,6 +26,7 @@ * Add webrick as a dependency (#8524) * fix: pin rubocop to 1.12 due to error with ruby 2.4 (#8651) * Revert "style: run rubocop -a" (#8676) + * Load Jekyll plugins from BUNDLE_GEMFILE location (#8585) ### Development Fixes From 49a00ebbec06e383aafa648f7c8bdb027a2fc3af Mon Sep 17 00:00:00 2001 From: nusu Date: Sun, 16 May 2021 23:09:23 +0300 Subject: [PATCH 0781/1182] Add formcarry to forms section (#8471) Merge pull request 8471 --- docs/pages/resources.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/resources.md b/docs/pages/resources.md index 2df8c872b14..86dc798d690 100644 --- a/docs/pages/resources.md +++ b/docs/pages/resources.md @@ -56,6 +56,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site - [Getform](https://getform.io) - [99Inbound](https://www.99inbound.com) - [Formcake](https://formcake.com) + - [Formcarry](https://formcarry.com) - [Formingo](https://www.formingo.co/guides/jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=Jekyll%20Documentation) - [FormKeep](https://formkeep.com/guides/contact-form-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll) - [Formspark](https://formspark.io/) From f267dafc0c32c38b0eec4c5e5bd99a67b09a0321 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 16 May 2021 16:09:24 -0400 Subject: [PATCH 0782/1182] Update history to reflect merge of #8471 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 53c214aeeb6..72bcd440617 100644 --- a/History.markdown +++ b/History.markdown @@ -20,6 +20,7 @@ * Specify default port and host for serve commands in docs (#8624) * Update third-party.md (#8652) * Add documentation for Sass configuration options (#8587) + * Add formcarry to forms section (#8471) ### Bug Fixes From 1ffda285d6f797b64bd291ab7c2c6acba7360015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edson=20Jim=C3=A9nez?= <51224220+Edsonytic@users.noreply.github.com> Date: Sun, 16 May 2021 15:10:45 -0500 Subject: [PATCH 0783/1182] Add step to set SDKROOT (#8478) Merge pull request 8478 --- docs/_docs/installation/macos.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/_docs/installation/macos.md b/docs/_docs/installation/macos.md index 5d885705051..431421c9c20 100644 --- a/docs/_docs/installation/macos.md +++ b/docs/_docs/installation/macos.md @@ -10,6 +10,13 @@ To install the command line tools to compile native extensions, open a terminal xcode-select --install ``` +### set SDKROOT (only macOS Catalina or later) +Starting on macOS Catalina (10.15) the headers used for Ruby have been moved from their previous location which results in some gems, including Jekyll to fail installation. This can be solved by setting SDKROOT in your shell configuration to the value provided by xcrun. + +```ssh +export SDKROOT=$(xcrun --show-sdk-path) +``` + ## Install Ruby Jekyll requires **Ruby v{{ site.data.ruby.min_version }}** or higher. From e724b587e30598cb72f5618b481f22a9b8fd924b Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Sun, 16 May 2021 16:10:46 -0400 Subject: [PATCH 0784/1182] Update history to reflect merge of #8478 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 72bcd440617..7e5fd5ba143 100644 --- a/History.markdown +++ b/History.markdown @@ -21,6 +21,7 @@ * Update third-party.md (#8652) * Add documentation for Sass configuration options (#8587) * Add formcarry to forms section (#8471) + * Add step to set SDKROOT (#8478) ### Bug Fixes From 7605b0a474f2906e36f394a174171e9ba2cefed1 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 16 May 2021 22:12:49 +0200 Subject: [PATCH 0785/1182] Update History.markdown --- History.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index 7e5fd5ba143..2d8ad444ac6 100644 --- a/History.markdown +++ b/History.markdown @@ -1573,7 +1573,7 @@ ### Minor Enhancements - * Stop testing with Ruby 2.0.x, which is EOL'd. (#4381) + * Stop testing with Ruby 2.0.x EOL (#4381) * Allow collections to have documents that have no file extension (#4545) * Add size property to `group_by` result (#4557) * Site Template: Removed unnecessary nesting from `_base.scss` (#4637) From 889fe4130bdda65b288c34ea8ebbba4dd0105f54 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 16 May 2021 22:13:21 +0200 Subject: [PATCH 0786/1182] Update expect.txt --- .github/actions/spelling/expect.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index ceceb3fdf80..d6a6a589e86 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -191,6 +191,7 @@ fnmatch fontello forloop formcake +formcarry formester formingo formkeep From e5dd8897500ac0426545ba8f9304660cbeaff44d Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Mon, 17 May 2021 23:55:11 +0200 Subject: [PATCH 0787/1182] Update expect.txt --- .github/actions/spelling/expect.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index d6a6a589e86..de551310ddf 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -550,6 +550,8 @@ scrollbar scroller scss scssify +sdk +SDKROOT sectore semver seo @@ -723,6 +725,7 @@ workflow wsl www xcode +xcrun xdg Xhmikos xhtml From 42dacc1091536deababcb54591568249f7b0a7fc Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 18 May 2021 08:31:34 +0200 Subject: [PATCH 0788/1182] fix(security): CVE-2021-28834 (#8680) Merge pull request 8680 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 169d41cf5a4..9bb5376657f 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -38,7 +38,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency("i18n", "~> 1.0") s.add_runtime_dependency("jekyll-sass-converter", "~> 2.0") s.add_runtime_dependency("jekyll-watch", "~> 2.0") - s.add_runtime_dependency("kramdown", "~> 2.3") + s.add_runtime_dependency("kramdown", "~> 2.3", ">= 2.3.1") s.add_runtime_dependency("kramdown-parser-gfm", "~> 1.0") s.add_runtime_dependency("liquid", "~> 4.0") s.add_runtime_dependency("mercenary", ">= 0.3.6", "< 0.5") From 6ff7d680e046e12a35300297a63206e115dc1d16 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Tue, 18 May 2021 02:31:36 -0400 Subject: [PATCH 0789/1182] Update history to reflect merge of #8680 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 2d8ad444ac6..e1c55180671 100644 --- a/History.markdown +++ b/History.markdown @@ -29,6 +29,7 @@ * fix: pin rubocop to 1.12 due to error with ruby 2.4 (#8651) * Revert "style: run rubocop -a" (#8676) * Load Jekyll plugins from BUNDLE_GEMFILE location (#8585) + * fix(security): CVE-2021-28834 (#8680) ### Development Fixes From b5e910acfbf0ea542ddb91e035847cdae168aebf Mon Sep 17 00:00:00 2001 From: Mike Kasberg Date: Tue, 18 May 2021 01:34:13 -0600 Subject: [PATCH 0790/1182] Improve the "Markdown Options" Docs (#8681) Merge pull request 8681 --- .github/actions/spelling/expect.txt | 3 +- docs/_docs/configuration/markdown.md | 96 ++++++++++++++-------------- 2 files changed, 50 insertions(+), 49 deletions(-) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index de551310ddf..b2cfe92c50f 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -34,7 +34,6 @@ awood aws awscli backend -backlink backport backtick barcamp @@ -165,7 +164,6 @@ endraw endrender endtablerow Enumerables -EOL eol erb errordocument @@ -528,6 +526,7 @@ rsync rtomayko Rubo rubocop +rubychan rubygem rubyinstaller rubyprof diff --git a/docs/_docs/configuration/markdown.md b/docs/_docs/configuration/markdown.md index d06743d876b..38904d7a2dd 100644 --- a/docs/_docs/configuration/markdown.md +++ b/docs/_docs/configuration/markdown.md @@ -5,61 +5,63 @@ permalink: "/docs/configuration/markdown/" The various Markdown renderers supported by Jekyll sometimes have extra options available. -### Kramdown - -Kramdown is the default Markdown renderer for Jekyll. Below is a list of the -currently supported options: - -* **auto_id_prefix** - Prefix used for automatically generated header IDs -* **auto_id_stripping** - Strip all formatting from header text for automatic ID generation -* **auto_ids** - Use automatic header ID generation -* **coderay_bold_every** - Defines how often a line number should be made bold -* **coderay_css** - Defines how the highlighted code gets styled -* **coderay_default_lang** - Sets the default language for highlighting code blocks -* **coderay_line_number_start** - The start value for the line numbers -* **coderay_line_numbers** - Defines how and if line numbers should be shown -* **coderay_tab_width** - The tab width used in highlighted code -* **coderay_wrap** - Defines how the highlighted code should be wrapped -* **enable_coderay** - Use coderay for syntax highlighting -* **entity_output** - Defines how entities are output -* **footnote_backlink** - Defines the text that should be used for the footnote backlinks -* **footnote_backlink_inline** - Specifies whether the footnote backlink should always be inline -* **footnote_nr** - The number of the first footnote -* **gfm_quirks** - Enables a set of GFM specific quirks -* **hard_wrap** - Interprets line breaks literally -* **header_offset** - Sets the output offset for headers -* **html_to_native** - Convert HTML elements to native elements -* **line_width** - Defines the line width to be used when outputting a document -* **link_defs** - Pre-defines link definitions -* **math_engine** - Set the math engine -* **math_engine_opts** - Set the math engine options -* **parse_block_html** - Process kramdown syntax in block HTML tags -* **parse_span_html** - Process kramdown syntax in span HTML tags -* **smart_quotes** - Defines the HTML entity names or code points for smart quote output -* **syntax_highlighter** - Set the syntax highlighter -* **syntax_highlighter_opts** - Set the syntax highlighter options -* **toc_levels** - Defines the levels that are used for the table of contents -* **transliterated_header_ids** - Transliterate the header text before generating the ID -* **typographic_symbols** - Defines a mapping from typographical symbol to output characters - -### Example Usage +## Kramdown + +Kramdown is the default Markdown renderer for Jekyll, and often works well with no additional configuration. However, it does support many configuration options. + +### GitHub Flavored Markdown + +Kramdown supports GitHub Flavored Markdown (GFM). To use GFM with Kramdown in Jekyll, add the following to your configuration. + +```yaml +kramdown: + input: GFM +``` + +GFM supports additional Kramdown options, documented at [kramdown-parser-gfm](https://github.com/kramdown/parser-gfm). These options can be used directly in your Kramdown Jekyll config, like this: + +```yaml +kramdown: + input: GFM + gfm_quirks: [paragraph_end] +``` + +### Syntax Highlighting (CodeRay) + +To use the [CodeRay](http://coderay.rubychan.de/) syntax highlighter with Kramdown, you need to add a dependency on the `kramdown-syntax-coderay` gem. For example, `bundle add kramdown-syntax-coderay`. Then, you'll be able to specify CodeRay in your `syntax_highlighter` config: + +```yaml +kramdown: + syntax_highlighter: coderay +``` + +CodeRay supports several of its own configuration options, documented in the [kramdown-syntax-coderay docs](https://github.com/kramdown/syntax-coderay) which can be passed as `syntax_highlighter_opts` like this: + +```yaml +kramdown: + syntax_highlighter: coderay + syntax_highlighter_opts: + line_numbers: table + bold_every: 5 +``` + +### Advanced Kramdown Options + +Kramdown supports a variety of other relatively advanced options such as `header_offset` and `smart_quotes`. These are documented in the [Kramdown configuration documentation](https://kramdown.gettalong.org/options.html) and can be added to your Kramdown config like this: + ```yaml kramdown: - html_to_native: true + header_offset: 2 ``` - +
    -
    There are two unsupported kramdown options
    +
    There are several unsupported kramdown options

    - Please note that both remove_block_html_tags and - remove_span_html_tags are currently unsupported in Jekyll due - to the fact that they are not included within the kramdown HTML converter. + Please note that Jekyll uses Kramdown's HTML converter. Kramdown options used only by other converters, such as remove_block_html_tags (used by the RemoveHtmlTags converter), will not work.

    -For more details about these options have a look at the [Kramdown configuration documentation](https://kramdown.gettalong.org/options.html). - -### CommonMark +## CommonMark [CommonMark](https://commonmark.org/) is a rationalized version of Markdown syntax, implemented in C and thus faster than default Kramdown implemented in Ruby. It [slightly differs](https://github.com/commonmark/CommonMark#differences-from-original-markdown) from original Markdown and does not support all the syntax elements implemented in Kramdown, like [Block Inline Attribute Lists](https://kramdown.gettalong.org/syntax.html#block-ials). From 76517175e700d80706c9139989053f1c53d9b956 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Tue, 18 May 2021 03:34:15 -0400 Subject: [PATCH 0791/1182] Update history to reflect merge of #8681 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index e1c55180671..1a19375d712 100644 --- a/History.markdown +++ b/History.markdown @@ -22,6 +22,7 @@ * Add documentation for Sass configuration options (#8587) * Add formcarry to forms section (#8471) * Add step to set SDKROOT (#8478) + * Improve the "Markdown Options" Docs (#8681) ### Bug Fixes From 0dee66260f2bde77d9edbf279e083de862b21b5c Mon Sep 17 00:00:00 2001 From: fauno Date: Thu, 22 Jul 2021 14:43:47 -0300 Subject: [PATCH 0792/1182] Optimize `Jekyll::Utils.parse_date` (#8425) Merge pull request 8425 --- benchmark/parse-date | 25 +++++++++++++++++++++++++ lib/jekyll/utils.rb | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 benchmark/parse-date diff --git a/benchmark/parse-date b/benchmark/parse-date new file mode 100755 index 00000000000..9d1d1ed632d --- /dev/null +++ b/benchmark/parse-date @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby + +require_relative '../lib/jekyll' +require 'benchmark/ips' + +date = "2014-08-02 14:43:06 PDT".freeze +time = Time.parse(date) + +Benchmark.ips do |x| + x.report('Time.parse') do + Time.parse(date) + end + + x.report('localtime') do + Time.parse(date).localtime + end + + x.report('localtime parsed') do + time.localtime + end + + x.report('Utils.parse_date') do + Jekyll::Utils.parse_date(date) + end +end diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb index 5039c07adf9..49d67f4b24f 100644 --- a/lib/jekyll/utils.rb +++ b/lib/jekyll/utils.rb @@ -128,7 +128,8 @@ def stringify_hash_keys(hash) # Returns the parsed date if successful, throws a FatalException # if not def parse_date(input, msg = "Input could not be parsed.") - Time.parse(input).localtime + @parse_date_cache ||= {} + @parse_date_cache[input] ||= Time.parse(input).localtime rescue ArgumentError raise Errors::InvalidDateError, "Invalid date '#{input}': #{msg}" end From ea535a9ab73b34b5655c3afa25c140ecbba3305f Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:43:49 -0400 Subject: [PATCH 0793/1182] Update history to reflect merge of #8425 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 1a19375d712..b3eb9d827a9 100644 --- a/History.markdown +++ b/History.markdown @@ -49,6 +49,7 @@ * Regenerate supported mime types (#8542) * Update include tag to be more permissive (#8618) + * Optimize `Jekyll::Utils.parse_date` (#8425) ### Site Enhancements From bcaf878b65d6349da9e53ad9243796e72797c0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Brand=C3=A3o?= Date: Thu, 22 Jul 2021 18:46:12 +0100 Subject: [PATCH 0794/1182] Add 'webrick' warning note to "Quickstart" Docs (#8727) Merge pull request 8727 --- docs/_docs/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/_docs/index.md b/docs/_docs/index.md index 07dfeb1126a..af97b79c0d7 100644 --- a/docs/_docs/index.md +++ b/docs/_docs/index.md @@ -41,6 +41,9 @@ bundle exec jekyll serve ``` 6. Browse to [http://localhost:4000](http://localhost:4000){:target="_blank"} +{: .note .warning} +If you are using Ruby version 3.0.0 or higher, step 5 [may fail](https://github.com/github/pages-gem/issues/752). You may fix it by adding `webrick` to your dependencies: `bundle add webrick` + {: .note .info} Pass the `--livereload` option to `serve` to automatically refresh the page with each change you make to the source files: `bundle exec jekyll serve --livereload` From 915248ff1831ec811fe6c7c7e8637accceeed33a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:46:13 -0400 Subject: [PATCH 0795/1182] Update history to reflect merge of #8727 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index b3eb9d827a9..36fefa52251 100644 --- a/History.markdown +++ b/History.markdown @@ -23,6 +23,7 @@ * Add formcarry to forms section (#8471) * Add step to set SDKROOT (#8478) * Improve the "Markdown Options" Docs (#8681) + * Add 'webrick' warning note to "Quickstart" Docs (#8727) ### Bug Fixes From 8a6dd9e494f94a4100ee915903750f18abd2ffb9 Mon Sep 17 00:00:00 2001 From: Parikshit87 <75501801+Parikshit87@users.noreply.github.com> Date: Thu, 22 Jul 2021 23:19:55 +0530 Subject: [PATCH 0796/1182] Update windows.md (#8701) Merge pull request 8701 --- docs/_docs/installation/windows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/installation/windows.md b/docs/_docs/installation/windows.md index a2e948b3ada..eacd92c6942 100644 --- a/docs/_docs/installation/windows.md +++ b/docs/_docs/installation/windows.md @@ -29,7 +29,7 @@ We only cover RubyInstaller-2.4 and newer here. Older versions need to 4. Check if Jekyll has been installed properly: `jekyll -v` {: .note .info} -You may receive an error when checking if Jekyll has been installed properly. Reboot your system and run `jekyll -v` again. +You may receive an error when checking if Jekyll has not been installed properly. Reboot your system and run `jekyll -v` again. If the error persists, please open a [RubyInstaller issue](https://github.com/oneclick/rubyinstaller2/issues/new). That's it, you're ready to use Jekyll! From 8926ae1aace71babba70b95053f76b6b7dc682be Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:49:56 -0400 Subject: [PATCH 0797/1182] Update history to reflect merge of #8701 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 36fefa52251..316efc58dd6 100644 --- a/History.markdown +++ b/History.markdown @@ -24,6 +24,7 @@ * Add step to set SDKROOT (#8478) * Improve the "Markdown Options" Docs (#8681) * Add 'webrick' warning note to "Quickstart" Docs (#8727) + * Update windows.md (#8701) ### Bug Fixes From 37612632c54a36cabce4b071c3e79e98bbf3df73 Mon Sep 17 00:00:00 2001 From: "jaybe@jekyll" Date: Thu, 22 Jul 2021 12:52:24 -0500 Subject: [PATCH 0798/1182] IRC networks - Libera, Freenode (#8706) Merge pull request 8706 --- docs/_docs/community/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/community/community.md b/docs/_docs/community/community.md index bb8e45c1397..d8e98a057e9 100644 --- a/docs/_docs/community/community.md +++ b/docs/_docs/community/community.md @@ -16,7 +16,7 @@ If you're looking for support for Jekyll, there are a lot of options: * Read the [Jekyll Documentation]({{ '/docs/' | relative_url }}) * If you have a question about using Jekyll, start a discussion on the [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll) -* Chat with Jekyllers — Join our [Gitter channel](https://gitter.im/jekyll/jekyll) or our [IRC channel #jekyll on Freenode](irc://irc.freenode.net/#jekyll) +* Chat with Jekyllers — Join our [Gitter channel](https://gitter.im/jekyll/jekyll) or our IRC channels #jekyll on [Libera](irc://irc.libera.chat/#jekyll) or [Freenode](irc://irc.freenode.net/#jekyll). There are a bunch of helpful community members on these services who are willing to point you in the right direction. From a0ed9550cd58411295a1e6718cd61ba46f65c941 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:52:25 -0400 Subject: [PATCH 0799/1182] Update history to reflect merge of #8706 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 316efc58dd6..71b85aad5d2 100644 --- a/History.markdown +++ b/History.markdown @@ -25,6 +25,7 @@ * Improve the "Markdown Options" Docs (#8681) * Add 'webrick' warning note to "Quickstart" Docs (#8727) * Update windows.md (#8701) + * IRC networks - Libera, Freenode (#8706) ### Bug Fixes From b31f933cd1ee769640364d8305204824b86eb632 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jul 2021 13:53:15 -0400 Subject: [PATCH 0800/1182] Bump check-spelling/check-spelling from 0.0.18 to 0.0.19 (#8740) Merge pull request 8740 --- .github/workflows/spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index cbc72ae28ea..e3825f33a18 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -16,4 +16,4 @@ jobs: - name: checkout if: "!contains(github.event_name, 'pull_request')" uses: actions/checkout@v2.0.0 - - uses: check-spelling/check-spelling@v0.0.18 + - uses: check-spelling/check-spelling@v0.0.19 From 5a441c24e2c5827373b39f039cbc7a8b3d95caa3 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:53:16 -0400 Subject: [PATCH 0801/1182] Update history to reflect merge of #8740 [ci skip] --- History.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/History.markdown b/History.markdown index 71b85aad5d2..483166e89b3 100644 --- a/History.markdown +++ b/History.markdown @@ -1,5 +1,7 @@ ## HEAD + * Bump check-spelling/check-spelling from 0.0.18 to 0.0.19 (#8740) + ### Documentation * typo - do instead of don't (#8518) From 0eb9239151323b11ddcd91bf2e61edefe990443f Mon Sep 17 00:00:00 2001 From: Mike Kasberg Date: Thu, 22 Jul 2021 11:57:51 -0600 Subject: [PATCH 0802/1182] Improve GitHub Flavored Markdown Docs (#8684) Merge pull request 8684 --- docs/_docs/configuration/markdown.md | 13 +++++++------ docs/_tutorials/convert-site-to-jekyll.md | 14 ++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/docs/_docs/configuration/markdown.md b/docs/_docs/configuration/markdown.md index 38904d7a2dd..9cd65a3381d 100644 --- a/docs/_docs/configuration/markdown.md +++ b/docs/_docs/configuration/markdown.md @@ -9,23 +9,24 @@ available. Kramdown is the default Markdown renderer for Jekyll, and often works well with no additional configuration. However, it does support many configuration options. -### GitHub Flavored Markdown +### Kramdown Processor -Kramdown supports GitHub Flavored Markdown (GFM). To use GFM with Kramdown in Jekyll, add the following to your configuration. +By default, Jekyll uses the [GitHub Flavored Markdown (GFM) processor](https://github.com/kramdown/parser-gfm) for Kramdown. (Specifying `input: GFM` is fine, but redundant.) GFM supports a couple additional Kramdown options, documented by [kramdown-parser-gfm](https://github.com/kramdown/parser-gfm). These options can be used directly in your Kramdown Jekyll config, like this: ```yaml kramdown: - input: GFM + gfm_quirks: [paragraph_end] ``` -GFM supports additional Kramdown options, documented at [kramdown-parser-gfm](https://github.com/kramdown/parser-gfm). These options can be used directly in your Kramdown Jekyll config, like this: +You can also change the processor used by Kramdown (as specified for the `input` key in the [Kramdown RDoc](https://kramdown.gettalong.org/rdoc/Kramdown/Document.html#method-c-new)). For example, to use the non-GFM Kramdown processor in Jekyll, add the following to your configuration. ```yaml kramdown: - input: GFM - gfm_quirks: [paragraph_end] + input: Kramdown ``` +Documentation for Kramdown parsers is available in the [Kramdown docs](https://kramdown.gettalong.org/parser/kramdown.html). If you use a Kramdown parser other than Kramdown or GFM, you'll need to add the gem for it. + ### Syntax Highlighting (CodeRay) To use the [CodeRay](http://coderay.rubychan.de/) syntax highlighter with Kramdown, you need to add a dependency on the `kramdown-syntax-coderay` gem. For example, `bundle add kramdown-syntax-coderay`. Then, you'll be able to specify CodeRay in your `syntax_highlighter` config: diff --git a/docs/_tutorials/convert-site-to-jekyll.md b/docs/_tutorials/convert-site-to-jekyll.md index 22b31c659b2..e31c0a1f94f 100644 --- a/docs/_tutorials/convert-site-to-jekyll.md +++ b/docs/_tutorials/convert-site-to-jekyll.md @@ -181,22 +181,16 @@ If you don't specify a layout in your pages, Jekyll will simply render that page ## 4. Add a configuration file -Add a `_config.yml` file in your root directory. In `_config.yml`, you can optionally specify the markdown filter you want. By default, [kramdown](https://kramdown.gettalong.org/) is used (without the need to specify it). If no other filter is specified, your config file will automatically apply the following as a default setting: +Add a `_config.yml` file in your root directory. In `_config.yml`, you can optionally specify the markdown filter you want. By default, the [GitHub Flavored Markdown (GFM) processor](https://github.com/kramdown/parser-gfm) for [kramdown](https://kramdown.gettalong.org/) is used. If no other filter is specified, your config file will automatically apply the following as a [default](/docs/configuration/default/) setting: ```yaml markdown: kramdown -``` - -You can also specify [some options](https://kramdown.gettalong.org/converter/html.html) for kramdown to make it behave more like [GitHub Flavored Markdown (GFM)](https://github.github.com/gfm/): - -```yaml kramdown: - input: GFM - auto_ids: true - hard_wrap: false - syntax_highlighter: rouge + input: GFM ``` +You can find additional [Markdown Options](/docs/configuration/markdown/) in the Jekyll docs, though it's unlikely that you'll need them. + ## 5. Test your pages Now run `jekyll serve` and toggle between your `index.html` and `about.html` pages. The default layout should load for both pages. From beca094841e4e1468bc6d90f0911f0da2ccf642d Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:57:52 -0400 Subject: [PATCH 0803/1182] Update history to reflect merge of #8684 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 483166e89b3..acec20bd92a 100644 --- a/History.markdown +++ b/History.markdown @@ -28,6 +28,7 @@ * Add 'webrick' warning note to "Quickstart" Docs (#8727) * Update windows.md (#8701) * IRC networks - Libera, Freenode (#8706) + * Improve GitHub Flavored Markdown Docs (#8684) ### Bug Fixes From 3f46f02108048f2151724220d0037cbce09f483e Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Fri, 23 Jul 2021 01:58:40 +0800 Subject: [PATCH 0804/1182] Update rubocop from 1.12 to 1.18 and min ruby from 2.4 to 2.5 (#8741) Merge pull request 8741 --- .github/workflows/ci.yml | 2 +- .rubocop.yml | 2 +- Gemfile | 2 +- docs/_data/ruby.yml | 2 +- jekyll.gemspec | 2 +- .../converters/markdown/kramdown_parser.rb | 2 +- lib/jekyll/external.rb | 38 +++++++++---------- lib/jekyll/page.rb | 2 +- lib/jekyll/renderer.rb | 16 ++++---- lib/jekyll/tags/include.rb | 2 +- test/test_utils.rb | 8 ++-- 11 files changed, 35 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6769f529ec3..f43133339fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: fail-fast: false matrix: ruby_version: - - 2.4 # Minimum required Ruby version in gemspec + - 2.5 # Minimum required Ruby version in gemspec steps: - uses: actions/checkout@v2 - name: Download released earth diff --git a/.rubocop.yml b/.rubocop.yml index 49c69dcc8e6..6d5256a8f16 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ Jekyll/NoPutsAllowed: - rake/*.rake AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 Include: - lib/**/*.rb - test/**/*.rb diff --git a/Gemfile b/Gemfile index 615fc9de015..e521f771d37 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ group :test do gem "nokogiri", "~> 1.7" gem "rspec" gem "rspec-mocks" - gem "rubocop", "~> 1.12.0" + gem "rubocop", "~> 1.18.3" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-rake" diff --git a/docs/_data/ruby.yml b/docs/_data/ruby.yml index 640c5e0bf8b..10b6bfeadfb 100644 --- a/docs/_data/ruby.yml +++ b/docs/_data/ruby.yml @@ -1,3 +1,3 @@ -min_version: 2.4.0 +min_version: 2.5.0 current_version: 3.0.0 current_version_output: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) diff --git a/jekyll.gemspec b/jekyll.gemspec index 9bb5376657f..f835fea1981 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |s| s.rdoc_options = ["--charset=UTF-8"] s.extra_rdoc_files = %w(README.markdown LICENSE) - s.required_ruby_version = ">= 2.4.0" + s.required_ruby_version = ">= 2.5.0" s.required_rubygems_version = ">= 2.7.0" s.add_runtime_dependency("addressable", "~> 2.4") diff --git a/lib/jekyll/converters/markdown/kramdown_parser.rb b/lib/jekyll/converters/markdown/kramdown_parser.rb index a93184b8849..6751480739e 100644 --- a/lib/jekyll/converters/markdown/kramdown_parser.rb +++ b/lib/jekyll/converters/markdown/kramdown_parser.rb @@ -160,7 +160,7 @@ def highlighter def strip_coderay_prefix(hash) hash.each_with_object({}) do |(key, val), hsh| - cleaned_key = key.to_s.gsub(%r!\Acoderay_!, "") + cleaned_key = key.to_s.delete_prefix("coderay_") if key != cleaned_key Jekyll::Deprecator.deprecation_message( diff --git a/lib/jekyll/external.rb b/lib/jekyll/external.rb index d42762ee018..b484160c8eb 100644 --- a/lib/jekyll/external.rb +++ b/lib/jekyll/external.rb @@ -22,13 +22,11 @@ def blessed_gems # def require_if_present(names) Array(names).each do |name| - begin - require name - rescue LoadError - Jekyll.logger.debug "Couldn't load #{name}. Skipping." - yield(name, version_constraint(name)) if block_given? - false - end + require name + rescue LoadError + Jekyll.logger.debug "Couldn't load #{name}. Skipping." + yield(name, version_constraint(name)) if block_given? + false end end @@ -55,23 +53,21 @@ def version_constraint(gem_name) # def require_with_graceful_fail(names) Array(names).each do |name| - begin - Jekyll.logger.debug "Requiring:", name.to_s - require name - rescue LoadError => e - Jekyll.logger.error "Dependency Error:", <<~MSG - Yikes! It looks like you don't have #{name} or one of its dependencies installed. - In order to use Jekyll as currently configured, you'll need to install this gem. + Jekyll.logger.debug "Requiring:", name.to_s + require name + rescue LoadError => e + Jekyll.logger.error "Dependency Error:", <<~MSG + Yikes! It looks like you don't have #{name} or one of its dependencies installed. + In order to use Jekyll as currently configured, you'll need to install this gem. - If you've run Jekyll with `bundle exec`, ensure that you have included the #{name} - gem in your Gemfile as well. + If you've run Jekyll with `bundle exec`, ensure that you have included the #{name} + gem in your Gemfile as well. - The full error message from Ruby is: '#{e.message}' + The full error message from Ruby is: '#{e.message}' - If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/! - MSG - raise Jekyll::Errors::MissingDependencyException, name - end + If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/! + MSG + raise Jekyll::Errors::MissingDependencyException, name end end end diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 8b3245fb5e0..3797f880969 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -144,7 +144,7 @@ def path # The path to the page source file, relative to the site source def relative_path - @relative_path ||= PathManager.join(@dir, @name).sub(%r!\A/!, "") + @relative_path ||= PathManager.join(@dir, @name).delete_prefix("/") end # Obtain destination path. diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index 6a08a12b0e6..ddf078fdfc0 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -102,15 +102,13 @@ def render_document # Returns String the converted content. def convert(content) converters.reduce(content) do |output, converter| - begin - converter.convert output - rescue StandardError => e - Jekyll.logger.error "Conversion error:", - "#{converter.class} encountered an error while "\ - "converting '#{document.relative_path}':" - Jekyll.logger.error("", e.to_s) - raise e - end + converter.convert output + rescue StandardError => e + Jekyll.logger.error "Conversion error:", + "#{converter.class} encountered an error while "\ + "converting '#{document.relative_path}':" + Jekyll.logger.error("", e.to_s) + raise e end end diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index e6fe059afb7..a3ea8ff63be 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -260,7 +260,7 @@ def page_path(context) def resource_path(page, site) path = page["path"] path = File.join(site.config["collections_dir"], path) if page["collection"] - path.sub(%r!/#excerpt\z!, "") + path.delete_suffix("/#excerpt") end end end diff --git a/test/test_utils.rb b/test/test_utils.rb index 1b3534e4f27..40549aa80ff 100644 --- a/test/test_utils.rb +++ b/test/test_utils.rb @@ -130,11 +130,9 @@ class TestUtils < JekyllUnitTest context "The \`Utils.slugify\` method" do should "return nil if passed nil" do - begin - assert Utils.slugify(nil).nil? - rescue NoMethodError - assert false, "Threw NoMethodError" - end + assert Utils.slugify(nil).nil? + rescue NoMethodError + assert false, "Threw NoMethodError" end should "replace whitespace with hyphens" do From 0ce9a7c179602a61b87a47516f3da4ed46bea81c Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 22 Jul 2021 13:58:42 -0400 Subject: [PATCH 0805/1182] Update history to reflect merge of #8741 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index acec20bd92a..52c773bf4a3 100644 --- a/History.markdown +++ b/History.markdown @@ -56,6 +56,7 @@ * Regenerate supported mime types (#8542) * Update include tag to be more permissive (#8618) * Optimize `Jekyll::Utils.parse_date` (#8425) + * Update rubocop from 1.12 to 1.18 and min ruby from 2.4 to 2.5 (#8741) ### Site Enhancements From 9bb98edb2955b41d6221838070d940b6377af95e Mon Sep 17 00:00:00 2001 From: Aram Akhavan Date: Fri, 23 Jul 2021 07:42:15 -0700 Subject: [PATCH 0806/1182] use location.protocol to inject the livereload script instead of forcing http (#8718) Merge pull request 8718 --- lib/jekyll/commands/serve/servlet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/commands/serve/servlet.rb b/lib/jekyll/commands/serve/servlet.rb index 2544616adf3..cee9c663a8a 100644 --- a/lib/jekyll/commands/serve/servlet.rb +++ b/lib/jekyll/commands/serve/servlet.rb @@ -101,7 +101,7 @@ def template @template ||= ERB.new(<<~TEMPLATE) diff --git a/docs/_includes/docs_contents.html b/docs/_includes/docs_contents.html index 931500a90b2..8b7b19dacab 100644 --- a/docs/_includes/docs_contents.html +++ b/docs/_includes/docs_contents.html @@ -1,14 +1,17 @@
    diff --git a/docs/_includes/docs_contents_mobile.html b/docs/_includes/docs_contents_mobile.html index 6574b6a940b..a8c2b3b6d6a 100644 --- a/docs/_includes/docs_contents_mobile.html +++ b/docs/_includes/docs_contents_mobile.html @@ -1,15 +1,15 @@
    - - {% for section in site.data.docs_nav -%} - - {%- for item in section.docs -%} - {% assign p = site.docs | where: "url", item.link | first %} - - {%- endfor %} - - {% endfor -%} + {% for section in site.data.docs_nav %} + + {%- for item in section.docs -%} + {% assign page = site.docs | where: "url", item.link | first %} + + {%- endfor %} + + {% endfor %} -
    +
    \ No newline at end of file diff --git a/docs/_includes/mobile-nav-items.html b/docs/_includes/mobile-nav-items.html index 5dd9b86d206..ca337ba378d 100644 --- a/docs/_includes/mobile-nav-items.html +++ b/docs/_includes/mobile-nav-items.html @@ -3,12 +3,12 @@ {% if p.show_on_mobile -%}
  • {{ p.title }}
  • {% endif -%} {% endfor -%} -
  • GitHub
  • - +
  • GitHub
  • + \ No newline at end of file diff --git a/docs/_includes/news_contents_mobile.html b/docs/_includes/news_contents_mobile.html index 84972788ac5..6f6a98e4734 100644 --- a/docs/_includes/news_contents_mobile.html +++ b/docs/_includes/news_contents_mobile.html @@ -1,5 +1,5 @@
    - @@ -8,4 +8,4 @@ {% endfor -%} -
    +
    \ No newline at end of file diff --git a/docs/_includes/news_item.html b/docs/_includes/news_item.html index 51bc9cdff1f..6529a5f7a6a 100644 --- a/docs/_includes/news_item.html +++ b/docs/_includes/news_item.html @@ -1,5 +1,5 @@ -
    -

    + diff --git a/docs/_includes/news_item_archive.html b/docs/_includes/news_item_archive.html index bccf6523d84..c5e865455ff 100644 --- a/docs/_includes/news_item_archive.html +++ b/docs/_includes/news_item_archive.html @@ -1,4 +1,4 @@ -
    +
    diff --git a/docs/_includes/search/input.html b/docs/_includes/search/input.html index 729f5cabdfd..65015ee406c 100644 --- a/docs/_includes/search/input.html +++ b/docs/_includes/search/input.html @@ -1 +1 @@ - + \ No newline at end of file diff --git a/docs/_includes/search/script.html b/docs/_includes/search/script.html index dca756d7709..7ddd1280fed 100644 --- a/docs/_includes/search/script.html +++ b/docs/_includes/search/script.html @@ -1,9 +1,9 @@ - + diff --git a/docs/_includes/top.html b/docs/_includes/top.html index c0e203c33f4..0868d0cf43d 100644 --- a/docs/_includes/top.html +++ b/docs/_includes/top.html @@ -1,5 +1,5 @@ - - + + diff --git a/docs/_includes/tutorials_contents_mobile.html b/docs/_includes/tutorials_contents_mobile.html index 080788d5fe4..4a8a9478382 100644 --- a/docs/_includes/tutorials_contents_mobile.html +++ b/docs/_includes/tutorials_contents_mobile.html @@ -1,14 +1,14 @@
    - {% for section in site.data.tutorials -%} - - {% for item in section.tutorials -%} - {% assign item_url = item | prepend:"/tutorials/" | append:"/" -%} - {% assign tutorial = site.tutorials | where: "url", item_url | first -%} - - {% endfor -%} - + + {% for item in section.tutorials -%} + {% assign item_url = item | prepend:"/tutorials/" | append:"/" -%} + {% assign tutorial = site.tutorials | where: "url", item_url | first -%} + + {% endfor -%} + {% endfor -%} -
    + \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 9234c13c754..fb30f981d0a 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -9,5 +9,16 @@ {%- include anchor_links.html -%} {%- include analytics.html -%} {%- include search/script.html -%} + + diff --git a/docs/_layouts/news_item.html b/docs/_layouts/news_item.html index 5b0960e97b6..7be7bf76bc9 100644 --- a/docs/_layouts/news_item.html +++ b/docs/_layouts/news_item.html @@ -2,8 +2,8 @@ layout: news --- -
    -

    + From 839007fa158ccd8d78fc956f9f265c249865a91a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 12 Jan 2024 08:57:17 -0800 Subject: [PATCH 1169/1182] Update history to reflect merge of #9338 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index d103140156e..ec304e9bc3d 100644 --- a/History.markdown +++ b/History.markdown @@ -37,6 +37,7 @@ * Fix broken links for several Jekyll integrations (#9496) * Add release post for v4.3.3 (#9511) * Add docs version badge to page_excerpts feature (#9520) + * Improve accessibility of the docs (#9338) ### Development Fixes From 01da87c5f9c466205a4ebbc4747e390616585c3c Mon Sep 17 00:00:00 2001 From: Akira Taguchi Date: Fri, 12 Jan 2024 19:05:00 +0200 Subject: [PATCH 1170/1182] Fix gem quote consistency on docs (#9517) Merge pull request 9517 --- docs/_docs/continuous-integration/circleci.md | 4 ++-- docs/_docs/continuous-integration/github-actions.md | 4 ++-- docs/_docs/installation/windows.md | 2 +- docs/_docs/step-by-step/10-deployment.md | 8 ++++---- docs/_docs/upgrading/2-to-3.md | 2 +- docs/_posts/2019-08-19-jekyll-4-0-0-released.markdown | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/_docs/continuous-integration/circleci.md b/docs/_docs/continuous-integration/circleci.md index fb1275a5c8f..d2e317df181 100644 --- a/docs/_docs/continuous-integration/circleci.md +++ b/docs/_docs/continuous-integration/circleci.md @@ -30,8 +30,8 @@ source 'https://rubygems.org' ruby '2.7.4' -gem 'jekyll' -gem 'html-proofer' +gem "jekyll" +gem "html-proofer" ``` ```yaml diff --git a/docs/_docs/continuous-integration/github-actions.md b/docs/_docs/continuous-integration/github-actions.md index 932f7ebbb72..caba322f9ff 100644 --- a/docs/_docs/continuous-integration/github-actions.md +++ b/docs/_docs/continuous-integration/github-actions.md @@ -61,10 +61,10 @@ Welcome to My Home Page source 'https://rubygems.org' -gem 'jekyll', '~> 4.2' +gem "jekyll", "~> 4.2" group :jekyll_plugins do - gem 'jekyll-timeago', '~> 0.13.1' + gem "jekyll-timeago", "~> 0.13.1" end ``` diff --git a/docs/_docs/installation/windows.md b/docs/_docs/installation/windows.md index 6e3e5b1a0c0..1a4920f382e 100644 --- a/docs/_docs/installation/windows.md +++ b/docs/_docs/installation/windows.md @@ -138,7 +138,7 @@ While `listen` has built-in support for UNIX systems, it may require an extra ge Add the following to the `Gemfile` for your site if you have issues with auto-regeneration on Windows alone: ```ruby -gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform? +gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? ``` You have to use a [Ruby+Devkit](https://rubyinstaller.org/downloads/) version of the RubyInstaller and install diff --git a/docs/_docs/step-by-step/10-deployment.md b/docs/_docs/step-by-step/10-deployment.md index 7fd0d08fe37..6c41f4e0831 100644 --- a/docs/_docs/step-by-step/10-deployment.md +++ b/docs/_docs/step-by-step/10-deployment.md @@ -68,12 +68,12 @@ in a `jekyll_plugins` group they'll automatically be required into Jekyll: ```ruby source 'https://rubygems.org' -gem 'jekyll' +gem "jekyll" group :jekyll_plugins do - gem 'jekyll-sitemap' - gem 'jekyll-feed' - gem 'jekyll-seo-tag' + gem "jekyll-sitemap" + gem "jekyll-feed" + gem "jekyll-seo-tag" end ``` diff --git a/docs/_docs/upgrading/2-to-3.md b/docs/_docs/upgrading/2-to-3.md index 5c5d5ded8ce..2426a5762f2 100644 --- a/docs/_docs/upgrading/2-to-3.md +++ b/docs/_docs/upgrading/2-to-3.md @@ -93,7 +93,7 @@ it's now [Rouge](https://github.com/rouge-ruby/rouge). If you were using the `hi options, such as `hl_lines`, they may not be available when using Rouge. To go back to using Pygments, set `highlighter: pygments` in your `_config.yml` file and run `gem install pygments.rb` or add -`gem 'pygments.rb'` to your project's `Gemfile`. +`gem "pygments.rb"` to your project's `Gemfile`. ### Relative Permalink support removed diff --git a/docs/_posts/2019-08-19-jekyll-4-0-0-released.markdown b/docs/_posts/2019-08-19-jekyll-4-0-0-released.markdown index dec7401e18d..fe3a84ee012 100644 --- a/docs/_posts/2019-08-19-jekyll-4-0-0-released.markdown +++ b/docs/_posts/2019-08-19-jekyll-4-0-0-released.markdown @@ -82,7 +82,7 @@ First, read the [upgrade guide](/docs/upgrading/3-to-4/)! Next, Edit your project's `Gemfile` to test Jekyll v4.x: ```ruby -gem "jekyll", "~> 4.0" +gem 'jekyll', '~> 4.0' ``` Then run `bundle update` to update all dependencies. Unless you're using From 42dd477f8a449b16cacb94e4d966000106718430 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 12 Jan 2024 09:05:01 -0800 Subject: [PATCH 1171/1182] Update history to reflect merge of #9517 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index ec304e9bc3d..df7e316ba8e 100644 --- a/History.markdown +++ b/History.markdown @@ -38,6 +38,7 @@ * Add release post for v4.3.3 (#9511) * Add docs version badge to page_excerpts feature (#9520) * Improve accessibility of the docs (#9338) + * Fix gem quote consistency on docs (#9517) ### Development Fixes From db3437a34fb9a050a758ed7b6eda90ab302c264d Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 12 Jan 2024 20:48:56 -0600 Subject: [PATCH 1172/1182] chore: Bump the required ruby version to 2.7 (#9525) Merge pull request 9525 --- jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.gemspec b/jekyll.gemspec index 9c5e9dfd206..bd60d43068a 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |s| s.rdoc_options = ["--charset=UTF-8"] s.extra_rdoc_files = %w(README.markdown LICENSE) - s.required_ruby_version = ">= 2.5.0" + s.required_ruby_version = ">= 2.7.0" s.required_rubygems_version = ">= 2.7.0" s.add_dependency("csv", "~> 3.0") From b38b7a14798d7231db8ef77d29db1eedeed51f47 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Fri, 12 Jan 2024 18:48:58 -0800 Subject: [PATCH 1173/1182] Update history to reflect merge of #9525 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index df7e316ba8e..699a60c5097 100644 --- a/History.markdown +++ b/History.markdown @@ -76,6 +76,7 @@ * Handle TypeError from `where` filter gracefully (#9292) * Add support for upcoming logger 1.4.3 (#9392) * Fix typo in devcontainer.json (#9364) + * Bump the minimum ruby version to 2.7 (#9525) ## 4.3.3 / 2023-12-27 From 8f2b53172f233507cc624313a0d2a34d77c96a15 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 17 Jan 2024 00:58:28 -0600 Subject: [PATCH 1174/1182] fix: make search work again (#9530) Merge pull request 9530 --- docs/_includes/search/script.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/search/script.html b/docs/_includes/search/script.html index 7ddd1280fed..dca756d7709 100644 --- a/docs/_includes/search/script.html +++ b/docs/_includes/search/script.html @@ -1,9 +1,9 @@ - + From 860d730ff33d31a4e922da0e08b46f25434ba59a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Tue, 16 Jan 2024 22:58:30 -0800 Subject: [PATCH 1175/1182] Update history to reflect merge of #9530 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 699a60c5097..f709c1e843b 100644 --- a/History.markdown +++ b/History.markdown @@ -39,6 +39,7 @@ * Add docs version badge to page_excerpts feature (#9520) * Improve accessibility of the docs (#9338) * Fix gem quote consistency on docs (#9517) + * Make site search work again (#9530) ### Development Fixes From 84a29bd1429819416bc6454b1374be67b7043bdb Mon Sep 17 00:00:00 2001 From: Parker Moore <237985+parkr@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:53:21 -0800 Subject: [PATCH 1176/1182] Add a few more emeritus team members (#9535) Merge pull request 9535 --- docs/pages/team.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/pages/team.md b/docs/pages/team.md index 901eb729f46..279df20a485 100644 --- a/docs/pages/team.md +++ b/docs/pages/team.md @@ -26,7 +26,10 @@ patch security vulnerabilities reported to them._ _Emeritus Core Team Members were once members of Jekyll's Core Team._ * Alfred (@alfredxing) +* Ben (@benbalter) * Frank (@DirtyF) * Nick (@qrush) +* Olivia * Parker (@parkr) +* Pat (@pathawks) * Tom (@mojombo) From 12ab35011f6e86d49c7781514f9dd1d92e43ea11 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Tue, 23 Jan 2024 10:53:22 -0800 Subject: [PATCH 1177/1182] Update history to reflect merge of #9535 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index f709c1e843b..77e56558303 100644 --- a/History.markdown +++ b/History.markdown @@ -66,6 +66,7 @@ * Update rubocop gem (#9476) * Fix Performance/StringIdentifierArgument violation in site.rb and allow activesupport 6 for windows tests (#9512) * Add csv to runtime dependency list (#9522) + * Add a few more emeritus team members (#9535) ### Bug Fixes From 22c756a2e06d63d71ccda2e389fbfda915df6c25 Mon Sep 17 00:00:00 2001 From: velle Date: Tue, 13 Feb 2024 04:01:16 +0100 Subject: [PATCH 1178/1182] Jekyll docs template typo - All pages show "Deployment" (#9548) Merge pull request 9548 --- docs/_includes/docs_contents.html | 8 ++++---- docs/_includes/docs_contents_mobile.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/_includes/docs_contents.html b/docs/_includes/docs_contents.html index 8b7b19dacab..0bbdb1dc059 100644 --- a/docs/_includes/docs_contents.html +++ b/docs/_includes/docs_contents.html @@ -4,13 +4,13 @@

    {{ section.title }}

    {% endfor -%} diff --git a/docs/_includes/docs_contents_mobile.html b/docs/_includes/docs_contents_mobile.html index a8c2b3b6d6a..a639c53b2d0 100644 --- a/docs/_includes/docs_contents_mobile.html +++ b/docs/_includes/docs_contents_mobile.html @@ -4,12 +4,12 @@ {% for section in site.data.docs_nav %} {%- for item in section.docs -%} - {% assign page = site.docs | where: "url", item.link | first %} - {%- endfor %} {% endfor %} - \ No newline at end of file + From c7e9061da3f0c60ead24ee887ae10db56c47c3df Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 12 Feb 2024 19:01:18 -0800 Subject: [PATCH 1179/1182] Update history to reflect merge of #9548 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 77e56558303..edf9d4eef35 100644 --- a/History.markdown +++ b/History.markdown @@ -40,6 +40,7 @@ * Improve accessibility of the docs (#9338) * Fix gem quote consistency on docs (#9517) * Make site search work again (#9530) + * Jekyll docs template typo - All pages show "Deployment" (#9548) ### Development Fixes From dbbfc5d48c81cf424f29c7b0eebf10886bc99904 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 12 Feb 2024 20:19:22 -0800 Subject: [PATCH 1180/1182] Update history to reflect merge of #9550 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index edf9d4eef35..0ca20bb2d05 100644 --- a/History.markdown +++ b/History.markdown @@ -3,6 +3,7 @@ ### Minor Enhancements * Allow marking specific highlighted lines via Liquid (#9138) + * 3.9-stable: allow Pages to be Excerpted (#9550) ### Documentation From c85bd153407a238df4ac79fedfa19f340dc5a4e4 Mon Sep 17 00:00:00 2001 From: a story Date: Wed, 24 Apr 2024 02:58:59 +0800 Subject: [PATCH 1181/1182] Fixed: Wrong navigation style on the right side of news and docs pages (#9586) Merge pull request 9586 --- docs/_includes/docs_contents.html | 2 +- docs/_includes/news_contents.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_includes/docs_contents.html b/docs/_includes/docs_contents.html index 0bbdb1dc059..04cb94f0a0a 100644 --- a/docs/_includes/docs_contents.html +++ b/docs/_includes/docs_contents.html @@ -10,7 +10,7 @@

    {{ section.title }}

    {{ item_page.menu_name | default: item_page.title }} {% endcapture %} - {{ item_html }} + {{ item_html }} {% endfor %} {% endfor -%} diff --git a/docs/_includes/news_contents.html b/docs/_includes/news_contents.html index ea0a558e401..e8f7ed17f2a 100644 --- a/docs/_includes/news_contents.html +++ b/docs/_includes/news_contents.html @@ -1,10 +1,10 @@