Compare commits

..

67 Commits

Author SHA1 Message Date
Alexey Pelykh
1898ced3c4 Added docs for enhanced link tag 2018-05-07 14:09:11 +05:30
Ashwin Maroli
5d924f6216 Merge branch 'master' into docs-40 2018-05-07 14:05:49 +05:30
Frank Taillandier
9e76d2b496 Merge pull request #6993 from ashmaroli/revert-docs-liquified-link
Revert update to docs meant for v4.0
2018-05-07 10:21:20 +02:00
Ashwin Maroli
192df096b0 Revert update to docs meant for v4.0 2018-05-07 13:43:41 +05:30
jekyllbot
694800270a Update history to reflect merge of #6990 [ci skip] 2018-05-07 03:45:34 -04:00
Nikita Skalkin
2a6ec9788b Docs for remove support for Redcarpet (#6990)
Merge pull request 6990
2018-05-07 03:45:32 -04:00
jekyllbot
7612056bed Update history to reflect merge of #6987 [ci skip] 2018-05-06 10:18:04 -04:00
Nikita Skalkin
e0758ba550 Remove support for Redcarpet (#6987)
Merge pull request 6987
2018-05-06 10:18:02 -04:00
Frank Taillandier
1d8d6be243 rdiscount is not supported anymore 2018-05-04 19:50:38 +02:00
Frank Taillandier
41fa9cda36 Fix tests
Co-Authored-By: ashmaroli <ashmaroli@users.noreply.github.com>
2018-05-04 14:14:44 +02:00
jekyllbot
be25b47486 Update history to reflect merge of #6978 [ci skip] 2018-05-03 10:03:57 -04:00
Ashwin Maroli
f8dfbd2f7b Drop support for older versions of Rouge (#6978)
Merge pull request 6978
2018-05-03 10:03:55 -04:00
jekyllbot
acdbf81476 Update history to reflect merge of #6551 [ci skip] 2018-05-03 08:53:32 -04:00
Ashwin Maroli
7e1afd32a5 Suggest re-running command with --trace on fail (#6551)
Merge pull request 6551
2018-05-03 08:53:30 -04:00
Frank Taillandier
1eff0214d1 Update index.html 2018-05-03 10:43:10 +02:00
Frank Taillandier
bb1889afe4 Update quickstart.md 2018-05-03 10:41:04 +02:00
jekyllbot
3eb73f2795 Update history to reflect merge of #6269 [ci skip] 2018-05-02 19:58:14 -04:00
Alexey Pelykh
b95151c4a7 Liquefied link tag (#6269)
Merge pull request 6269
2018-05-02 19:58:12 -04:00
jekyllbot
c0ae27f068 Update history to reflect merge of #6926 [ci skip] 2018-05-02 16:59:34 -04:00
Lars Kanis
64677e7c36 Update Windows install docs (#6926)
Merge pull request 6926
2018-05-02 16:59:32 -04:00
jekyllbot
3899bf52f8 Update history to reflect merge of #6977 [ci skip] 2018-05-02 14:46:39 -04:00
Pat Hawks
15f1ed8c4f We are not using Ruby 2.2 anymore (#6977)
Merge pull request 6977
2018-05-02 14:46:37 -04:00
jekyllbot
b6201db17f Update history to reflect merge of #6976 [ci skip] 2018-05-02 12:14:21 -04:00
Nikita Skalkin
ed9e72db9e yajl-ruby update to v1.4.0 (#6976)
Merge pull request 6976
2018-05-02 12:14:19 -04:00
jekyllbot
a499018dc8 Update history to reflect merge of #6975 [ci skip] 2018-05-02 07:33:55 -04:00
Pat Hawks
c08b882717 Update instructions for releasing docs Gem (#6975)
Merge pull request 6975
2018-05-02 07:33:53 -04:00
Pat Hawks
b0a1c42222 Merge branch '3.8-stable' 2018-05-01 15:12:42 -05:00
jekyllbot
da6c4c488a Update history to reflect merge of #6956 [ci skip] 2018-05-01 13:57:27 -04:00
Karel Bílek
a80442ee87 Add version number for group_by_exp doc (#6956)
Merge pull request 6956
2018-05-01 13:57:25 -04:00
jekyllbot
305342ffa4 Update history to reflect merge of #6959 [ci skip] 2018-05-01 11:04:40 -04:00
Ashwin Maroli
b22e281bc5 Liquify documents unless published == false (#6959)
Merge pull request 6959
2018-05-01 11:04:38 -04:00
jekyllbot
5b37555835 Update history to reflect merge of #6931 [ci skip] 2018-05-01 09:33:53 -04:00
jekyllbot
95a103b882 bump i18n (#6931)
Merge pull request 6931
2018-05-01 09:33:51 -04:00
jekyllbot
12fa319ee4 Update history to reflect merge of #6967 [ci skip] 2018-05-01 08:37:46 -04:00
Pat Hawks
9461c900c0 Loggers should accept both numbers and symbols (#6967)
Merge pull request 6967
2018-05-01 08:37:45 -04:00
Pat Hawks
e00c8c72e9 Backported to 3.8-stable, NOT master 2018-04-30 19:52:50 -05:00
jekyllbot
3e8196fc7e Update history to reflect merge of #6970 [ci skip] 2018-04-30 20:49:18 -04:00
jekyllbot
eea203c77e Update history to reflect merge of #6951 [ci skip] 2018-04-30 20:00:13 -04:00
Ashwin Maroli
8c8e2db0e5 Memoize computing excerpt's relative_path (#6951)
Merge pull request 6951
2018-04-30 20:00:11 -04:00
jekyllbot
ebce53dd08 Update history to reflect merge of #6968 [ci skip] 2018-04-30 18:29:25 -04:00
030
34b710e133 [#6920] prevent that vendor folder will be committed (#6968)
Merge pull request 6968
2018-04-30 18:29:23 -04:00
jekyllbot
f686b244cf Update history to reflect merge of #6969 [ci skip] 2018-04-30 15:40:13 -04:00
Chris Finazzo
739411ff3b Fix typo (#6969)
Merge pull request 6969
2018-04-30 15:40:11 -04:00
jekyllbot
c8eb0c1950 Update history to reflect merge of #6781 [ci skip] 2018-04-30 15:03:35 -04:00
Damien Solodow
27ca1282fa update windows doc (#6781)
Merge pull request 6781
2018-04-30 15:03:34 -04:00
jekyllbot
b22915fe22 Update history to reflect merge of #6770 [ci skip] 2018-04-30 15:01:00 -04:00
Ashwin Maroli
cf6d60b145 remove unnecessary Jekyll::Page constant (#6770)
Merge pull request 6770
2018-04-30 15:00:58 -04:00
jekyllbot
c60dd66db5 Update history to reflect merge of #6560 [ci skip] 2018-04-30 11:44:50 -04:00
Ashwin Maroli
c2851766c5 Drop support for Ruby 2.1 and 2.2 (#6560)
Merge pull request 6560
2018-04-30 11:44:48 -04:00
jekyllbot
c27533c75d Update history to reflect merge of #6511 [ci skip] 2018-04-30 11:19:45 -04:00
Ashwin Maroli
f81f1e8e1b remove unused error class (#6511)
Merge pull request 6511
2018-04-30 11:19:43 -04:00
jekyllbot
99da7cd940 Update history to reflect merge of #6927 [ci skip] 2018-04-30 10:59:35 -04:00
Chris Finazzo
3e32d12c45 WIP: Do not advise users to install Jekyll outside of Bundler (#6927)
Merge pull request 6927
2018-04-30 10:59:33 -04:00
jekyllbot
3af8553c7c Update history to reflect merge of #6945 [ci skip] 2018-04-26 01:58:27 -04:00
Ashwin Maroli
7f9ac93e4f Fix rendering Liquid constructs in excerpts (#6945)
Merge pull request 6945
2018-04-26 01:58:25 -04:00
jekyllbot
4dd00fd354 Update history to reflect merge of #6949 [ci skip] 2018-04-22 22:11:47 -04:00
Monica Powell
3ee71c048c Updated casing of SaaS (#6949)
Merge pull request 6949
2018-04-22 22:11:45 -04:00
jekyllbot
77fe78eaf7 Update history to reflect merge of #6934 [ci skip] 2018-04-22 16:28:47 -04:00
olivia
0dede77a4a Add 4.0 development post (#6934)
Merge pull request 6934
2018-04-22 16:28:45 -04:00
jekyllbot
f9f5d5fa57 Update history to reflect merge of #6946 [ci skip] 2018-04-22 08:35:07 -04:00
Robert Riemann
d5c2ebe610 add liquid tag jekyll-flickr (#6946)
Merge pull request 6946
2018-04-22 08:35:05 -04:00
jekyllbot
f691121d2b Update history to reflect merge of #6932 [ci skip] 2018-04-20 15:24:41 -04:00
jekyllbot
29787c7eb7 use jekyll-compose if installed (#6932)
Merge pull request 6932
2018-04-20 15:24:39 -04:00
jekyllbot
83d950a4b7 Update history to reflect merge of #6925 [ci skip] 2018-04-20 05:29:24 -04:00
Mike Kasberg
5966e84313 Add Installation Instructions for Ubuntu (#6925)
Merge pull request 6925
2018-04-20 05:29:22 -04:00
jekyllbot
66a8a03124 Update history to reflect merge of #6849 [ci skip] 2018-04-19 11:08:03 -04:00
Ashwin Maroli
40d6ebd85e Release post for v3.8.0 (#6849)
Merge pull request 6849
2018-04-19 11:08:01 -04:00
107 changed files with 795 additions and 2579 deletions

View File

@@ -1,77 +0,0 @@
name: Continuous Integration
on:
push:
branches:
- master
- "*-stable"
pull_request:
branches:
- master
- "*-stable"
jobs:
ci:
name: "Run Tests (${{ matrix.label }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
include:
- label: Ruby 2.5
ruby_version: "2.5"
- label: Ruby 2.7
ruby_version: "2.7"
- label: Ruby 3.0
ruby_version: "3.0"
- label: Ruby 3.1
ruby_version: "3.1"
- label: Ruby 3.2
ruby_version: "3.2"
- label: Ruby 3.3
ruby_version: "3.3"
- label: JRuby 9.2.20.1
ruby_version: "jruby-9.2.20.1"
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: "Set up ${{ matrix.label }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
cache-version: 2
- name: Run Minitest based tests
run: bash script/test
- name: Run Cucumber based tests
if: "!contains(matrix.ruby_version, 'jruby')"
run: bash script/cucumber
- name: Generate and Build a new site
run: bash script/default-site
xtras:
name: "${{ matrix.job_name }} (Ruby ${{ matrix.ruby_version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
include:
- job_name: "Profile Docs Site"
step_name: "Build and Profile docs site"
script_file: "profile-docs"
ruby_version: "2.5"
- job_name: "Style Check"
step_name: "Run RuboCop"
script_file: "fmt"
ruby_version: "2.5"
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
cache-version: 2
- name: ${{ matrix.step_name }}
run: bash script/${{ matrix.script_file }}

View File

@@ -1,34 +0,0 @@
name: Release Gem
on:
push:
branches:
- master
- "*-stable"
paths:
- "lib/**/version.rb"
jobs:
release:
if: "github.repository_owner == 'jekyll'"
name: "Release Gem (Ruby ${{ matrix.ruby_version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: true
matrix:
ruby_version:
- 2.7
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Build and Publish Gem
uses: ashmaroli/release-gem@dist
with:
gemspec_name: jekyll
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }}

View File

@@ -1,39 +0,0 @@
name: Third-Party Repository Profiling
on:
push:
branches:
- 3.9-stable
pull_request:
branches:
- 3.9-stable
jobs:
build_n_profile:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
runs-on: 'ubuntu-latest'
env:
BUNDLE_GEMFILE: "sandbox/Gemfile"
BUNDLE_PATH: "vendor/bundle"
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
steps:
- name: Checkout Jekyll
uses: actions/checkout@v2
with:
fetch-depth: 5
path: jekyll
- name: Checkout Third-Party Repository
uses: actions/checkout@v2
with:
repository: ashmaroli/tomjoht.github.io
path: sandbox
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Run Jekyll Build 3 times
run: |
bundle exec jekyll build -s sandbox -d sandbox/_site --trace
bundle exec jekyll build -s sandbox -d sandbox/_site --trace
bundle exec jekyll build -s sandbox -d sandbox/_site --trace

View File

@@ -8,7 +8,7 @@ Jekyll/NoPutsAllowed:
- rake/*.rake
AllCops:
TargetRubyVersion: 2.1
TargetRubyVersion: 2.3
Include:
- lib/**/*.rb
Exclude:
@@ -53,7 +53,7 @@ Layout/EmptyComment:
Enabled: false
Layout/EndAlignment:
Severity: error
Lint/SplatKeywordArguments:
Lint/UnneededRequireStatement:
Enabled: false
Lint/UnreachableCode:
Severity: error
@@ -107,6 +107,8 @@ Naming/MemoizedInstanceVariableName:
Naming/UncommunicativeMethodParamName:
AllowedNames:
- _
Performance/UnfreezeString:
Enabled: false
Security/MarshalLoad:
Exclude:
- !ruby/regexp /test\/.*.rb$/
@@ -150,6 +152,8 @@ Style/ModuleFunction:
Enabled: false
Style/MultilineTernaryOperator:
Severity: error
Style/NumericPredicate:
Enabled: false
Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%q": "{}"
@@ -159,6 +163,8 @@ Style/PercentLiteralDelimiters:
"%w": "()"
"%W": "()"
"%x": "()"
Style/RedundantFreeze:
Enabled: false
Style/RedundantReturn:
Enabled: false
Style/RedundantSelf:
@@ -167,6 +173,8 @@ Style/RegexpLiteral:
EnforcedStyle: percent_r
Style/RescueModifier:
Enabled: false
Style/SafeNavigation:
Enabled: false
Style/SignalException:
EnforcedStyle: only_raise
Style/SingleLineMethods:

55
.travis.yml Normal file
View File

@@ -0,0 +1,55 @@
bundler_args: --without benchmark:site:development
script: script/cibuild
cache: bundler
language: ruby
sudo: false
rvm:
- &ruby1 2.5.1
- &ruby2 2.4.4
- &ruby3 2.3.7
- &jruby jruby-9.1.16.0
matrix:
include:
- rvm: *ruby1
env: TEST_SUITE=fmt
- rvm: *ruby1
env: TEST_SUITE=default-site
exclude:
- rvm: *jruby
env: TEST_SUITE=cucumber
env:
matrix:
- TEST_SUITE=test
- TEST_SUITE=cucumber
branches:
only:
- master
- themes
- /*-stable/
notifications:
slack:
secure: "\
dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4Y\
GEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAY\
O1AanCUbJSEyJTju347xCBGzESU=\
"
addons:
code_climate:
repo_token:
secure: "\
mAuvDu+nrzB8dOaLqsublDGt423mGRyZYM3vsrXh4Tf1sT+L1PxsRzU4gLmcV27HtX2Oq9\
DA4vsRURfABU0fIhwYkQuZqEcA3d8TL36BZcGEshG6MQ2AmnYsmFiTcxqV5bmlElHEqQuT\
5SUFXLafgZPBnL0qDwujQcHukID41sE=\
"
# regular test configuration
after_success:
- bundle exec codeclimate-test-reporter
before_install:
- gem update --system
- gem install bundler

66
Gemfile
View File

@@ -5,13 +5,13 @@ gemspec :name => "jekyll"
gem "rake", "~> 12.0"
gem "rouge", ENV["ROUGE"] if ENV["ROUGE"]
group :development do
gem "launchy", "~> 2.3"
gem "pry"
gem "pry-byebug" unless RUBY_ENGINE == "jruby"
unless RUBY_ENGINE == "jruby"
gem "pry-byebug"
end
end
#
@@ -22,35 +22,22 @@ group :test do
gem "httpclient"
gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious"
gem "nokogiri", "~> 1.9"
# Ruby 3.1.0 shipped with `psych-4.0.3` which caused some of our Cucumber-based tests to fail.
# TODO: Remove lock once we implement a way to use Psych 4 without breaking anything.
# See https://github.com/jekyll/jekyll/pull/8918
gem "psych", "~> 3.3"
gem "nokogiri", "~> 1.7"
gem "rspec"
gem "rspec-mocks"
gem "rubocop", "~> 0.56.0"
gem "rubocop", "~> 0.55.0"
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 "webrick" if RUBY_VERSION >= "3"
# http_parser.rb has stopped shipping jruby-compatible versions
# latest compatible one was 0.6.0 https://rubygems.org/gems/http_parser.rb
if RUBY_ENGINE == "jruby"
gem "http_parser.rb", "~> 0.6.0"
gem "jruby-openssl"
end
gem "jruby-openssl" if RUBY_ENGINE == "jruby"
end
#
group :test_legacy do
gem "test-unit" if RUBY_PLATFORM =~ %r!cygwin!
if RUBY_PLATFORM =~ %r!cygwin!
gem "test-unit"
end
gem "minitest"
gem "minitest-profile"
@@ -73,49 +60,36 @@ end
#
group :jekyll_optional_dependencies do
gem "coderay", "~> 1.1.0"
gem "jekyll-coffeescript"
gem "jekyll-docs", :path => "../docs" if Dir.exist?("../docs") && ENV["JEKYLL_VERSION"]
gem "jekyll-feed", "~> 0.9"
gem "jekyll-gist"
gem "jekyll-paginate"
gem "jekyll-redirect-from"
# Add gem 'matrix'
# Ref: https://github.com/jekyll/jekyll/commit/d0eb07ba29dc7d5f52defab855bdb7a768cf824c
gem "matrix"
gem "kramdown", "~> 1.14"
gem "mime-types", "~> 3.0"
gem "rdoc", "~> 6.3.0"
gem "tomlrb", "~> 2.0"
if ENV["KRAMDOWN_VERSION"].nil? || ENV["KRAMDOWN_VERSION"].to_i >= 2
gem "kramdown-syntax-coderay"
gem "kramdown-parser-gfm"
else
gem "coderay", "~> 1.0"
end
gem "rdoc", "~> 6.0"
gem "tomlrb", "~> 1.2"
platform :ruby, :mswin, :mingw, :x64_mingw do
gem "classifier-reborn", "~> 2.2.0"
gem "liquid-c", "~> 4.0"
gem "liquid-c", "~> 3.0"
gem "pygments.rb", "~> 1.0"
gem "rdiscount", "~> 2.0"
gem "redcarpet", "~> 3.2", ">= 3.2.3"
gem "yajl-ruby", "~> 1.3.1"
gem "yajl-ruby", "~> 1.3"
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library
platforms :jruby, :mswin, :mingw, :x64_mingw do
gem "tzinfo", ENV["TZINFO_VERSION"] if ENV["TZINFO_VERSION"]
gem "tzinfo-data"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", :platforms => [:mingw, :mswin, :x64_mingw, :jruby]
end
#
group :site do
gem "html-proofer", "~> 3.4" if ENV["PROOF"]
if ENV["PROOF"]
gem "html-proofer", "~> 3.4"
end
gem "jekyll-avatar"
gem "jekyll-mentions"

View File

@@ -1,110 +1,42 @@
## 3.10.0 / 2024-06-23
## HEAD
### Documentation
* Release post for v3.8.0 (#6849)
* Add Installation Instructions for Ubuntu (#6925)
* add liquid tag jekyll-flickr (#6946)
* Add 4.0 development post (#6934)
* Updated copy - fixed casing of SaaS on resources page. (#6949)
* WIP: Do not advise users to install Jekyll outside of Bundler (#6927)
* Don&#39;t prompt for sudo when installing with Ubuntu WSL (#6781)
* Fix typo (#6969)
* Add version number for group_by_exp doc (#6956)
* Update Windows install docs (#6926)
* Remove documentation for using Redcarpet (#6990)
### Minor Enhancements
* Backport add-csv-dependency from #9522 to Jekyll 3 (#9616)
* 3.10-stable: Add webrick as a dependency (#9620)
* use jekyll-compose if installed (#6932)
* Memoize computing excerpt&#39;s relative_path (#6951)
* Liquefied link tag (#6269)
* Suggest re-running command with --trace on fail (#6551)
## 3.9.5 / 2024-02-12
### Major Enhancements
### Minor Enhancements
* 3.9-stable: allow Pages to be Excerpted (#9550)
## 3.9.4 / 2023-12-28
### Bug Fixes
* Backport #9392 for v3.9.x: Add support for Ruby 3.3 Logger (#9513)
## 3.9.3 / 2023-01-27
### Bug Fixes
* 3.9.x: Support i18n 1.x (#9269)
* Backport #8880 for v3.9.x: Support both tzinfo v1 and v2 alongwith
non-half hour offsets (#9280)
* Remove unused error class (#6511)
* Drop support for Ruby 2.1 and 2.2 (#6560)
* Add vendor folder to a newly installed site&#39;s .gitignore (#6968)
* bump i18n (#6931)
* We are not using Ruby 2.2 anymore (#6977)
* Drop support for older versions of Rouge (#6978)
* Remove support for Redcarpet (#6987)
### Development Fixes
* v3.9.x: test under Ruby 3.2 #9272)
* v3.9.x: fix rdiscount test (#9277)
## 3.9.2 / 2022-03-27
### Bug Fixes
* Lock `http_parser.rb` gem to `v0.6.x` on JRuby (#8943)
* Backport #8756 for v3.9.x: Respect collections_dir config within include tag (#8795)
* Backport #8965 for v3.9.x: Fix response header for content served via `jekyll serve` (#8976)
### Development Fixes
* Update and fix CI for `3.9-stable` on Ruby 3.x (#8942)
* Fix CI for commits to `3.9-stable` branch (#8788)
## 3.9.1 / 2021-04-08
### Bug Fixes
* Backport #8618 for v3.9.x: Update include tag to be more permissive (#8629)
## 3.9.0 / 2020-08-05
### Minor Enhancements
* Allow use of kramdown v2 (#8322)
* Add default language for kramdown syntax highlighting (#8325)
## 3.8.7 / 2020-05-08
### Bug Fixes
* Prevent console warnings with Ruby 2.7 (#8125)
## 3.8.6 / 2019-07-02
### 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)
* Install platform-specific gems as required (3c06609406)
### Security Fixes
* Theme gems: ensure directories aren't symlinks (#7424)
## 3.8.5 / 2018-11-04
### Bug Fixes
* Re-implement handling Liquid blocks in excerpts (#7250)
## 3.8.4 / 2018-09-18
### Bug Fixes
* security: fix `include` bypass of `EntryFilter#filter` symlink check (#7228)
## 3.8.3 / 2018-06-05
### Bug Fixes
* Fix --unpublished not affecting collection documents (#7027)
## 3.8.2 / 2018-05-18
### Development Fixes
* Update rubocop version (#7016)
### Bug Fixes
* Add whitespace control to LIQUID_TAG_REGEX (#7015)
* Remove unnecessary Jekyll::Page constant (#6770)
* Loggers should accept both numbers and symbols (#6967)
* Update instructions for releasing docs Gem (#6975)
* yajl-ruby update to v1.4.0 (#6976)
## 3.8.1 / 2018-05-01

View File

@@ -6,37 +6,28 @@ branches:
only:
- master
- themes
- /.*-stable/
build: off
install:
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%-x64\bin;%PATH%
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%\bin;%PATH%
- bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle
environment:
BUNDLE_WITHOUT: "benchmark:development"
BUNDLE_WITHOUT: "benchmark:site:development"
matrix:
- RUBY_FOLDER_VER: "26"
TZINFO_VERSION: "~> 1.2"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "26"
TZINFO_VERSION: "~> 2.0"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "26"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "25"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "26"
- RUBY_FOLDER_VER: "25"
TEST_SUITE: "cucumber"
- RUBY_FOLDER_VER: "25"
TEST_SUITE: "default-site"
- RUBY_FOLDER_VER: "26"
TEST_SUITE: "profile-docs"
- RUBY_FOLDER_VER: "26"
TZINFO_VERSION: "~> 1.2"
TEST_SUITE: "cucumber"
- RUBY_FOLDER_VER: "26"
TZINFO_VERSION: "~> 2.0"
TEST_SUITE: "cucumber"
- RUBY_FOLDER_VER: "25-x64"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "24"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "23"
TEST_SUITE: "test"
test_script:
- ruby --version

View File

@@ -1,5 +1,5 @@
---
version: 3.10.0
version: 3.8.1
name: Jekyll • Simple, blog-aware, static sites
description: Transform your plain text into static websites and blogs
url: https://jekyllrb.com

View File

@@ -689,11 +689,6 @@ liquid:
strict_variables: false
# Markdown Processors
rdiscount:
extensions: []
redcarpet:
extensions: []
kramdown:
auto_ids: true
@@ -728,50 +723,6 @@ mutually exclusive.
The various Markdown renderers supported by Jekyll sometimes have extra options
available.
### Redcarpet
Redcarpet can be configured by providing an `extensions` sub-setting, whose
value should be an array of strings. Each string should be the name of one of
the `Redcarpet::Markdown` class's extensions; if present in the array, it will
set the corresponding extension to `true`.
Jekyll handles two special Redcarpet extensions:
- `no_fenced_code_blocks` --- By default, Jekyll sets the `fenced_code_blocks`
extension (for delimiting code blocks with triple tildes or triple backticks)
to `true`, probably because GitHub's eager adoption of them is starting to make
them inescapable. Redcarpet's normal `fenced_code_blocks` extension is inert
when used with Jekyll; instead, you can use this inverted version of the
extension for disabling fenced code.
Note that you can also specify a language for highlighting after the first
delimiter:
```ruby
# ...ruby code
```
With both fenced code blocks and highlighter enabled, this will statically
highlight the code; without any syntax highlighter, it will add a
`class="LANGUAGE"` attribute to the `<code>` element, which can be used as a
hint by various JavaScript code highlighting libraries.
- `smart` --- This pseudo-extension turns on SmartyPants, which converts
straight quotes to curly quotes and runs of hyphens to em (`---`) and en (`--`) dashes.
All other extensions retain their usual names from Redcarpet, and no renderer
options aside from `smart` can be specified in Jekyll. [A list of available
extensions can be found in the Redcarpet README file.][redcarpet_extensions]
Make sure you're looking at the README for the right version of
Redcarpet: Jekyll currently uses v3.2.x. The most commonly used
extensions are:
- `tables`
- `no_intra_emphasis`
- `autolink`
[redcarpet_extensions]: https://github.com/vmg/redcarpet/blob/v3.2.2/README.markdown#and-its-like-really-simple-to-use
### Custom Markdown Processors
If you're interested in creating a custom markdown processor, you're in luck! Create a new class in the `Jekyll::Converters::Markdown` namespace:

View File

@@ -4,157 +4,6 @@ permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 3.10.0 / 2024-06-23
{: #v3-10-0}
### Minor Enhancements
{: #minor-enhancements-v3-10-0}
- Backport add-csv-dependency from [#9522]({{ site.repository }}/issues/9522) to Jekyll 3 ([#9616]({{ site.repository }}/issues/9616))
- 3.10-stable: Add webrick as a dependency ([#9620]({{ site.repository }}/issues/9620))
## 3.9.5 / 2024-02-12
{: #v3-9-5}
### Minor Enhancements
{: #minor-enhancements-v3-9-5}
- 3.9-stable: allow Pages to be Excerpted ([#9550]({{ site.repository }}/issues/9550))
## 3.9.4 / 2023-12-28
{: #v3-9-4}
### Bug Fixes
{: #bug-fixes-v3-9-4}
- Backport [#9392]({{ site.repository }}/issues/9392) for v3.9.x: Add support for Ruby 3.3 Logger ([#9513]({{ site.repository }}/issues/9513))
## 3.9.3 / 2023-01-27
{: #v3-9-3}
### Bug Fixes
{: #bug-fixes-v3-9-3}
- 3.9.x: Support i18n 1.x ([#9269]({{ site.repository }}/issues/9269))
- Backport [#8880]({{ site.repository }}/issues/8880) for v3.9.x: Support both tzinfo v1 and v2 alongwith
non-half hour offsets ([#9280]({{ site.repository }}/issues/9280))
### Development Fixes
{: #development-fixes-v3-9-3}
- v3.9.x: test under Ruby 3.2 [#9272]({{ site.repository }}/issues/9272))
- v3.9.x: fix rdiscount test ([#9277]({{ site.repository }}/issues/9277))
## 3.9.2 / 2022-03-27
{: #v3-9-2}
### Bug Fixes
{: #bug-fixes-v3-9-2}
- Lock `http_parser.rb` gem to `v0.6.x` on JRuby ([#8943]({{ site.repository }}/issues/8943))
- Backport [#8756]({{ site.repository }}/issues/8756) for v3.9.x: Respect collections_dir config within include tag ([#8795]({{ site.repository }}/issues/8795))
- Backport [#8965]({{ site.repository }}/issues/8965) for v3.9.x: Fix response header for content served via `jekyll serve` ([#8976]({{ site.repository }}/issues/8976))
### Development Fixes
{: #development-fixes-v3-9-2}
- Update and fix CI for `3.9-stable` on Ruby 3.x ([#8942]({{ site.repository }}/issues/8942))
- Fix CI for commits to `3.9-stable` branch ([#8788]({{ site.repository }}/issues/8788))
## 3.9.1 / 2021-04-08
{: #v3-9-1}
### Bug Fixes
{: #bug-fixes-v3-9-1}
- Backport [#8618]({{ site.repository }}/issues/8618) for v3.9.x: Update include tag to be more permissive ([#8629]({{ site.repository }}/issues/8629))
## 3.9.0 / 2020-08-05
{: #v3-9-0}
### Minor Enhancements
{: #minor-enhancements-v3-9-0}
- Allow use of kramdown v2 ([#8322]({{ site.repository }}/issues/8322))
- Add default language for kramdown syntax highlighting ([#8325]({{ site.repository }}/issues/8325))
## 3.8.7 / 2020-05-08
{: #v3-8-7}
### Bug Fixes
{: #bug-fixes-v3-8-7}
- Prevent console warnings with Ruby 2.7 ([#8125]({{ site.repository }}/issues/8125))
## 3.8.6 / 2019-07-02
{: #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))
- Install platform-specific gems as required (3c06609406)
### 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}
### Bug Fixes
{: #bug-fixes-v3-8-5}
- Re-implement handling Liquid blocks in excerpts ([#7250]({{ site.repository }}/issues/7250))
## 3.8.4 / 2018-09-18
{: #v3-8-4}
### Bug Fixes
{: #bug-fixes-v3-8-4}
- security: fix `include` bypass of `EntryFilter#filter` symlink check ([#7228]({{ site.repository }}/issues/7228))
## 3.8.3 / 2018-06-05
{: #v3-8-3}
### Bug Fixes
{: #bug-fixes-v3-8-3}
- Fix --unpublished not affecting collection documents ([#7027]({{ site.repository }}/issues/7027))
## 3.8.2 / 2018-05-18
{: #v3-8-2}
### Development Fixes
{: #development-fixes-v3-8-2}
- Update rubocop version ([#7016]({{ site.repository }}/issues/7016))
### Bug Fixes
{: #bug-fixes-v3-8-2}
- Add whitespace control to LIQUID_TAG_REGEX ([#7015]({{ site.repository }}/issues/7015))
## 3.8.1 / 2018-05-01
{: #v3-8-1}

View File

@@ -4,12 +4,14 @@ description: Official guide to install Jekyll on macOS, GNU/Linux or Windows.
permalink: /docs/installation/
---
- [Requirements](#requirements)
- [Install on macOS](#macOS)
- [Install on Windows](../windows/)
- [Upgrade Jekyll](#upgrade-jekyll)
Jekyll is a [Ruby Gem](http://guides.rubygems.org/rubygems-basics/), and can be
installed on most systems.
Installing Jekyll should be straight-forward if your system meets the requirements.
- [Requirements](#requirements)
- [Install Jekyll on macOS](#macOS)
- [Install Jekyll on Ubuntu Linux](#ubuntu)
- [Install Jekyll on Windows](../windows/)
- [Upgrade Jekyll](#upgrade-jekyll)
## Requirements
@@ -111,6 +113,35 @@ Check out the [troubleshooting](../troubleshooting/) page or
</div>
## Install on Ubuntu Linux {#ubuntu}
Before we install Jekyll, we need to make sure we have all the required
dependencies.
```sh
sudo apt-get install ruby ruby-dev build-essential
```
It is best to avoid installing Ruby Gems as the root user. Therefore, we need to
set up a gem installation directory for your user account. The following
commands will add environment variables to your `~/.bashrc` file to configure
the gem installation path. Run them now:
```sh
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```
Finally, install Jekyll:
```sh
gem install jekyll bundler
```
That's it! You're ready to start using Jekyll.
## Upgrade Jekyll
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find the currently installed version of Jekyll, run one of these commands:

View File

@@ -69,6 +69,14 @@ And then, you're done! :tada: Feel free to celebrate!
If you have access to the [@jekyllrb](https://twitter.com/jekyllrb) Twitter account, you should tweet the release post from there. If not, just ask another maintainer to do it or to give you access.
### Build the docs
We package our documentation as a :gem: Gem for offline use.
This is done with the
[**jekyll-docs**](https://github.com/jekyll/jekyll-docs#building) repository,
and more detailed instructions are provided there.
## For non-core gems
If you're not a maintainer for `jekyll/jekyll`, the procedure is much simpler in a lot of cases. Generally, the procedure still looks like this:

View File

@@ -886,6 +886,7 @@ You can find a few useful plugins at the following locations:
- [jekyll-html](https://github.com/kacperduras/jekyll-html): A Jekyll plugin to use HTML tags in Jekyll pages, posts and collections.
- [jekyll-onebox](https://github.com/rriemann/jekyll-onebox): Liquid tag for displaying HTML previews (embeds) for links to popular domains. Plugin is based on [Onebox](https://github.com/discourse/onebox) that powers link previews in [Discourse](http://github.com/discourse/discourse) forums.
- [jekyll-w2m](https://github.com/kacperduras/jekyll-w2m): A Jekyll plugin to liberate content from Microsoft Word documents (powered by [word-to-markdown](https://github.com/benbalter/word-to-markdown)).
- [jekyll-flickr](https://github.com/rriemann/jekyll-flickr): Liquid tag for responsive Flickr images using HTML5 srcset. Subtitles and automatic license notices are supported.
#### Collections

View File

@@ -26,13 +26,15 @@ If you encounter any unexpected errors during the above, please refer to the [tr
## About Bundler
`gem install jekyll bundler` installs the [jekyll](https://rubygems.org/gems/jekyll/) and [bundler](https://rubygems.org/gems/bundler) gems through [RubyGems](https://rubygems.org/). You need only to install the gems one time &mdash; not every time you create a new Jekyll project. Here are some additional details:
`gem install bundler` installs the [bundler](https://rubygems.org/gems/bundler) gem through [RubyGems](https://rubygems.org/). You only need to install it once &mdash; not every time you create a new Jekyll project. Here are some additional details:
* `bundler` is a gem that manages other Ruby gems. It makes sure your gems and gem versions are compatible, and that you have all necessary dependencies each gem requires.
* The `Gemfile` and `Gemfile.lock` files inform Bundler about the gem requirements in your site. If your site doesn't have these Gemfiles, you can omit `bundle exec` and just run `jekyll serve`.
* When you run `bundle exec jekyll serve`, Bundler uses the gems and versions as specified in `Gemfile.lock` to ensure your Jekyll site builds with no compatibility or dependency conflicts.
For more information about how to use Bundler in your Jekyll project, this [tutorial](https://jekyllrb.com/tutorials/using-jekyll-with-bundler/) should provide answers to the most common questions and explain how to get up and running quickly.
## Options for creating a new site with Jekyll
`jekyll new <PATH>` installs a new Jekyll site at the path specified (relative to current directory). In this case, Jekyll will be installed in a directory called `myblog`. Here are some additional details:

View File

@@ -25,7 +25,7 @@ Jekyll's growing use is producing a wide variety of tutorials, frameworks, exten
## Integrations
- Use a saas service as a backend for forms (contact forms, hiring forms, etc.)
- Use a SaaS service as a backend for forms (contact forms, hiring forms, etc.)
- [Formspree (open source)](https://formspree.io/)
- [FormKeep](https://formkeep.com/guides/contact-form-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll)

View File

@@ -147,7 +147,8 @@ you come up with your own tags via plugins.
<tr>
<td>
<p class="name"><strong>Where Expression</strong></p>
<p>Select all the objects in an array where the expression is true. Jekyll v3.2.0 & later.</p>
<p>Select all the objects in an array where the expression is true.
{% include docs_version_badge.html version="3.2.0" %}</p>
</td>
<td class="align-center">
<p>
@@ -178,7 +179,8 @@ you come up with your own tags via plugins.
<tr>
<td>
<p class="name"><strong>Group By Expression</strong></p>
<p>Group an array's items using a Liquid expression.</p>
<p>Group an array's items using a Liquid expression.
{% include docs_version_badge.html version="3.4.0" %}</p>
</td>
<td class="align-center">
<p>
@@ -586,6 +588,23 @@ One major benefit of using the `link` or `post_url` tag is link validation. If t
Note you cannot add filters to `link` tags. For example, you cannot append a string using Liquid filters, such as `{% raw %}{% link mypage.html | append: "#section1" %} {% endraw %}`. To link to sections on a page, you will need to use regular HTML or Markdown linking techniques.
The name of the file you want to link can be specified as a variable instead of an actual file name. For example, suppose you defined a variable in your page's front matter like this:
```yaml
---
title: My page
my_variable: footer_company_a.html
---
```
You could then reference that variable in your link:
```liquid
{% raw %}{% link {{ page.my_variable }} %}{% endraw %}
```
In this example, the link would add link to the file `footer_company_a.html`.
### Linking to posts
If you want to include a link to a post on your site, the `post_url` tag will generate the correct permalink URL for the post you specify.

View File

@@ -7,13 +7,72 @@ While Windows is not an officially-supported platform, it can be used to run Jek
## Installing Jekyll
The easiest way to run Jekyll is by using the [RubyInstaller][] for Windows.
If you are using Windows 10 Anniversary Update, the easiest way to run Jekyll is by [installing][WSL-Guide] the new Bash on Ubuntu on Windows.
### Installation via RubyInstaller
[RubyInstaller][] is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
We only cover RubyInstaller-2.4 and newer here, older versions need to [install the Devkit][Devkit-install] manually.
1. Download and Install a **Ruby+Devkit** version from [RubyInstaller Downloads][RubyInstaller-downloads].
Use default options for installation.
2. 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`
3. Check if Jekyll installed properly: `jekyll -v`
That's it, you're ready to install our [default minimal blog theme](https://github.com/jekyll/minima) with `jekyll new jekyll-website`.
[RubyInstaller]: https://rubyinstaller.org/
[RubyInstaller-downloads]: https://rubyinstaller.org/downloads/
[Devkit-install]: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
### Installation via Bash on Windows 10
### Encoding
*Note:* You must have [Bash on Ubuntu on Windows][BASH-WSL] enabled.
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 when you're running Jekyll on Windows.
Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command:
```sh
chcp 65001
```
### Time-Zone Management
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database][IANA-database].
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
```ruby
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
```
[IANA-database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
### Auto Regeneration
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve. While `listen` has built-in support for UNIX systems, it may require an extra gem for compatibility with Windows.
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' if Gem.win_platform?
```
You have to use a [Ruby+Devkit](https://rubyinstaller.org/downloads/) version of the RubyInstaller.
## Installation via Bash on Windows 10
If you are using Windows 10 version 1607 or later, another option to run Jekyll is by [installing][WSL-Guide] the Windows Subsystem for Linux.
*Note:* You must have [Windows Subsystem for Linux][BASH-WSL] enabled.
First let's make sure all our packages / repositories are up to date. Open a new Command Prompt instance, and type the following:
@@ -51,6 +110,12 @@ Check if Jekyll installed properly by running:
jekyll -v
```
Configure the bundler/gem path so bundle doesn't prompt for sudo
```sh
bundle config path vendor/bundle
```
**And that's it!**
To start a new project named `my_blog`, just run:
@@ -71,152 +136,3 @@ You can make sure time management is working properly by inspecting your `_posts
[WSL-Guide]: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
[BASH-WSL]: https://msdn.microsoft.com/en-us/commandline/wsl/about
### Installation via RubyInstaller
[RubyInstaller][] is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
1. Download and Install a package manager version from [RubyInstaller Downloads][RubyInstaller-downloads].
2. Install Jekyll and Bundler via a command prompt window: `gem install jekyll bundler`
3. Check if Jekyll installed properly: `jekyll -v`
[RubyInstaller]: https://rubyinstaller.org/
[RubyInstaller-downloads]: https://rubyinstaller.org/downloads/
### Installation via Chocolatey
A quick way to install Jekyll using Chocolatey is to follow the [installation instructions by David Burela](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/):
1. Install a package manager for Windows called [Chocolatey][]
2. Install Ruby via Chocolatey: `choco install ruby -y`
3. Reopen a command prompt and install Jekyll: `gem install jekyll`
Updates in the infrastructure of Ruby may cause SSL errors when attempting to use `gem install` with versions of the RubyGems package older than 2.6. (The RubyGems package installed via the Chocolatey tool is version 2.3) If you have installed an older version, you can update the RubyGems package using the directions [here][ssl-certificate-update].
[ssl-certificate-update]: http://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages
### Installing *github-pages* via Chocolatey
This section is part of an article written by [Jens Willmer][jwillmerPost]. To follow the instructions you need to have [Chocolatey][] installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue.
#### Install Ruby and Ruby development kit
Open a command prompt and execute the following commands:
* `choco install ruby -version 2.2.4`
* `choco install ruby2.devkit` - _needed for compilation of json gem_
#### Configure Ruby development kit
The development kit did not set the environment path for Ruby so we need to do it.
* Open command prompt in `C:\tools\DevKit2`
* Execute `ruby dk.rb init` to create a file called `config.yml`
* Edit the `config.yml` file and include the path to Ruby `- C:/tools/ruby22`
* Execute the following command to set the path: `ruby dk.rb install`
#### Nokogiri gem installation
This gem is also needed in the github-pages and to get it running on Windows x64 we have to install a few things.
**Note:** In the current [pre release][nokogiriFails] it works out of the box with Windows x64 but this version is not referenced in the github-pages.
```sh
choco install libxml2 -Source "https://www.nuget.org/api/v2/"
choco install libxslt -Source "https://www.nuget.org/api/v2/"
choco install libiconv -Source "https://www.nuget.org/api/v2/
gem install nokogiri --^
--with-xml2-include=C:\Chocolatey\lib\libxml2.2.7.8.7\build\native\include^
--with-xml2-lib=C:\Chocolatey\lib\libxml2.redist.2.7.8.7\build\native\bin\v110\x64\Release\dynamic\cdecl^
--with-iconv-include=C:\Chocolatey\lib\libiconv.1.14.0.11\build\native\include^
--with-iconv-lib=C:\Chocolatey\lib\libiconv.redist.1.14.0.11\build\native\bin\v110\x64\Release\dynamic\cdecl^
--with-xslt-include=C:\Chocolatey\lib\libxslt.1.1.28.0\build\native\include^
--with-xslt-lib=C:\Chocolatey\lib\libxslt.redist.1.1.28.0\build\native\bin\v110\x64\Release\dynamic
```
#### Install github-pages
* Open command prompt and install [Bundler][]: `gem install bundler`
* Create a file called `Gemfile` without any extension in your root directory of your blog
* Copy & paste the two lines into the file:
```ruby
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
```
* **Note:** We use an unsecure connection because SSL throws exceptions in the version of Ruby
* Open a command prompt, target your local blog repository root, and install github-pages: `bundle install`
After this process you should have github-pages installed on your system and you can host your blog again with `jekyll s`.
There will be a warning on startup that you should include `gem 'wdm', '>= 0.1.0' if Gem.win_platform?` to your `Gemfile` but I could not get `jekyll s` working if I include that line so for the moment I ignore that warning.
In the future the installation process of the github-pages should be as simple as the setup of the blog. But as long as the new version of the Nokogiri ([v1.6.8][nokogiriReleases]) is not stable and referenced, it is work to get it up and running on Windows.
[jwillmerPost]: https://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46 "Installation instructions by Jens Willmer"
[Chocolatey]: https://chocolatey.org/install "Package manager for Windows"
[nokogiriFails]: https://github.com/sparklemotion/nokogiri/issues/1456#issuecomment-206481794 "Nokogiri fails to install on Ruby 2.3 for Windows"
[Bundler]: http://bundler.io/ "Ruby Dependencie Manager"
[nokogiriReleases]: https://github.com/sparklemotion/nokogiri/releases "Nokogiri Releases"
For a more conventional way of installing Jekyll you can follow this [complete guide to install Jekyll 3 on Windows by Sverrir Sigmundarson][windows-installjekyll3].
Optionally you can use [Autoinstall Jekyll for Windows][fastjekyll-autoinstall].
[windows-installjekyll3]: https://labs.sverrirs.com/jekyll/
[fastjekyll-autoinstall]: https://github.com/KeJunMao/fastjekyll#autoinstall-jekyll-for-windows
## Encoding
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 when you're running Jekyll on Windows.
Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command:
```sh
chcp 65001
```
## Time-Zone Management
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database][IANA-database].
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
```ruby
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end
```
[IANA-database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
## Auto Regeneration
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve. While `listen` has built-in support for UNIX systems, it may require an extra gem for compatibility with Windows.
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' if Gem.win_platform?
```
You may first have to download and install the [Ruby DevKit](https://rubyinstaller.org/downloads/) by following [the instructions here](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit).

View File

@@ -0,0 +1,28 @@
---
title: "Jekyll 4.0 is on the Horizon!"
date: "2018-04-19 16:07:00 +0100"
author: oe
categories: [community]
---
With the release of Jekyll 3.8.0, it's been 2 and a half years since the last major release. Jekyll 3.0.0 was released in late October of 2015! That's a long time ago, and we've been working towards the next major release of Jekyll for a couple of months now. Here's a small preview of what's to come:
- Dropping support for Ruby 2.1 and 2.2. Both versions have reached their EOL period.
- Dropping Pygments as a dependency. We're already defaulting to Rouge, and this removes the implicit Python dependency. (finally!)
- Making the `link` tag use relative URLs. This is a big breaking change, but it's the cleaner solution.
We're open to more ideas, though. If the development cost isn't too high, or if someone volunteers to take care of the implementation, it's likely that your suggestion might make it into Jekyll 4.0. Head over to this [issue] for more details. Some interesting topics might be improving Internationalization support in Jekyll, creating convenience Liquid tags, et cetera.
That being said, the development period of version 4.0 begins _now_. This means a couple of things:
- New features will only be implemented in Jekyll 4.0. There will be no 3.9.0 or the like.
- Same with bug fixes, unless they concern something introduced in Jekyll 3.7 or 3.8, in which case we will backport the fixes and release a patch version.
- Now is a great time to finally take on the feature you've wanted to see in Jekyll for ages! Just open an issue or experiment with the code to get going!
As for a release date, we're currently aiming for late summer, around September or so. However, keep in mind that this project is purely volunteer-run, and as such, delays might occur and we might not hit that release date.
Finally, this is a great time for newcomers to open-source to make their first contribution. We'll be doing our best to mark recommended contributions and create newcomer-friendly issues, as well as to provide mentoring throughout the contribution process (although we'd like to think that we're already pretty proficient at that). So if you've always been hestitant about contributing to a large open-source project, Jekyll is a good place to start!
Happy Jekylling! :wave:
[issue]: https://github.com/jekyll/jekyll/issues/6948

View File

@@ -0,0 +1,43 @@
---
title: 'Jekyll 3.8.0 Released'
date: 2018-04-19 19:45:15 +0530
author: ashmaroli
version: 3.8.0
categories: [release]
---
Aloha Jekyllers!! :wave:
After months of toiling on the codebase and shipping a couple of release-candidates, the Jekyll Team is delighted to finally
present `v3.8.0`, packed with optimizations, improvements, some new features and a couple of bug-fixes. Yay!!!
Under the hood, Jekyll has undergone many minor changes that will allow it to run more performantly in the coming years. :smiley:
Rest assured, our users should see minor improvements in their site's build times.
Speaking of improvements, users running a site containing a huge amount of posts or those who like to use our `where` filter
frequently in a single template, are going to see a massive reduction in their total build times!! :tada:
Hold on, this version is not just about optimizations, there are some new features as well..:
* Detect non-existent variables and filters specified in a template by enabling `strict_variables` and `strict_filters` under the
`liquid` key in your config file.
* Allow *date filters* to output ordinal days.
* `jekyll doctor` now warns you if you have opted for custom `collections_dir` but placed `_posts` directory outside that
directory.
..and yes, a couple of bug-fixes, notably:
* Jekyll now handles future-dated documents properly.
* Jekyll is able to handle Liquid blocks intelligently in excerpts.
* A few methods that were *not meant to be publically accessible* have been entombed properly.
* A few bugs that still plagued our `collections_dir` feature from `v3.7` got crushed.
As always, the full list of changes since last release can be viewed [here](/docs/history/#v3-8-0).
A big thanks to the following people who contributed to our repository with pull-requests that improved our codebase, documentation
and tests:
Ana María Martínez Gómez, Antonio Argote, Ashwin Maroli, Awjin Ahn, Ben Balter, Benjamin Høegh, Christian Oliff, Damien Solodow,
David Zhang, Delson Lima, Eric Cornelissen, Florian Thomas, Frank Taillandier, Heinrich Hartmann, Jakob Vad Nielsen, John Eismeier,
Kacper Duras, KajMagnus, Mario Cekic, Max Vilimpoc, Michael H, Mike Kasberg, Parker Moore, Pat Hawks, Paweł Kuna, Robert Riemann,
Roger Rohrbach, Semen Zhydenko, Stefan Dellmuth, Tim Carry, olivia, and steelman.
Happy Jekylling!! :sparkles:

View File

@@ -1,19 +0,0 @@
---
title: 'Jekyll 3.8.2 Released'
date: 2018-05-19 10:30:00 -0500
author: pathawks
version: 3.8.2
categories: [release]
---
Hello Jekyllers!!
Today we are releasing `v3.8.2`, which fixes the way Jekyll generates excerpts
for posts when the first paragraph of the post contains Liquid tags that take
advantage of [Liquid's whitespace control feature][Liquid whitespace].
Big thanks to @kylebarbour, who first reported this issue and also very quickly
submitted a fix. Also thanks to @nickskalkin for making sure that we are using
the latest version of Rubocop to lint our code.
[Liquid whitespace]: https://shopify.github.io/liquid/basics/whitespace/

View File

@@ -1,13 +0,0 @@
---
title: 'Jekyll 3.8.3 Released'
date: 2018-06-05 09:00:00 -0500
author: pathawks
version: 3.8.3
categories: [release]
---
This release fixes a regression in 3.8 where collections with `published: false`
do not show when using the `--unpublished` flag.
Thanks to @philipbelesky for reporting and fixing this issue; collections with
`published: false` now behave the same way as Posts.

View File

@@ -1,19 +0,0 @@
---
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!

View File

@@ -1,28 +0,0 @@
---
title: 'Jekyll 3.9.0 Released'
author: parkr
version: 3.9.0
categories: [release]
---
Jekyll 3.9.0 allows use of kramdown v2, the latest series of kramdown.
If you choose to upgrade, please note that the GitHub-Flavored Markdown
parser and other features of kramdown v1 are now distributed via
separate gems. If you would like to continue using these features, you will
need to add the gems to your `Gemfile`. They are as follows:
- GFM parser `kramdown-parser-gfm`
- coderay syntax highlighter `kramdown-syntax-coderay`
- mathjaxnode math engine `kramdown-math-mathjaxnode`
- sskatex math engine `kramdown-math-sskatex`
- katex math engine `kramdown-math-katex`
- ritex math engine `kramdown-math-ritex`
- itex2mml math engine `kramdown-math-itex2mml`
Jekyll will require the given gem when the configuration requires it, and
will show a helpful message when a dependency is missing.
You can check out the patches and see all the details in [the release notes](/docs/history/#v3-9-0)
Happy Jekylling!

View File

@@ -1,28 +0,0 @@
---
title: 'Jekyll 3.9.1 Released'
date: 2021-04-07 15:59:45 -0400
author: parkr
version: 3.9.1
categories: [release]
---
This patch release of the 3.9 series is released to fix a bug where the
`include` tag does not allow valid filename characters. For example, this
would previously fail:
{% raw %}
```text
{% include my-logo@2x.svg %}
```
{% endraw %}
This release adds support for the following characters in filenames:
- `@`
- `-`
- `(` and `)`
- `+`
- `~`
- `#`
Happy Jekylling!

View File

@@ -1,19 +0,0 @@
---
title: 'Jekyll 3.9.2 Released'
date: 2022-03-27 13:20:00 -0700
author: parkr
version: 3.9.2
categories: [release]
---
Hey Jekyllers,
Quick bug-fix release for you all today:
1. Ruby 3.0 and 3.1 support :tada: (you will need to run `bundle add webrick` for `jekyll serve` to work)
2. `jekyll serve` will no longer inject a charset into the MIME type for
binary types
3. Incremental regeneration now handles includes in collection files
correctly
That's all, Happy Jekylling!

View File

@@ -1,15 +0,0 @@
---
title: 'Jekyll 3.9.3 Released'
date: 2023-01-27 13:10:25 -0800
author: parkr
version: 3.9.3
categories: [release]
---
Jekyll 3.9.3 is a bug fix release loosening version restrictions for
dependencies `i18n` and `tzinfo` gems. You can now use Jekyll v3.9 with
newer versions of these gems!
More details in [the full release notes]({% link _docs/history.md %}#v3-9-3).
Happy Jekylling!

View File

@@ -1,14 +0,0 @@
---
title: 'Jekyll 3.9.4 Released'
date: 2023-12-28 14:45:05 -0800
author: parkr
version: 3.9.4
categories: [release]
---
Hey Jekyllers!
This release, 3.9.4, is to bring Ruby 3.3 support to Jekyll. You can find
the details in [the changelog]({% link _docs/history.md %}#v3-9-4).
Happy Jekylling!

View File

@@ -1,12 +0,0 @@
---
title: 'Jekyll 3.9.5 Released'
date: 2024-02-12 20:24:21 -0800
author: parkr
version: 3.9.5
categories: [release]
---
This release allows `Jekyll::Page` objects to interact with
`Jekyll::Excerpt`. Previously, excerpts could only be generated for
documents (e.g. collection items like posts), so this brings Page objects
to parity.

View File

@@ -1,16 +0,0 @@
---
title: 'Jekyll 3.10.0 Released'
date: 2024-06-23 21:56:58 -0700
author: parkr
version: 3.10.0
categories: [release]
---
As Ruby continues to march on, the maintainers have made the decision to
drop some previously-bundled gems. This release makes Jekyll depend
directly on those gems so that whether your Ruby installation has them
bundled or not, your experience can continue uninterrupted.
More details [are in the changelog]({% link _docs/history.md %}#v3-10-0).
Happy Jekylling!

View File

@@ -45,7 +45,7 @@ overview: true
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">gem install jekyll bundler</span>
<span class="command">gem install bundler jekyll</span>
</p>
<p class="line">
<span class="path">~</span>

View File

@@ -1 +1 @@
3.10.0
3.8.1

View File

@@ -263,104 +263,6 @@ Feature: Collections
And the "_site/puppies/snowy.html" file should not exist
And the "_site/puppies/hardy.html" file should not exist
Scenario: Access rendered collection with future date and unpublished flag via Liquid
Given I have a _puppies directory
And I have the following documents under the puppies collection:
| title | date | content | published |
| Rover | 2007-12-31 | content for Rover. | true |
| Figor | 2007-12-31 | content for Figor. | false |
| Snowy | 2199-12-31 | content for Snowy. | true |
| Hardy | 2199-12-31 | content for Hardy. | false |
And I have a "_config.yml" file with content:
"""
collections:
puppies:
output: true
"""
And I have a "index.md" page that contains "{% for puppy in site.puppies %}<div>{{ puppy.title }}</div>{% endfor %}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "<div>Rover</div>" in "_site/index.html"
But I should see "<div>Snowy</div>" in "_site/index.html"
And I should not see "<div>Figor</div>" in "_site/index.html"
And I should not see "<div>Hardy</div>" in "_site/index.html"
And the "_site/puppies/rover.html" file should exist
And the "_site/puppies/snowy.html" file should not exist
And the "_site/puppies/figor.html" file should not exist
And the "_site/puppies/hardy.html" file should not exist
When I run jekyll build --unpublished
Then I should get a zero exit status
And the _site directory should exist
And I should see "<div>Rover</div>" in "_site/index.html"
And I should see "<div>Snowy</div>" in "_site/index.html"
And I should see "<div>Figor</div>" in "_site/index.html"
But I should see "<div>Hardy</div>" in "_site/index.html"
And the "_site/puppies/rover.html" file should exist
And the "_site/puppies/snowy.html" file should not exist
And the "_site/puppies/figor.html" file should exist
And the "_site/puppies/hardy.html" file should not exist
When I run jekyll build --unpublished --future
Then I should get a zero exit status
And the _site directory should exist
And I should see "<div>Rover</div>" in "_site/index.html"
And I should see "<div>Snowy</div>" in "_site/index.html"
And I should see "<div>Figor</div>" in "_site/index.html"
But I should see "<div>Hardy</div>" in "_site/index.html"
And the "_site/puppies/rover.html" file should exist
And the "_site/puppies/snowy.html" file should exist
And the "_site/puppies/figor.html" file should exist
And the "_site/puppies/hardy.html" file should exist
Scenario: Access unrendered collection with future date and unpublished flag via Liquid
Given I have a _puppies directory
And I have the following documents under the puppies collection:
| title | date | content | published |
| Rover | 2007-12-31 | content for Rover. | true |
| Figor | 2007-12-31 | content for Figor. | false |
| Snowy | 2199-12-31 | content for Snowy. | true |
| Hardy | 2199-12-31 | content for Hardy. | false |
And I have a "_config.yml" file with content:
"""
collections:
puppies:
output: false
"""
And I have a "index.md" page that contains "{% for puppy in site.puppies %}<div>{{ puppy.title }}</div>{% endfor %}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "<div>Rover</div>" in "_site/index.html"
But I should see "<div>Snowy</div>" in "_site/index.html"
And I should not see "<div>Figor</div>" in "_site/index.html"
And I should not see "<div>Hardy</div>" in "_site/index.html"
And the "_site/puppies/rover.html" file should not exist
And the "_site/puppies/snowy.html" file should not exist
And the "_site/puppies/figor.html" file should not exist
And the "_site/puppies/hardy.html" file should not exist
When I run jekyll build --unpublished
Then I should get a zero exit status
And the _site directory should exist
And I should see "<div>Rover</div>" in "_site/index.html"
And I should see "<div>Snowy</div>" in "_site/index.html"
And I should see "<div>Figor</div>" in "_site/index.html"
But I should see "<div>Hardy</div>" in "_site/index.html"
And the "_site/puppies/rover.html" file should not exist
And the "_site/puppies/snowy.html" file should not exist
And the "_site/puppies/figor.html" file should not exist
And the "_site/puppies/hardy.html" file should not exist
When I run jekyll build --unpublished --future
Then I should get a zero exit status
And the _site directory should exist
And I should see "<div>Rover</div>" in "_site/index.html"
And I should see "<div>Snowy</div>" in "_site/index.html"
And I should see "<div>Figor</div>" in "_site/index.html"
But I should see "<div>Hardy</div>" in "_site/index.html"
And the "_site/puppies/rover.html" file should not exist
And the "_site/puppies/snowy.html" file should not exist
And the "_site/puppies/figor.html" file should not exist
And the "_site/puppies/hardy.html" file should not exist
Scenario: All the documents
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
And I have fixture collections
@@ -386,23 +288,7 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Second document's output: <p>Use <code class=\"language-plaintext highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
Scenario: Documents have an output attribute, which is the converted HTML based on site.config
Given I have an "index.html" page that contains "Second document's output: {{ site.documents[2].output }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
kramdown:
guess_lang: false
collections:
- methods
"""
And I'm using kramdown v2
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Second document's output: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
And I should see "Second document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
Scenario: Filter documents by where
Given I have an "index.html" page that contains "{% assign items = site.methods | where: 'whatever','foo.bar' %}Item count: {{ items.size }}"

View File

@@ -175,17 +175,17 @@ Feature: Create sites
Given I have a _posts directory
And I have the following post:
| title | date | layout | content |
| entry1 | 2040-12-31 | post | content for entry1. |
| entry1 | 2020-12-31 | post | content for entry1. |
| entry2 | 2007-12-31 | post | content for entry2. |
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "content for entry2" in "_site/2007/12/31/entry2.html"
And the "_site/2040/12/31/entry1.html" file should not exist
And the "_site/2020/12/31/entry1.html" file should not exist
When I run jekyll build --future
Then I should get a zero exit status
And the _site directory should exist
And the "_site/2040/12/31/entry1.html" file should exist
And the "_site/2020/12/31/entry1.html" file should exist
Scenario: Basic site with layouts, posts and related posts
Given I have a _layouts directory

View File

@@ -1,60 +0,0 @@
Feature: include_relative Tag
In order to share content across several closely related pages
As a hacker who likes to blog
I want to be able to include snippets in my site's pages and documents relative to current file
Scenario: Include a file relative to a post
Given I have a _posts directory
And I have a _posts/snippets directory
And I have the following post:
| title | date | content |
| Star Wars | 2018-09-02 | {% include_relative snippets/welcome_para.md %} |
And I have an "_posts/snippets/welcome_para.md" file that contains "Welcome back Dear Reader!"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Welcome back Dear Reader!" in "_site/2018/09/02/star-wars.html"
Scenario: Include a nested file relative to a post
Given I have a _posts directory
And I have a _posts/snippets directory
And I have a _posts/snippets/welcome_para directory
And I have the following post:
| title | date | content |
| Star Wars | 2018-09-02 | {% include_relative snippets/welcome_para.md %} |
And I have an "_posts/snippets/welcome_para.md" file that contains "{% include_relative snippets/welcome_para/greeting.md %} Dear Reader!"
And I have an "_posts/snippets/welcome_para/greeting.md" file that contains "Welcome back"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Welcome back Dear Reader!" in "_site/2018/09/02/star-wars.html"
Scenario: Include a nested file relative to a post as an excerpt
Given I have a _posts directory
And I have a _posts/snippets directory
And I have a _posts/snippets/welcome_para directory
And I have a "_posts/2018-09-02-star-wars.md" file with content:
"""
{% include_relative snippets/welcome_para.md %}
Hello World
"""
And I have an "_posts/snippets/welcome_para.md" file that contains "{% include_relative snippets/welcome_para/greeting.md %} Dear Reader!"
And I have an "_posts/snippets/welcome_para/greeting.md" file that contains "Welcome back"
And I have an "index.md" page that contains "{% for post in site.posts %}{{ post.excerpt }}{% endfor %}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Welcome back Dear Reader!" in "_site/2018/09/02/star-wars.html"
And I should see "Welcome back Dear Reader!" in "_site/index.html"
Scenario: Include a nested file relative to a page at root
Given I have a snippets directory
And I have a snippets/welcome_para directory
And I have a "index.md" page that contains "{% include_relative snippets/welcome_para.md %}"
And I have a "snippets/welcome_para.md" file that contains "{% include_relative snippets/welcome_para/greeting.md %} Dear Reader!"
And I have a "snippets/welcome_para/greeting.md" file that contains "Welcome back"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Welcome back Dear Reader!" in "_site/index.html"

View File

@@ -67,25 +67,6 @@ Feature: Incremental rebuild
And the _site directory should exist
And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html"
Scenario: Rebuild when a dependency of document in custom collection_dir is changed
Given I have a _includes directory
And I have a configuration file with "collections_dir" set to "collections"
And I have a collections/_posts directory
And I have the following post within the "collections" directory:
| title | date | layout | content |
| Wargames | 2009-03-27 | default | Basic Site with include tag: {% include about.html %} |
And I have an "_includes/about.html" file that contains "Generated by Jekyll"
When I run jekyll build -I
Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/2009/03/27/wargames.html"
When I wait 1 second
Then I have an "_includes/about.html" file that contains "Regenerated by Jekyll"
When I run jekyll build -I
Then I should get a zero exit status
And the _site directory should exist
And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/2009/03/27/wargames.html"
Scenario: A themed-site and incremental regeneration
Given I have a configuration file with "theme" set to "test-theme"
And I have an "index.md" page that contains "Themed site"

View File

@@ -5,19 +5,6 @@ Feature: Rendering
But I want to make it as simply as possible
So render with Liquid and place in Layouts
Scenario: Rendering a site with parentheses in its path name
Given I have a blank site in "omega(beta)"
And I have an "omega(beta)/test.md" page with layout "simple" that contains "Hello World"
And I have an omega(beta)/_includes directory
And I have an "omega(beta)/_includes/head.html" file that contains "Snippet"
And I have a configuration file with "source" set to "omega(beta)"
And I have an omega(beta)/_layouts directory
And I have an "omega(beta)/_layouts/simple.html" file that contains "{% include head.html %}: {{ content }}"
When I run jekyll build --profile
Then I should get a zero exit status
And I should see "Snippet: <p>Hello World</p>" in "_site/test.html"
And I should see "_layouts/simple.html" in the build output
Scenario: When receiving bad Liquid
Given I have a "index.html" page with layout "simple" that contains "{% include invalid.html %}"
And I have a simple layout that contains "{{ content }}"

View File

@@ -81,14 +81,6 @@ Feature: Site configuration
And the _site directory should exist
And I should see "<a href=\"https://www.google.com\">Google</a>" in "_site/index.html"
Scenario: Use Redcarpet for markup
Given I have an "index.markdown" page that contains "[Google](https://www.google.com)"
And I have a configuration file with "markdown" set to "redcarpet"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "<a href=\"https://www.google.com\">Google</a>" in "_site/index.html"
Scenario: Highlight code with pygments
Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
When I run jekyll build
@@ -203,28 +195,6 @@ Feature: Site configuration
And I should see "Post Layout: <p>content for entry1.</p>\n built at 2013-04-09T09:22:00-10:00" in "_site/2013/04/09/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>\n built at 2013-04-09T13:14:00-10:00" in "_site/2013/04/09/entry2.html"
Scenario: Generate proper dates with explicitly set timezone (using non-half hour offset )
Given I have a _layouts directory
And I have a page layout that contains "Page Layout: {{ site.posts.size }}"
And I have a post layout that contains "Post Layout: {{ content }} built at {{ page.date | date_to_xmlschema }}"
And I have an "index.html" page with layout "page" that contains "site index page"
And I have a configuration file with:
| key | value |
| timezone | Australia/Eucla |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2013-04-09 23:22 +0400 | post | content for entry1. |
| entry2 | 2013-04-10 03:14 +0400 | post | content for entry2. |
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Page Layout: 2" in "_site/index.html"
And the "_site/2013/04/10/entry1.html" file should exist
And the "_site/2013/04/10/entry2.html" file should exist
And I should see "Post Layout: <p>content for entry1.</p>\n built at 2013-04-10T04:07:00\+08:45" in "_site/2013/04/10/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>\n built at 2013-04-10T07:59:00\+08:45" in "_site/2013/04/10/entry2.html"
Scenario: Limit the number of posts generated by most recent date
Given I have a _posts directory
And I have a configuration file with:

View File

@@ -185,12 +185,6 @@ end
#
Given("I'm using kramdown v{int}") do |int|
skip_this_scenario unless Kramdown::VERSION.to_i == int.to_i
end
#
Given(%r!^I wait (\d+) second(s?)$!) do |time, _|
sleep(time.to_f)
end

View File

@@ -57,17 +57,6 @@ 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

View File

@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.rubygems_version = "2.2.2"
s.required_ruby_version = ">= 2.1.0"
s.required_ruby_version = ">= 2.3.0"
s.name = "jekyll"
s.version = Jekyll::VERSION
@@ -32,21 +32,14 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("addressable", "~> 2.4")
s.add_runtime_dependency("colorator", "~> 1.0")
s.add_runtime_dependency("csv", "~> 3.0")
s.add_runtime_dependency("em-websocket", "~> 0.5")
s.add_runtime_dependency("i18n", ">= 0.7", "< 2")
s.add_runtime_dependency("i18n", "~> 1.0")
s.add_runtime_dependency("jekyll-sass-converter", "~> 1.0")
s.add_runtime_dependency("jekyll-watch", "~> 2.0")
s.add_runtime_dependency("kramdown", "~> 1.14")
s.add_runtime_dependency("liquid", "~> 4.0")
s.add_runtime_dependency("mercenary", "~> 0.3.3")
s.add_runtime_dependency("pathutil", "~> 0.9")
rouge_versions = ENV["ROUGE_VERSION"] ? ["~> #{ENV["ROUGE_VERSION"]}"] : [">= 1.7", "< 4"]
s.add_runtime_dependency("rouge", *rouge_versions)
s.add_runtime_dependency("rouge", "~> 3.0")
s.add_runtime_dependency("safe_yaml", "~> 1.0")
s.add_runtime_dependency("webrick", ">= 1.0")
# Depend on kramdown. For kramdown v2, extra gems are required.
# https://kramdown.gettalong.org/news.html#kramdown-200-released
kramdown_versions = ENV["KRAMDOWN_VERSION"] ? ["~> #{ENV["KRAMDOWN_VERSION"]}"] : [">= 1.17", "< 3"]
s.add_runtime_dependency("kramdown", *kramdown_versions)
end

View File

@@ -212,9 +212,7 @@ module Jekyll
def read_document(full_path)
doc = Document.new(full_path, :site => site, :collection => self)
doc.read
if site.unpublished || doc.published?
docs << doc
end
docs << doc unless doc.data["published"] == false
end
private

View File

@@ -73,6 +73,30 @@ module Jekyll
"Fail if errors are present in front matter"
end
# rubocop:enable Metrics/MethodLength
# Run ::process method in a given set of Jekyll::Command subclasses and suggest
# re-running the associated command with --trace switch to obtain any additional
# information or backtrace regarding the encountered Exception.
#
# cmd - the Jekyll::Command to be handled
# options - configuration overrides
# klass - an array of Jekyll::Command subclasses associated with the command
#
# Note that all exceptions are rescued..
# rubocop: disable RescueException
def process_with_graceful_fail(cmd, options, *klass)
klass.each { |k| k.process(options) if k.respond_to?(:process) }
rescue Exception => e
raise e if cmd.trace
msg = " Please append `--trace` to the `#{cmd.name}` command "
dashes = "-" * msg.length
Jekyll.logger.error "", dashes
Jekyll.logger.error "Jekyll #{Jekyll::VERSION} ", msg
Jekyll.logger.error "", " for any additional information or backtrace. "
Jekyll.logger.abort_with "", dashes
end
# rubocop: enable RescueException
end
end
end

View File

@@ -15,7 +15,7 @@ module Jekyll
c.action do |_, options|
options["serving"] = false
Jekyll::Commands::Build.process(options)
process_with_graceful_fail(c, options, self)
end
end
end

View File

@@ -87,23 +87,12 @@ group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
gem "wdm", "~> 0.1.0" if Gem.win_platform?
# kramdown v2 ships without the gfm parser by default. If you're using
# kramdown v1, comment out this line.
gem "kramdown-parser-gfm"
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
RUBY
end

View File

@@ -72,29 +72,21 @@ module Jekyll
opts["serving"] = true
opts["watch"] = true unless opts.key?("watch")
start(opts)
# Set the reactor to nil so any old reactor will be GCed.
# We can't unregister a hook so while running tests we don't want to
# inadvertently keep using a reactor created by a previous test.
@reload_reactor = nil
config = configuration_from_options(opts)
config["url"] = default_url(config) if Jekyll.env == "development"
process_with_graceful_fail(cmd, config, Build, Serve)
end
end
end
#
def start(opts)
# Set the reactor to nil so any old reactor will be GCed.
# We can't unregister a hook so in testing when Serve.start is
# called multiple times we don't want to inadvertently keep using
# a reactor created by a previous test when our test might not
@reload_reactor = nil
config = configuration_from_options(opts)
if Jekyll.env == "development"
config["url"] = default_url(config)
end
[Build, Serve].each { |klass| klass.process(config) }
end
#
def process(opts)
opts = configuration_from_options(opts)
destination = opts["destination"]
@@ -202,7 +194,6 @@ module Jekyll
:JekyllOptions => opts,
:DoNotReverseLookup => true,
:MimeTypes => mime_types,
:MimeTypesCharset => mime_types_charset,
:DocumentRoot => opts["destination"],
:StartCallback => start_callback(opts["detach"]),
:StopCallback => stop_callback(opts["detach"]),
@@ -380,11 +371,6 @@ module Jekyll
end
private
def mime_types_charset
SafeYAML.load_file(File.expand_path("serve/mime_types_charset.json", __dir__))
end
def read_file(source_dir, file_path)
File.read(Jekyll.sanitized_path(source_dir, file_path))
end

View File

@@ -1,71 +0,0 @@
{
"application/javascript": "UTF-8",
"application/json": "UTF-8",
"application/manifest+json": "UTF-8",
"application/vnd.syncml+xml": "UTF-8",
"application/vnd.syncml.dm+wbxml": "UTF-8",
"application/vnd.syncml.dm+xml": "UTF-8",
"application/vnd.syncml.dmddf+xml": "UTF-8",
"application/vnd.wap.wbxml": "UTF-8",
"text/cache-manifest": "UTF-8",
"text/calendar": "UTF-8",
"text/coffeescript": "UTF-8",
"text/css": "UTF-8",
"text/csv": "UTF-8",
"text/html": "UTF-8",
"text/jade": "UTF-8",
"text/jsx": "UTF-8",
"text/less": "UTF-8",
"text/markdown": "UTF-8",
"text/mathml": "UTF-8",
"text/mdx": "UTF-8",
"text/n3": "UTF-8",
"text/plain": "UTF-8",
"text/prs.lines.tag": "UTF-8",
"text/richtext": "UTF-8",
"text/sgml": "UTF-8",
"text/shex": "UTF-8",
"text/slim": "UTF-8",
"text/spdx": "UTF-8",
"text/stylus": "UTF-8",
"text/tab-separated-values": "UTF-8",
"text/troff": "UTF-8",
"text/turtle": "UTF-8",
"text/uri-list": "UTF-8",
"text/vcard": "UTF-8",
"text/vnd.curl": "UTF-8",
"text/vnd.curl.dcurl": "UTF-8",
"text/vnd.curl.mcurl": "UTF-8",
"text/vnd.curl.scurl": "UTF-8",
"text/vnd.familysearch.gedcom": "UTF-8",
"text/vnd.fly": "UTF-8",
"text/vnd.fmi.flexstor": "UTF-8",
"text/vnd.graphviz": "UTF-8",
"text/vnd.in3d.3dml": "UTF-8",
"text/vnd.in3d.spot": "UTF-8",
"text/vnd.sun.j2me.app-descriptor": "UTF-8",
"text/vnd.wap.wml": "UTF-8",
"text/vnd.wap.wmlscript": "UTF-8",
"text/vtt": "UTF-8",
"text/x-asm": "UTF-8",
"text/x-c": "UTF-8",
"text/x-component": "UTF-8",
"text/x-fortran": "UTF-8",
"text/x-handlebars-template": "UTF-8",
"text/x-java-source": "UTF-8",
"text/x-lua": "UTF-8",
"text/x-markdown": "UTF-8",
"text/x-nfo": "UTF-8",
"text/x-opml": "UTF-8",
"text/x-pascal": "UTF-8",
"text/x-processing": "UTF-8",
"text/x-sass": "UTF-8",
"text/x-scss": "UTF-8",
"text/x-setext": "UTF-8",
"text/x-sfv": "UTF-8",
"text/x-suse-ymp": "UTF-8",
"text/x-uuencode": "UTF-8",
"text/x-vcalendar": "UTF-8",
"text/x-vcard": "UTF-8",
"text/yaml": "UTF-8"
}

View File

@@ -137,7 +137,6 @@ module Jekyll
def initialize(server, root, callbacks)
# So we can access them easily.
@jekyll_opts = server.config[:JekyllOptions]
@mime_types_charset = server.config[:MimeTypesCharset]
set_defaults
super
end
@@ -173,28 +172,27 @@ module Jekyll
end
end
conditionally_inject_charset(res)
validate_and_ensure_charset(req, res)
res.header.merge!(@headers)
rtn
end
# rubocop:enable Naming/MethodName
#
private
def validate_and_ensure_charset(_req, res)
key = res.header.keys.grep(%r!content-type!i).first
typ = res.header[key]
#
# Inject charset based on Jekyll config only if our mime-types database contains
# the charset metadata.
#
# Refer `script/vendor-mimes` in the repository for further details.
def conditionally_inject_charset(res)
typ = res.header["content-type"]
return unless @mime_types_charset.key?(typ)
return if %r!;\s*charset=!.match?(typ)
res.header["content-type"] = "#{typ}; charset=#{@jekyll_opts["encoding"]}"
unless typ =~ %r!;\s*charset=!
res.header[key] = "#{typ}; charset=#{@jekyll_opts["encoding"]}"
end
end
#
private
def set_defaults
hash_ = @jekyll_opts.fetch("webrick", {}).fetch("headers", {})
DEFAULTS.each_with_object(@headers = hash_) do |(key, val), hash|

View File

@@ -70,10 +70,6 @@ module Jekyll
"extensions" => [],
},
"redcarpet" => {
"extensions" => [],
},
"kramdown" => {
"auto_ids" => true,
"toc_levels" => "1..6",
@@ -81,7 +77,6 @@ module Jekyll
"smart_quotes" => "lsquo,rsquo,ldquo,rdquo",
"input" => "GFM",
"hard_wrap" => false,
"guess_lang" => true,
"footnote_nr" => 1,
"show_warnings" => false,
},

View File

@@ -30,7 +30,6 @@ module Jekyll
# rubocop:disable Naming/AccessorMethodName
def get_processor
case @config["markdown"].downcase
when "redcarpet" then return RedcarpetParser.new(@config)
when "kramdown" then return KramdownParser.new(@config)
when "rdiscount" then return RDiscountParser.new(@config)
else
@@ -44,7 +43,7 @@ module Jekyll
# are not in safe mode.)
def valid_processors
%w(rdiscount kramdown redcarpet) + third_party_processors
%w(rdiscount kramdown) + third_party_processors
end
# Public: A list of processors that you provide via plugins.
@@ -53,7 +52,7 @@ module Jekyll
def third_party_processors
self.class.constants - \
%w(KramdownParser RDiscountParser RedcarpetParser PRIORITIES).map(
%w(KramdownParser RDiscountParser PRIORITIES).map(
&:to_sym
)
end

View File

@@ -18,7 +18,6 @@ module Jekyll
@config = config["kramdown"] || {}
@highlighter = nil
setup
load_dependencies
end
# Setup and normalize the configuration:
@@ -31,8 +30,6 @@ module Jekyll
def setup
@config["syntax_highlighter"] ||= highlighter
@config["syntax_highlighter_opts"] ||= {}
@config["syntax_highlighter_opts"]["default_lang"] ||= "plaintext"
@config["syntax_highlighter_opts"]["guess_lang"] = @config["guess_lang"]
@config["coderay"] ||= {} # XXX: Legacy.
modernize_coderay_config
make_accessible
@@ -50,24 +47,6 @@ module Jekyll
end
private
def load_dependencies
return if Kramdown::VERSION.to_i < 2
if @config["input"] == "GFM"
Jekyll::External.require_with_graceful_fail("kramdown-parser-gfm")
end
if highlighter == "coderay"
Jekyll::External.require_with_graceful_fail("kramdown-syntax-coderay")
end
# `mathjax` emgine is bundled within kramdown-2.x and will be handled by
# kramdown itself.
if (math_engine = @config["math_engine"]) && math_engine != "mathjax"
Jekyll::External.require_with_graceful_fail("kramdown-math-#{math_engine}")
end
end
def make_accessible(hash = @config)
hash.keys.each do |key|
hash[key.to_sym] = hash[key]

View File

@@ -1,112 +0,0 @@
# frozen_string_literal: true
class Jekyll::Converters::Markdown::RedcarpetParser
module CommonMethods
def add_code_tags(code, lang)
code = code.to_s
code = code.sub(
%r!<pre>!,
"<pre><code class=\"language-#{lang}\" data-lang=\"#{lang}\">"
)
code = code.sub(%r!</pre>!, "</code></pre>")
code
end
end
module WithPygments
include CommonMethods
def block_code(code, lang)
unless defined?(Pygments)
Jekyll::External.require_with_graceful_fail("pygments")
end
lang = lang && lang.split.first || "text"
add_code_tags(
Pygments.highlight(
code,
{
:lexer => lang,
:options => { :encoding => "utf-8" },
}
),
lang
)
end
end
module WithoutHighlighting
require "cgi"
include CommonMethods
def code_wrap(code)
"<figure class=\"highlight\"><pre>#{CGI.escapeHTML(code)}</pre></figure>"
end
def block_code(code, lang)
lang = lang && lang.split.first || "text"
add_code_tags(code_wrap(code), lang)
end
end
module WithRouge
def block_code(_code, lang)
code = "<pre>#{super}</pre>"
"<div class=\"highlight\">#{add_code_tags(code, lang)}</div>"
end
protected
def rouge_formatter(_lexer)
Jekyll::Utils::Rouge.html_formatter(:wrap => false)
end
end
def initialize(config)
unless defined?(Redcarpet)
Jekyll::External.require_with_graceful_fail("redcarpet")
end
@config = config
@redcarpet_extensions = {}
@config["redcarpet"]["extensions"].each do |e|
@redcarpet_extensions[e.to_sym] = true
end
@renderer ||= class_with_proper_highlighter(@config["highlighter"])
end
def class_with_proper_highlighter(highlighter)
Class.new(Redcarpet::Render::HTML) do
case highlighter
when "pygments"
include WithPygments
when "rouge"
Jekyll::External.require_with_graceful_fail(%w(
rouge rouge/plugins/redcarpet
))
unless Gem::Version.new(Rouge.version) > Gem::Version.new("1.3.0")
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
end
include Rouge::Plugins::Redcarpet
include CommonMethods
include WithRouge
else
include WithoutHighlighting
end
end
end
def convert(content)
@redcarpet_extensions[:fenced_code_blocks] = \
!@redcarpet_extensions[:no_fenced_code_blocks]
if @redcarpet_extensions[:smart]
@renderer.send :include, Redcarpet::Render::SmartyPants
end
markdown = Redcarpet::Markdown.new(
@renderer.new(@redcarpet_extensions),
@redcarpet_extensions
)
markdown.render(content)
end
end

View File

@@ -39,7 +39,7 @@ module Jekyll
begin
self.content = File.read(@path || site.in_source_dir(base, name),
**Utils.merged_file_read_opts(site, opts))
Utils.merged_file_read_opts(site, opts))
if content =~ Document::YAML_FRONT_MATTER_REGEXP
self.content = $POSTMATCH
self.data = SafeYAML.load(Regexp.last_match(1))

View File

@@ -266,7 +266,7 @@ module Jekyll
else
begin
merge_defaults
read_content(**opts)
read_content(opts)
read_post_data
rescue StandardError => e
handle_read_error(e)
@@ -445,8 +445,8 @@ module Jekyll
end
private
def read_content(**opts)
self.content = File.read(path, **Utils.merged_file_read_opts(site, opts))
def read_content(opts)
self.content = File.read(path, Utils.merged_file_read_opts(site, opts))
if content =~ YAML_FRONT_MATTER_REGEXP
self.content = $POSTMATCH
data_file = SafeYAML.load(Regexp.last_match(1))

View File

@@ -8,7 +8,8 @@ module Jekyll
mutable false
def_delegator :@obj, :site_data, :data
def_delegators :@obj, :time, :pages, :static_files, :tags, :categories
def_delegators :@obj, :time, :pages, :static_files, :documents,
:tags, :categories
private def_delegator :@obj, :config, :fallback_data
@@ -38,16 +39,6 @@ module Jekyll
@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.

View File

@@ -31,12 +31,9 @@ module Jekyll
def filter(entries)
entries.reject do |e|
# Reject this entry if it is a symlink.
next true if symlink?(e)
# Do not reject this entry if it is included.
next false if included?(e)
# Reject this entry if it is special, a backup file, or excluded.
special?(e) || backup?(e) || excluded?(e)
unless included?(e)
special?(e) || backup?(e) || excluded?(e) || symlink?(e)
end
end
end

View File

@@ -48,7 +48,7 @@ module Jekyll
#
# Returns the relative_path for the doc this excerpt belongs to with #excerpt appended
def relative_path
File.join(doc.relative_path, "#excerpt")
@relative_path ||= File.join(doc.relative_path, "#excerpt")
end
# Check if excerpt includes a string
@@ -128,63 +128,46 @@ module Jekyll
#
# Returns excerpt String
LIQUID_TAG_REGEX = %r!{%-?\s*(\w+)\s*.*?-?%}!m
LIQUID_TAG_REGEX = %r!{%\s*(\w+).+\s*%}!m
MKDWN_LINK_REF_REGEX = %r!^ {0,3}\[[^\]]+\]:.+$!
def extract_excerpt(doc_content)
head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)
# append appropriate closing tag(s) (for each Liquid block), to the `head`
# if the partitioning resulted in leaving the closing tag somewhere
# in the `tail` partition.
# append appropriate closing tag (to a Liquid block), to the "head" if the
# partitioning resulted in leaving the closing tag somewhere in the "tail"
# partition.
if head.include?("{%")
modified = false
tag_names = head.scan(LIQUID_TAG_REGEX)
tag_names.flatten!
tag_names.reverse_each do |tag_name|
next unless liquid_block?(tag_name)
next if head =~ endtag_regex_stash(tag_name)
head =~ LIQUID_TAG_REGEX
tag_name = Regexp.last_match(1)
modified = true
if liquid_block?(tag_name) && head.match(%r!{%\s*end#{tag_name}\s*%}!).nil?
print_build_warning
head << "\n{% end#{tag_name} %}"
end
print_build_warning if modified
end
return head if tail.empty?
head << "\n\n" << tail.scan(MKDWN_LINK_REF_REGEX).join("\n")
if tail.empty?
head
else
head.to_s.dup << "\n\n" << tail.scan(MKDWN_LINK_REF_REGEX).join("\n")
end
end
private
def endtag_regex_stash(tag_name)
@endtag_regex_stash ||= {}
@endtag_regex_stash[tag_name] ||= %r!{%-?\s*end#{tag_name}.*?\s*-?%}!m
end
def liquid_block?(tag_name)
return false unless tag_name.is_a?(String)
return false unless Liquid::Template.tags[tag_name]
Liquid::Template.tags[tag_name].ancestors.include?(Liquid::Block)
rescue NoMethodError
Jekyll.logger.error "Error:",
"A Liquid tag in the excerpt of #{doc.relative_path} couldn't be " \
"parsed."
raise
Liquid::Template.tags[tag_name].superclass == Liquid::Block
end
def print_build_warning
Jekyll.logger.warn "Warning:", "Excerpt modified in #{doc.relative_path}!"
Jekyll.logger.warn "", "Found a Liquid block containing the excerpt separator" \
" #{doc.excerpt_separator.inspect}. "
Jekyll.logger.warn "", "The block has been modified with the appropriate" \
" closing tag."
Jekyll.logger.warn "", "Feel free to define a custom excerpt or" \
" excerpt_separator in the document's front matter" \
" if the generated excerpt is unsatisfactory."
Jekyll.logger.warn "",
"Found a Liquid block containing separator '#{doc.excerpt_separator}' and has " \
"been modified with the appropriate closing tag."
Jekyll.logger.warn "",
"Feel free to define a custom excerpt or excerpt_separator in the document's " \
"Front Matter if the generated excerpt is unsatisfactory."
end
end
end

View File

@@ -9,6 +9,7 @@ module Jekyll
#
def blessed_gems
%w(
jekyll-compose
jekyll-docs
jekyll-import
)

View File

@@ -53,9 +53,7 @@ module Jekyll
private
def filename_regex
@filename_regex ||= begin
%r!\A(#{Regexp.escape(source_dir)}/|#{Regexp.escape(theme_dir.to_s)}/|/*)(.*)!i
end
@filename_regex ||= %r!\A(#{source_dir}/|#{theme_dir}/|\W*)(.*)!i
end
def new_profile_hash

View File

@@ -29,7 +29,9 @@ module Jekyll
#
# Returns nothing
def log_level=(level)
writer.level = LOG_LEVELS.fetch(level)
writer.level = level if level.is_a?(Integer) && level.between?(0, 3)
writer.level = LOG_LEVELS[level] ||
raise(ArgumentError, "unknown log level")
@level = level
end

View File

@@ -5,47 +5,36 @@ application/andrew-inset ez
application/applixware aw
application/atom+xml atom
application/atomcat+xml atomcat
application/atomdeleted+xml atomdeleted
application/atomsvc+xml atomsvc
application/atsc-dwd+xml dwd
application/atsc-held+xml held
application/atsc-rsat+xml rsat
application/bdoc bdoc
application/calendar+xml xcs
application/ccxml+xml ccxml
application/cdfx+xml cdfx
application/cdmi-capability cdmia
application/cdmi-container cdmic
application/cdmi-domain cdmid
application/cdmi-object cdmio
application/cdmi-queue cdmiq
application/cpl+xml cpl
application/cu-seeme cu
application/dash+xml mpd
application/dash-patch+xml mpp
application/davmount+xml davmount
application/docbook+xml dbk
application/dssc+der dssc
application/dssc+xml xdssc
application/ecmascript ecma es
application/ecmascript ecma
application/emma+xml emma
application/emotionml+xml emotionml
application/epub+zip epub
application/exi exi
application/express exp
application/fdt+xml fdt
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
application/its+xml its
application/java-archive ear jar war
application/java-archive jar war ear
application/java-serialized-object ser
application/java-vm class
application/javascript js mjs
@@ -53,7 +42,6 @@ application/json json m
application/json5 json5
application/jsonml+json jsonml
application/ld+json jsonld
application/lgr+xml lgr
application/lost+xml lostxml
application/mac-binhex40 hqx
application/mac-compactpro cpt
@@ -61,40 +49,32 @@ application/mads+xml mads
application/manifest+json webmanifest
application/marc mrc
application/marcxml+xml mrcx
application/mathematica ma mb nb
application/mathematica ma nb mb
application/mathml+xml mathml
application/mbox mbox
application/media-policy-dataset+xml mpf
application/mediaservercontrol+xml mscml
application/metalink+xml metalink
application/metalink4+xml meta4
application/mets+xml mets
application/mmt-aei+xml maei
application/mmt-usd+xml musd
application/mods+xml mods
application/mp21 m21 mp21
application/mp4 m4p mp4s
application/mp4 mp4s m4p
application/msword doc dot
application/mxf mxf
application/n-quads nq
application/n-triples nt
application/node cjs
application/octet-stream bin bpk buffer deb deploy dist distz dll dmg dms dump elc exe img iso lrf mar msi msm msp pkg so
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
application/ogg ogx
application/omdoc+xml omdoc
application/onenote onepkg onetmp onetoc onetoc2
application/onenote onetoc onetoc2 onetmp onepkg
application/oxps oxps
application/p2p-overlay+xml relo
application/patch-ops-error+xml xer
application/pdf pdf
application/pgp-encrypted pgp
application/pgp-keys asc
application/pgp-signature sig
application/pgp-signature asc sig
application/pics-rules prf
application/pkcs10 p10
application/pkcs7-mime p7c p7m
application/pkcs7-mime p7m p7c
application/pkcs7-signature p7s
application/pkcs8 p8
application/pkix-attr-cert ac
@@ -104,19 +84,14 @@ application/pkix-pkipath pkipat
application/pkixcmp pki
application/pls+xml pls
application/postscript ai eps ps
application/provenance+xml provx
application/prs.cww cww
application/pskc+xml pskcxml
application/raml+yaml raml
application/rdf+xml owl rdf
application/rdf+xml rdf
application/reginfo+xml rif
application/relax-ng-compact-syntax rnc
application/resource-lists+xml rl
application/resource-lists-diff+xml rld
application/rls-services+xml rs
application/route-apd+xml rapd
application/route-s-tsid+xml sls
application/route-usd+xml rusd
application/rpki-ghostbusters gbr
application/rpki-manifest mft
application/rpki-roa roa
@@ -129,12 +104,9 @@ application/scvp-cv-response scs
application/scvp-vp-request spq
application/scvp-vp-response spp
application/sdp sdp
application/senml+xml senmlx
application/sensml+xml sensmlx
application/set-payment-initiation setpay
application/set-registration-initiation setreg
application/shf+xml shf
application/sieve sieve siv
application/smil+xml smi smil
application/sparql-query rq
application/sparql-results+xml srx
@@ -143,17 +115,9 @@ application/srgs+xml grxml
application/sru+xml sru
application/ssdl+xml ssdl
application/ssml+xml ssml
application/swid+xml swidtag
application/tei+xml tei teicorpus
application/thraud+xml tfi
application/timestamped-data tsd
application/toml toml
application/trig trig
application/ttml+xml ttml
application/ubjson ubj
application/urc-ressheet+xml rsheet
application/urc-targetdesc+xml td
application/vnd.1000minds.decision-model+xml 1km
application/vnd.3gpp.pic-bw-large plb
application/vnd.3gpp.pic-bw-small psb
application/vnd.3gpp.pic-bw-var pvb
@@ -162,13 +126,12 @@ application/vnd.3m.post-it-notes pwn
application/vnd.accpac.simply.aso aso
application/vnd.accpac.simply.imp imp
application/vnd.acucobol acu
application/vnd.acucorp acutc atc
application/vnd.acucorp atc acutc
application/vnd.adobe.air-application-installer-package+zip air
application/vnd.adobe.formscentral.fcdt fcdt
application/vnd.adobe.fxp fxp fxpl
application/vnd.adobe.xdp+xml xdp
application/vnd.adobe.xfdf xfdf
application/vnd.age age
application/vnd.ahead.space ahead
application/vnd.airzip.filesecure.azf azf
application/vnd.airzip.filesecure.azs azs
@@ -180,25 +143,20 @@ 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 key
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
application/vnd.audiograph aep
application/vnd.balsamiq.bmml+xml bmml
application/vnd.blueice.multipass mpm
application/vnd.bmi bmi
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 c4d c4f c4g c4p c4u
application/vnd.clonk.c4group c4g c4d c4f c4p c4u
application/vnd.cluetrust.cartomobile-config c11amc
application/vnd.cluetrust.cartomobile-config-pkg c11amz
application/vnd.commonspace csp
@@ -216,11 +174,10 @@ application/vnd.curl.car car
application/vnd.curl.pcurl pcurl
application/vnd.dart dart
application/vnd.data-vision.rdz rdz
application/vnd.dbf dbf
application/vnd.dece.data uvd uvf uvvd uvvf
application/vnd.dece.data uvf uvvf uvd uvvd
application/vnd.dece.ttml+xml uvt uvvt
application/vnd.dece.unspecified uvvx uvx
application/vnd.dece.zip uvvz uvz
application/vnd.dece.unspecified uvx uvvx
application/vnd.dece.zip uvz uvvz
application/vnd.denovo.fcselayout-link fe_launch
application/vnd.dna dna
application/vnd.dolby.mlp mlp
@@ -242,10 +199,10 @@ application/vnd.ezpix-album ez2
application/vnd.ezpix-package ez3
application/vnd.fdf fdf
application/vnd.fdsn.mseed mseed
application/vnd.fdsn.seed dataless seed
application/vnd.fdsn.seed seed dataless
application/vnd.flographit gph
application/vnd.fluxtime.clip ftc
application/vnd.framemaker book fm frame maker
application/vnd.framemaker fm frame maker book
application/vnd.frogans.fnc fnc
application/vnd.frogans.ltf ltf
application/vnd.fsc.weblaunch fsc
@@ -291,7 +248,7 @@ application/vnd.hp-pcl pcl
application/vnd.hp-pclxl pclxl
application/vnd.hydrostatix.sof-data sfd-hdstx
application/vnd.ibm.minipay mpy
application/vnd.ibm.modcap afp list3820 listafp
application/vnd.ibm.modcap afp listafp list3820
application/vnd.ibm.rights-management irm
application/vnd.ibm.secure-container sc
application/vnd.iccprofile icc icm
@@ -311,7 +268,7 @@ application/vnd.jam jam
application/vnd.jcp.javame.midlet-rms rms
application/vnd.jisp jisp
application/vnd.joost.joda-archive joda
application/vnd.kahootz ktr ktz
application/vnd.kahootz ktz ktr
application/vnd.kde.karbon karbon
application/vnd.kde.kchart chrt
application/vnd.kde.kformula kfo
@@ -323,7 +280,7 @@ application/vnd.kde.kword kwd kw
application/vnd.kenameaapp htke
application/vnd.kidspiration kia
application/vnd.kinar kne knp
application/vnd.koan skd skm skp skt
application/vnd.koan skp skd skt skm
application/vnd.kodak-descriptor sse
application/vnd.las.las+xml lasxml
application/vnd.llamagraphics.life-balance.desktop lbd
@@ -336,7 +293,6 @@ application/vnd.lotus-organizer org
application/vnd.lotus-screencam scm
application/vnd.lotus-wordpro lwp
application/vnd.macports.portpkg portpkg
application/vnd.mapbox-vector-tile mvt
application/vnd.mcd mcd
application/vnd.medcalcdata mc1
application/vnd.mediastation.cdkey cdkey
@@ -357,7 +313,7 @@ application/vnd.mophun.certificate mpc
application/vnd.mozilla.xul+xml xul
application/vnd.ms-artgalry cil
application/vnd.ms-cab-compressed cab
application/vnd.ms-excel xla xlc xlm xls xlt xlw
application/vnd.ms-excel xls xlm xla xlc xlt xlw
application/vnd.ms-excel.addin.macroenabled.12 xlam
application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb
application/vnd.ms-excel.sheet.macroenabled.12 xlsm
@@ -370,16 +326,16 @@ application/vnd.ms-officetheme thmx
application/vnd.ms-outlook msg
application/vnd.ms-pki.seccat cat
application/vnd.ms-pki.stl stl
application/vnd.ms-powerpoint pot pps ppt
application/vnd.ms-powerpoint ppt pps pot
application/vnd.ms-powerpoint.addin.macroenabled.12 ppam
application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm
application/vnd.ms-powerpoint.slide.macroenabled.12 sldm
application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm
application/vnd.ms-powerpoint.template.macroenabled.12 potm
application/vnd.ms-project mpt
application/vnd.ms-project mpp mpt
application/vnd.ms-word.document.macroenabled.12 docm
application/vnd.ms-word.template.macroenabled.12 dotm
application/vnd.ms-works wcm wdb wks wps
application/vnd.ms-works wps wks wcm wdb
application/vnd.ms-wpl wpl
application/vnd.ms-xpsdocument xps
application/vnd.mseq mseq
@@ -387,7 +343,7 @@ application/vnd.musician mus
application/vnd.muvee.style msty
application/vnd.mynfc taglet
application/vnd.neurolanguage.nlu nlu
application/vnd.nitf nitf ntf
application/vnd.nitf ntf nitf
application/vnd.noblenet-directory nnd
application/vnd.noblenet-sealer nns
application/vnd.noblenet-web nnw
@@ -417,9 +373,7 @@ application/vnd.oasis.opendocument.text-template ott
application/vnd.oasis.opendocument.text-web oth
application/vnd.olpc-sugar xo
application/vnd.oma.dd2+xml dd2
application/vnd.openblox.game+xml obgx
application/vnd.openofficeorg.extension oxt
application/vnd.openstreetmap.data+xml osm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.openxmlformats-officedocument.presentationml.slide sldx
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
@@ -431,7 +385,7 @@ application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/vnd.osgeo.mapguide.package mgp
application/vnd.osgi.dp dp
application/vnd.osgi.subsystem esa
application/vnd.palm oprc pdb pqa
application/vnd.palm pdb pqa oprc
application/vnd.pawaafile paw
application/vnd.pg.format str
application/vnd.pg.osasli ei6
@@ -443,8 +397,7 @@ application/vnd.previewsystems.box box
application/vnd.proteus.magazine mgz
application/vnd.publishare-delta-tree qps
application/vnd.pvi.ptid1 ptid
application/vnd.quark.quarkxpress qwd qwt qxb qxd qxl qxt
application/vnd.rar rar
application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb
application/vnd.realvnc.bed bed
application/vnd.recordare.musicxml mxl
application/vnd.recordare.musicxml+xml musicxml
@@ -465,8 +418,7 @@ application/vnd.shana.informed.package ipk
application/vnd.simtech-mindmapper twd twds
application/vnd.smaf mmf
application/vnd.smart.teacher teacher
application/vnd.software602.filler.form+xml fo
application/vnd.solent.sdkm+xml sdkd sdkm
application/vnd.solent.sdkm+xml sdkm sdkd
application/vnd.spotfire.dxp dxp
application/vnd.spotfire.sfs sfs
application/vnd.stardivision.calc sdc
@@ -494,9 +446,8 @@ application/vnd.symbian.install sis si
application/vnd.syncml+xml xsm
application/vnd.syncml.dm+wbxml bdm
application/vnd.syncml.dm+xml xdm
application/vnd.syncml.dmddf+xml ddf
application/vnd.tao.intent-module-archive tao
application/vnd.tcpdump.pcap cap dmp pcap
application/vnd.tcpdump.pcap pcap cap dmp
application/vnd.tmobile-livetv tmo
application/vnd.trid.tpt tpt
application/vnd.triscape.mxs mxs
@@ -507,7 +458,7 @@ application/vnd.umajin umj
application/vnd.unity unityweb
application/vnd.uoml+xml uoml
application/vnd.vcx vcx
application/vnd.visio vsd vss vst vsw
application/vnd.visio vsd vst vss vsw
application/vnd.visionary vis
application/vnd.vsf vsf
application/vnd.wap.wbxml wbxml
@@ -531,8 +482,6 @@ 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/watcherinfo+xml wif
application/widget wgt
application/winhlp hlp
application/wsdl+xml wsdl
@@ -541,15 +490,15 @@ application/x-7z-compressed 7z
application/x-abiword abw
application/x-ace-compressed ace
application/x-arj arj
application/x-authorware-bin aab u32 vox x32
application/x-authorware-bin aab x32 u32 vox
application/x-authorware-map aam
application/x-authorware-seg aas
application/x-bcpio bcpio
application/x-bittorrent torrent
application/x-blorb blb blorb
application/x-bzip bz
application/x-bzip2 boz bz2
application/x-cbr cb7 cba cbr cbt cbz
application/x-bzip2 bz2 boz
application/x-cbr cbr cba cbt cbz cb7
application/x-cdlink vcd
application/x-cfs-compressed cfs
application/x-chat chat
@@ -561,7 +510,7 @@ application/x-cpio cpio
application/x-csh csh
application/x-debian-package udeb
application/x-dgc-compressed dgc
application/x-director cct cst cxt dcr dir dxr fgd swa w3d
application/x-director dir dcr dxr cst cct cxt w3d fgd swa
application/x-doom wad
application/x-dtbncx+xml ncx
application/x-dtbook+xml dtb
@@ -572,9 +521,11 @@ 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-type1 afm pfa pfb pfm
application/x-font-ttf ttf ttc
application/x-font-type1 pfa pfb pfm afm
application/x-freearc arc
application/x-futuresplash spl
application/x-gca-compressed gca
@@ -587,13 +538,12 @@ application/x-httpd-php php
application/x-install-instructions install
application/x-java-archive-diff jardiff
application/x-java-jnlp-file jnlp
application/x-keepass2 kdbx
application/x-latex latex
application/x-lua-bytecode luac
application/x-lzh-compressed lha lzh
application/x-lzh-compressed lzh lha
application/x-makeself run
application/x-mie mie
application/x-mobipocket-ebook mobi prc
application/x-mobipocket-ebook prc mobi
application/x-ms-application application
application/x-ms-shortcut lnk
application/x-ms-wmd wmd
@@ -603,21 +553,22 @@ application/x-msaccess mdb
application/x-msbinder obd
application/x-mscardfile crd
application/x-msclip clp
application/x-msdownload bat com
application/x-msmediaview m13 m14 mvb
application/x-msmetafile emf emz wmf
application/x-msdownload com bat
application/x-msmediaview mvb m13 m14
application/x-msmetafile wmf emf emz
application/x-msmoney mny
application/x-mspublisher pub
application/x-msschedule scd
application/x-msterminal trm
application/x-mswrite wri
application/x-netcdf cdf nc
application/x-netcdf nc cdf
application/x-ns-proxy-autoconfig pac
application/x-nzb nzb
application/x-perl pl pm
application/x-pkcs12 p12 pfx
application/x-pkcs7-certificates p7b spc
application/x-pkcs7-certreqresp p7r
application/x-rar-compressed rar
application/x-redhat-package-manager rpm
application/x-research-info-systems ris
application/x-sea sea
@@ -637,7 +588,7 @@ application/x-tar tar
application/x-tcl tcl tk
application/x-tex tex
application/x-tex-tfm tfm
application/x-texinfo texi texinfo
application/x-texinfo texinfo texi
application/x-tgif obj
application/x-ustar ustar
application/x-virtualbox-hdd hdd
@@ -650,40 +601,34 @@ application/x-virtualbox-vhd vhd
application/x-virtualbox-vmdk vmdk
application/x-wais-source src
application/x-web-app-manifest+json webapp
application/x-x509-ca-cert crt der pem
application/x-x509-ca-cert der crt pem
application/x-xfig fig
application/x-xliff+xml xlf
application/x-xpinstall xpi
application/x-xz xz
application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8
application/xaml+xml xaml
application/xcap-att+xml xav
application/xcap-caps+xml xca
application/xcap-diff+xml xdf
application/xcap-el+xml xel
application/xcap-ns+xml xns
application/xenc+xml xenc
application/xhtml+xml xht xhtml
application/xml rng xml xsd xsl
application/xhtml+xml xhtml xht
application/xml xml xsl xsd rng
application/xml-dtd dtd
application/xop+xml xop
application/xproc+xml xpl
application/xslt+xml xslt
application/xspf+xml xspf
application/xv+xml mxml xhvml xvm xvml
application/xv+xml mxml xhvml xvml xvm
application/yang yang
application/yin+xml yin
application/zip zip
audio/3gpp 3gpp
audio/adpcm adp
audio/amr amr
audio/basic au snd
audio/midi kar mid midi rmi
audio/mobile-xmf mxmf
audio/midi mid midi kar rmi
audio/mp3 mp3
audio/mp4 m4a mp4a
audio/mpeg m2a m3a mp2 mp2a mpga
audio/ogg oga ogg opus spx
audio/mpeg mpga mp2 mp2a m2a m3a
audio/ogg oga ogg spx
audio/s3m s3m
audio/silk sil
audio/vnd.dece.audio uva uvva
@@ -700,14 +645,14 @@ audio/vnd.rip rip
audio/wav wav
audio/webm weba
audio/x-aac aac
audio/x-aiff aif aifc aiff
audio/x-aiff aif aiff aifc
audio/x-caf caf
audio/x-flac flac
audio/x-matroska mka
audio/x-mpegurl m3u
audio/x-ms-wax wax
audio/x-ms-wma wma
audio/x-pn-realaudio ra ram
audio/x-pn-realaudio ram ra
audio/x-pn-realaudio-plugin rmp
audio/xm xm
chemical/x-cdx cdx
@@ -716,57 +661,22 @@ 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/avci avci
image/avcs avcs
image/avif avif
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/hej2k hej2
image/hsj2 hsj2
image/ief ief
image/jls jls
image/jp2 jp2 jpg2
image/jpeg jpe jpeg jpg
image/jph jph
image/jphc jhc
image/jpm jpm
image/jpx jpf jpx
image/jxr jxr
image/jxra jxra
image/jxrs jxrs
image/jxs jxs
image/jxsc jxsc
image/jxsi jxsi
image/jxss jxss
image/jpeg jpeg jpg jpe
image/ktx ktx
image/ktx2 ktx2
image/png png
image/prs.btif btif
image/prs.pti pti
image/sgi sgi
image/svg+xml svg svgz
image/t38 t38
image/tiff tif tiff
image/tiff-fx tfx
image/tiff tiff tif
image/vnd.adobe.photoshop psd
image/vnd.airzip.accelerator.azv azv
image/vnd.dece.graphic uvg uvi uvvg uvvi
image/vnd.djvu djv djvu
image/vnd.dece.graphic uvi uvvi uvg uvvg
image/vnd.djvu djvu djv
image/vnd.dvb.subtitle sub
image/vnd.dwg dwg
image/vnd.dxf dxf
@@ -775,25 +685,21 @@ 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-dds dds
image/vnd.ms-modi mdi
image/vnd.ms-photo wdp
image/vnd.net-fpx npx
image/vnd.pco.b16 b16
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 fh4 fh5 fh7 fhc
image/x-freehand fh fhc fh4 fh5 fh7
image/x-icon ico
image/x-jng jng
image/x-mrsid-image sid
image/x-pict pct pic
image/x-pcx pcx
image/x-pict pic pct
image/x-portable-anymap pnm
image/x-portable-bitmap pbm
image/x-portable-graymap pgm
@@ -803,35 +709,18 @@ 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 iges igs
model/mesh mesh msh silo
model/mtl mtl
model/step+xml stpx
model/step+zip stpz
model/step-xml+zip stpxz
model/iges igs iges
model/mesh msh mesh silo
model/vnd.collada+xml dae
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.sap.vds vds
model/vnd.usdz+zip usdz
model/vnd.valve.source.compiled-map bsp
model/vnd.vtu vtu
model/vrml vrml wrl
model/vrml wrl vrml
model/x3d+binary x3db x3dbz
model/x3d+vrml x3dv x3dvz
model/x3d+xml x3d x3dz
@@ -840,24 +729,22 @@ text/calendar ics if
text/coffeescript coffee litcoffee
text/css css
text/csv csv
text/html htm html shtml
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 conf def in ini list log text txt
text/plain txt text conf def list log in ini
text/prs.lines.tag dsc
text/richtext rtx
text/sgml sgm sgml
text/shex shex
text/sgml sgml sgm
text/slim slim slm
text/spdx spdx
text/stylus styl stylus
text/stylus stylus styl
text/tab-separated-values tsv
text/troff man me ms roff t tr
text/troff t tr roff man me ms
text/turtle ttl
text/uri-list uri uris urls
text/vcard vcard
@@ -865,7 +752,6 @@ text/vnd.curl curl
text/vnd.curl.dcurl dcurl
text/vnd.curl.mcurl mcurl
text/vnd.curl.scurl scurl
text/vnd.familysearch.gedcom ged
text/vnd.fly fly
text/vnd.fmi.flexstor flx
text/vnd.graphviz gv
@@ -875,10 +761,10 @@ text/vnd.sun.j2me.app-descriptor jad
text/vnd.wap.wml wml
text/vnd.wap.wmlscript wmls
text/vtt vtt
text/x-asm asm s
text/x-c c cc cpp cxx dic h hh
text/x-asm s asm
text/x-c c cc cxx cpp h hh dic
text/x-component htc
text/x-fortran f f77 f90 for
text/x-fortran f for f77 f90
text/x-handlebars-template hbs
text/x-java-source java
text/x-lua lua
@@ -901,15 +787,14 @@ video/3gpp2 3g2
video/h261 h261
video/h263 h263
video/h264 h264
video/iso.segment m4s
video/jpeg jpgv
video/jpm jpgm
video/jpm jpm jpgm
video/mj2 mj2 mjp2
video/mp2t ts
video/mp4 mp4 mp4v mpg4
video/mpeg m1v m2v mpe mpeg mpg
video/mpeg mpeg mpg mpe m1v m2v
video/ogg ogv
video/quicktime mov qt
video/quicktime qt mov
video/vnd.dece.hd uvh uvvh
video/vnd.dece.mobile uvm uvvm
video/vnd.dece.pd uvp uvvp
@@ -917,7 +802,7 @@ video/vnd.dece.sd uvs uv
video/vnd.dece.video uvv uvvv
video/vnd.dvb.file dvb
video/vnd.fvt fvt
video/vnd.mpegurl m4u mxu
video/vnd.mpegurl mxu m4u
video/vnd.ms-playready.media.pyv pyv
video/vnd.uvvu.mp4 uvu uvvu
video/vnd.vivo viv
@@ -926,7 +811,7 @@ video/x-f4v f4v
video/x-fli fli
video/x-flv flv
video/x-m4v m4v
video/x-matroska mk3d mks mkv
video/x-matroska mkv mk3d mks
video/x-mng mng
video/x-ms-asf asf asx
video/x-ms-vob vob

View File

@@ -11,8 +11,6 @@ module Jekyll
alias_method :extname, :ext
FORWARD_SLASH = "/".freeze
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w(
content
@@ -64,11 +62,11 @@ module Jekyll
#
# Returns the String destination directory.
def dir
if url.end_with?(FORWARD_SLASH)
if url.end_with?("/")
url
else
url_dir = File.dirname(url)
url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/"
url_dir.end_with?("/") ? url_dir : "#{url_dir}/"
end
end
@@ -183,20 +181,5 @@ module Jekyll
def write?
true
end
# The Page excerpt_separator, from the YAML Front-Matter or site
# default excerpt_separator value
#
# Returns the document excerpt_separator
def excerpt_separator
(data["excerpt_separator"] || site.config["excerpt_separator"]).to_s
end
# Whether to generate an excerpt
#
# Returns true if the excerpt separator is configured.
def generate_excerpt?
!excerpt_separator.empty?
end
end
end

View File

@@ -54,14 +54,16 @@ module Jekyll
def read_data_file(path)
case File.extname(path).downcase
when ".csv"
CSV.read(path,
CSV.read(path, {
:headers => true,
:encoding => site.config["encoding"]).map(&:to_hash)
:encoding => site.config["encoding"],
}).map(&:to_hash)
when ".tsv"
CSV.read(path,
CSV.read(path, {
:col_sep => "\t",
:headers => true,
:encoding => site.config["encoding"]).map(&:to_hash)
:encoding => site.config["encoding"],
}).map(&:to_hash)
else
SafeYAML.load_file(path)
end

View File

@@ -314,15 +314,15 @@ module Jekyll
#
# Returns an Array of Documents which should be written
def docs_to_write
documents.select(&:write?)
@docs_to_write ||= documents.select(&:write?)
end
# Get all the documents
#
# Returns an Array of all Documents
def documents
collections.each_with_object(Set.new) do |(_, collection), set|
set.merge(collection.docs).merge(collection.files)
collections.reduce(Set.new) do |docs, (_, collection)|
docs + collection.docs + collection.files
end.to_a
end

View File

@@ -3,10 +3,13 @@
module Jekyll
class Stevenson < ::Logger
def initialize
formatter = proc do |_, _, _, msg|
@progname = nil
@level = DEBUG
@default_formatter = Formatter.new
@logdev = $stdout
@formatter = proc do |_, _, _, msg|
msg.to_s
end
super($stdout, :formatter => formatter)
end
def add(severity, message = nil, progname = nil)

View File

@@ -112,7 +112,8 @@ MSG
end
def render_rouge(code)
formatter = Jekyll::Utils::Rouge.html_formatter(
require "rouge"
formatter = ::Rouge::Formatters::HTMLLegacy.new(
:line_numbers => @highlight_options[:linenos],
:wrap => false,
:css_class => "highlight",

View File

@@ -2,15 +2,6 @@
module Jekyll
module Tags
class IncludeTagError < StandardError
attr_accessor :path
def initialize(msg, path)
super(msg)
@path = path
end
end
class IncludeTag < Liquid::Tag
VALID_SYNTAX = %r!
([\w-]+)\s*=\s*
@@ -22,7 +13,7 @@ module Jekyll
!mx
FULL_VALID_SYNTAX = %r!\A\s*(?:#{VALID_SYNTAX}(?=\s|\z)\s*)*\z!
VALID_FILENAME_CHARS = %r!^[\w/.\-()+~\#@]+$!
VALID_FILENAME_CHARS = %r!^[\w/\.-]+$!
INVALID_SEQUENCES = %r![./]{2,}!
def initialize(tag_name, markup, tokens)
@@ -147,17 +138,12 @@ MSG
end
def add_include_to_dependency(site, path, context)
page = context.registers[:page]
return unless page
return unless page.key?("path")
absolute_path = \
if page["collection"]
site.in_source_dir(site.config["collections_dir"], page["path"])
else
site.in_source_dir(page["path"])
end
site.regenerator.add_dependency(absolute_path, path)
if context.registers[:page] && context.registers[:page].key?("path")
site.regenerator.add_dependency(
site.in_source_dir(context.registers[:page]["path"]),
path
)
end
end
def load_cached_partial(path, context)
@@ -196,7 +182,7 @@ MSG
# This method allows to modify the file content by inheriting from the class.
def read_file(file, context)
File.read(file, **file_read_opts(context))
File.read(file, file_read_opts(context))
end
private
@@ -229,7 +215,6 @@ MSG
else
File.join(site.config["collections_dir"], page_payload["path"])
end
resource_path.sub!(%r!/#excerpt\z!, "")
site.in_source_dir File.dirname(resource_path)
end
end

View File

@@ -18,14 +18,17 @@ module Jekyll
def render(context)
site = context.registers[:site]
liquid = site.liquid_renderer.file("(jekyll:link)")
relative_path = liquid.parse(@relative_path).render(context)
site.each_site_file do |item|
return item.url if item.relative_path == @relative_path
return item.url if item.relative_path == relative_path
# This takes care of the case for static files that have a leading /
return item.url if item.relative_path == "/#{@relative_path}"
return item.url if item.relative_path == "/#{relative_path}"
end
raise ArgumentError, <<-MSG
Could not find document '#{@relative_path}' in tag '#{self.class.tag_name}'.
Could not find document '#{relative_path}' in tag '#{self.class.tag_name}'.
Make sure the document exists and the path is correct.
MSG

View File

@@ -56,28 +56,12 @@ module Jekyll
end
def realpath_for(folder)
# This resolves all symlinks for the theme subfolder and then ensures
# that the directory remains inside the theme root. This prevents the
# use of symlinks for theme subfolders to 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 => e
log_realpath_exception(e, folder)
File.realpath(Jekyll.sanitized_path(root, folder.to_s))
rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP
Jekyll.logger.warn "Invalid theme folder:", 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

View File

@@ -7,7 +7,6 @@ module Jekyll
autoload :Exec, "jekyll/utils/exec"
autoload :Internet, "jekyll/utils/internet"
autoload :Platforms, "jekyll/utils/platforms"
autoload :Rouge, "jekyll/utils/rouge"
autoload :ThreadEvent, "jekyll/utils/thread_event"
autoload :WinTZ, "jekyll/utils/win_tz"

View File

@@ -70,9 +70,9 @@ module Jekyll
private
def proc_version
@proc_version ||= begin
File.read(
Pathutil.new(
"/proc/version"
).downcase
).read
rescue Errno::ENOENT
nil
end

View File

@@ -1,22 +0,0 @@
# frozen_string_literal: true
Jekyll::External.require_with_graceful_fail("rouge")
module Jekyll
module Utils
module Rouge
def self.html_formatter(*args)
if old_api?
::Rouge::Formatters::HTML.new(*args)
else
::Rouge::Formatters::HTMLLegacy.new(*args)
end
end
def self.old_api?
::Rouge.version.to_s < "2"
end
end
end
end

View File

@@ -11,35 +11,64 @@ module Jekyll
# timezone - the IANA Time Zone specified in "_config.yml"
#
# Returns a string that ultimately re-defines ENV["TZ"] in Windows
def calculate(timezone, now = Time.now)
def calculate(timezone)
External.require_with_graceful_fail("tzinfo") unless defined?(TZInfo)
tz = TZInfo::Timezone.get(timezone)
#
# Use period_for_utc and utc_total_offset instead of
# period_for and observed_utc_offset for compatibility with tzinfo v1.
offset = tz.period_for_utc(now.getutc).utc_total_offset
difference = Time.now.to_i - tz.now.to_i
#
# POSIX style definition reverses the offset sign.
# e.g. Eastern Standard Time (EST) that is 5Hrs. to the 'west' of Prime Meridian
# is denoted as:
# EST+5 (or) EST+05:00
# Reference: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
sign = offset.positive? ? "-" : "+"
rational_hours = offset.abs.to_r / 3600
hours = rational_hours.to_i
minutes = ((rational_hours - hours) * 60).to_i
# Reference: http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
sign = difference < 0 ? "-" : "+"
offset = sign == "-" ? "+" : "-" unless difference.zero?
#
# Format the hours and minutes as two-digit numbers.
time = format("%<hours>02d:%<minutes>02d", :hours => hours, :minutes => minutes)
# convert the difference (in seconds) to hours, as a rational number, and perform
# a modulo operation on it.
modulo = modulo_of(rational_hour(difference))
#
# Format the hour as a two-digit number.
# Establish the minutes based on modulo expression.
hh = format("%02d", absolute_hour(difference).ceil)
mm = modulo.zero? ? "00" : "30"
Jekyll.logger.debug "Timezone:", "#{timezone} #{sign}#{time}"
Jekyll.logger.debug "Timezone:", "#{timezone} #{offset}#{hh}:#{mm}"
#
# Note: The 3-letter-word below doesn't have a particular significance.
"WTZ#{sign}#{time}"
"WTZ#{sign}#{hh}:#{mm}"
end
private
# Private: Convert given seconds to an hour as a rational number.
#
# seconds - supplied as an integer, it is converted to a rational number.
# 3600 - no. of seconds in an hour.
#
# Returns a rational number.
def rational_hour(seconds)
seconds.to_r / 3600
end
# Private: Convert given seconds to an hour as an absolute number.
#
# seconds - supplied as an integer, it is converted to its absolute.
# 3600 - no. of seconds in an hour.
#
# Returns an integer.
def absolute_hour(seconds)
seconds.abs / 3600
end
# Private: Perform a modulo operation on a given fraction.
#
# fraction - supplied as a rational number, its numerator is divided
# by its denominator and the remainder returned.
#
# Returns an integer.
def modulo_of(fraction)
fraction.numerator % fraction.denominator
end
end
end

View File

@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Jekyll
VERSION = "3.10.0".freeze
VERSION = "3.8.1".freeze
end

View File

@@ -1,3 +1,4 @@
_site
.sass-cache
.jekyll-metadata
vendor

View File

@@ -1,25 +0,0 @@
# frozen_string_literal: true
#############################################################################
#
# Packaging tasks for jekyll-docs
#
#############################################################################
namespace :docs do
desc "Release #{docs_name} v#{version}"
task :release => :build do
unless `git branch` =~ %r!^\* master$!
puts "You must be on the master branch to release!"
exit!
end
sh "gem push pkg/#{docs_name}-#{version}.gem"
end
desc "Build #{docs_name} v#{version} into pkg/"
task :build do
mkdir_p "pkg"
sh "gem build #{docs_name}.gemspec"
sh "mv #{docs_name}-#{version}.gem pkg"
end
end

View File

@@ -13,15 +13,6 @@ pushd tmp/default-site
echo "$0: respecifying the jekyll install location"
ruby -e "contents = File.read('Gemfile'); File.write('Gemfile', contents.sub(/gem \"jekyll\".*\\n/, 'gem \"jekyll\", path: \"../../\"'))"
if [ -n "$KRAMDOWN_VERSION" ]; then
echo "$0: respecifying the kramdown version"
ruby -e "contents = File.read('Gemfile'); File.write('Gemfile', contents.sub(/gem \"kramdown-parser-gfm\".*\\n/, ''))"
echo "gem 'kramdown', '~> $KRAMDOWN_VERSION'" >> Gemfile
fi
if [ -n "$ROUGE_VERSION" ]; then
echo "$0: respecifying the rouge version"
echo "gem 'rouge', '~> $ROUGE_VERSION'" >> Gemfile
fi
echo "$0: installing default site dependencies"
BUNDLE_GEMFILE=Gemfile bundle install
echo "$0: building the default site"

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
#
# Build Jekyll's Documentation site in 'debug' mode and outputs the site's profile stats.
# Helps detecting *hard* breaking-changes (`jekyll build` aborts) and optimizations
# in the `build` process.
#
# Usage: bash script/profile-docs
SOURCE_DIR=$PWD/docs
bundle exec jekyll build -s $SOURCE_DIR -d $SOURCE_DIR/_site --profile --trace --verbose

View File

@@ -2,41 +2,16 @@
# Vendors the MIME type config from the mime-db list
# usage: script/vendor-mimes
require 'colorator'
require 'json'
require 'open-uri'
# ---- Helpers ----
config = File.expand_path "../lib/jekyll/mime.types", __dir__
{
:info => :cyan,
:success => :green,
:error => :red,
}.each do |type, color|
define_method("log_#{type}") do |msg|
puts " #{msg}".send(color)
end
end
# ----
json = begin
log_info "Reading remote data.."
URI.open("https://raw.githubusercontent.com/jshttp/mime-db/master/db.json").read
rescue StandardError => e
log_error "Error reading remote data!"
log_error e.message
log_error "Aborting."
exit 1
end
log_info "Parsing remote data.."
# Create an array of vendored mimetype => [extensions]
mimes = {}
json = open('https://raw.githubusercontent.com/jshttp/mime-db/master/db.json').read
data = JSON.parse(json)
data.reject! { |mime, meta| meta["extensions"].nil? || meta["extensions"].empty? }
log_info "Generating interim mime data-hashes.."
mimes = {}
charset_data = {}
data.each do |mime, meta|
# Normalize extensions and mime-types
mime = mime.downcase.strip
@@ -48,15 +23,8 @@ data.each do |mime, meta|
next if extensions.empty?
mimes[mime] = [] if mimes[mime].nil?
mimes[mime].concat extensions
# Extract mime-types with "charset" metadata
charset_data[mime] = meta["charset"] if meta.key?("charset")
# Assign `UTF-8` charset for mime-types under the `text` domain if not already assigned upstream
charset_data[mime] ||= "UTF-8" if mime.start_with?("text/")
end
log_info "Formatting primary hash and writing to file.."
strlen = mimes.keys.max_by(&:length).length
output = ""
output << "# Woah there. Do not edit this file directly.\n"
@@ -64,14 +32,4 @@ output << "# This file is generated automatically by script/vendor-mimes.\n\n"
mimes = mimes.sort_by { |k,v| k }
output << mimes.map { |mime,extensions| "#{mime.ljust(strlen)} #{extensions.join(" ")}" }.join("\n")
config = File.expand_path "../lib/jekyll/mime.types", __dir__
File.write(config, output)
log_info "Done! See: #{config.inspect.white}"
# --- Generate JSON file from charset_data ----
puts
log_info "Dumping mimetype-charset mapping as JSON.."
json_file = File.expand_path "../lib/jekyll/commands/serve/mime_types_charset.json", __dir__
File.write(json_file, JSON.pretty_generate(charset_data) + "\n")
log_success "and done! See: #{json_file.inspect.white}"

View File

@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Skinny</title>
</head>
<body>
<h1>Hello World</h1>
{{ content }}
</body>
</html>

View File

@@ -1,5 +0,0 @@
---
layout: default
---
Message: {{ content }}

View File

@@ -1,11 +0,0 @@
# 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

View File

@@ -1,11 +0,0 @@
# frozen_string_literal: true
Gem::Specification.new do |s|
s.name = "test-theme-symlink"
s.version = "0.1.0"
s.licenses = ["MIT"]
s.summary = "This is a theme with a symlink used to test Jekyll"
s.authors = ["Jekyll"]
s.files = ["lib/example.rb"]
s.homepage = "https://github.com/jekyll/jekyll"
end

View File

@@ -36,7 +36,6 @@ Jekyll.logger = Logger.new(StringIO.new, :error)
unless jruby?
require "rdiscount"
require "redcarpet"
end
require "kramdown"
@@ -195,15 +194,6 @@ class JekyllUnitTest < Minitest::Test
skip msg.to_s.magenta
end
end
def symlink_if_allowed(target, sym_file)
FileUtils.ln_sf(target, sym_file)
rescue Errno::EACCES
skip "Permission denied for creating a symlink to #{target.inspect} " \
"on this machine".magenta
rescue NotImplementedError => error
skip error.to_s.magenta
end
end
class FakeLogger
@@ -211,6 +201,7 @@ class FakeLogger
end
module TestWEBrick
module_function
def mount_server(&block)
@@ -239,7 +230,6 @@ module TestWEBrick
:ServerType => Thread,
:Logger => WEBrick::Log.new(logger),
:AccessLog => [[logger, ""]],
:MimeTypesCharset => Jekyll::Commands::Serve.send(:mime_types_charset),
:JekyllOptions => {},
}
end

View File

@@ -1,7 +0,0 @@
<span id='include-param'>{{include.param}}</span>
<ul id='param-list'>
{% for param in include %}
<li>{{param[0]}} = {{param[1]}}</li>
{% endfor %}
</ul>

View File

@@ -1,14 +0,0 @@
# frozen_string_literal: true
# For testing excerpt handling of custom tags
module Jekyll
class DoNothingBlock < Liquid::Block
end
class DoNothingOther < Liquid::Tag
end
end
Liquid::Template.register_tag("do_nothing", Jekyll::DoNothingBlock)
Liquid::Template.register_tag("do_nothing_other", Jekyll::DoNothingOther)

View File

@@ -2,23 +2,10 @@
layout: post
---
{%
highlight
ruby
%}
{% assign foo = 'foobar' %}
{% raw
%}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{%
endraw
%}
{%
endhighlight
%}
{% if
page.layout == "post" %}
Youll find this post in your `_posts` directory.
To add new posts, simply add a file in the `_posts` directory.
{% endif %}
So let's talk business.

View File

@@ -2,20 +2,10 @@
layout: post
---
{%
highlight
ruby
%}
{% assign foo = 'foobar' %}
{% raw
%}
def print_hi(name)
puts "Hi, #{name}"
end
{% if page.layout == "post" %}
Youll find this post in your `_posts` directory.
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endraw %}
{% endhighlight %}
{% else %}
So let's talk business.
To add new posts, simply add a file in the `_posts` directory.
{% endif %}

View File

@@ -1,9 +0,0 @@
---
title: LIQUID_TAG_REGEX excerpt whitespace control test
layout: post
---
{%- for post in site.posts -%}
You are in a maze of twisty little passages, all alike.
There's lots more to say about this, but that's enough for now.
{%- endfor -%}

View File

@@ -1,7 +0,0 @@
---
title: LIQUID_TAG_REGEX excerpt whitespace control test
layout: post
---
{%- assign xyzzy = 'You are in a maze of twisty little passages, all alike.' %}
{{- xyzzy -}}

View File

@@ -1,10 +0,0 @@
---
title: LIQUID_TAG_REGEX excerpt whitespace control test
layout: post
---
{%- for post in site.posts -%}
You are in a maze of twisty little passages, all alike.
There's lots more to say about this, but that's enough for now.
{%- endfor -%}

View File

@@ -1,29 +0,0 @@
---
title: liquid_block excerpt test with open tags in excerpt
layout: post
---
{% assign company = "Yoyodyne" %}
{% do_nothing_other %}
{% do_nothing %}
{% unless false %}
{% for i in (1..10) %}
{% if true %}
{% raw %}
EVIL! PURE AND SIMPLE FROM THE EIGHTH DIMENSION!
{% endraw %}
{% elsif false %}
No matter where you go, there you are.
{% break %}
{% else %}
{% case company %}
{% when "Yoyodyne" %}
Buckaroo Banzai
{% else %}
{% continue %}
{% endcase %}
{% endif %}
{% endfor %}
{% endunless %}
{% enddo_nothing %}

View File

@@ -1,7 +0,0 @@
---
title: I am a page with an excerpt
---
I am the excerpt
I am the remainder of the page

View File

@@ -1 +0,0 @@
/etc/passwd

View File

@@ -5,6 +5,7 @@ require "mercenary"
require "helper"
require "httpclient"
require "openssl"
require "thread"
require "tmpdir"
class TestCommandsServe < JekyllUnitTest
@@ -43,8 +44,6 @@ class TestCommandsServe < JekyllUnitTest
context "using LiveReload" do
setup do
skip_if_windows "EventMachine support on Windows is limited"
@temp_dir = Dir.mktmpdir("jekyll_livereload_test")
@destination = File.join(@temp_dir, "_site")
Dir.mkdir(@destination) || flunk("Could not make directory #{@destination}")
@@ -95,6 +94,7 @@ class TestCommandsServe < JekyllUnitTest
end
should "serve livereload.js over HTTP on the default LiveReload port" do
skip_if_windows "EventMachine support on Windows is limited"
opts = serve(@standard_options)
content = @client.get_content(
"http://#{opts["host"]}:#{opts["livereload_port"]}/livereload.js"
@@ -103,6 +103,7 @@ class TestCommandsServe < JekyllUnitTest
end
should "serve nothing else over HTTP on the default LiveReload port" do
skip_if_windows "EventMachine support on Windows is limited"
opts = serve(@standard_options)
res = @client.get("http://#{opts["host"]}:#{opts["livereload_port"]}/")
assert_equal(400, res.status_code)
@@ -110,6 +111,7 @@ class TestCommandsServe < JekyllUnitTest
end
should "insert the LiveReload script tags" do
skip_if_windows "EventMachine support on Windows is limited"
opts = serve(@standard_options)
content = @client.get_content(
"http://#{opts["host"]}:#{opts["port"]}/#{opts["baseurl"]}/hello.html"
@@ -122,6 +124,7 @@ class TestCommandsServe < JekyllUnitTest
end
should "apply the max and min delay options" do
skip_if_windows "EventMachine support on Windows is limited"
opts = serve(@standard_options.merge(
"livereload_max_delay" => "1066",
"livereload_min_delay" => "3"
@@ -152,7 +155,9 @@ class TestCommandsServe < JekyllUnitTest
end
should "label itself" do
assert_equal :serve, @merc.name
assert_equal(
@merc.name, :serve
)
end
should "have aliases" do
@@ -186,21 +191,21 @@ class TestCommandsServe < JekyllUnitTest
end
should "use user destinations" do
assert_equal "foo", custom_opts("destination" => "foo")[
assert_equal "foo", custom_opts({ "destination" => "foo" })[
:DocumentRoot
]
end
should "use user port" do
# WHAT?!?!1 Over 9000? That's impossible.
assert_equal 9001, custom_opts("port" => 9001)[
assert_equal 9001, custom_opts({ "port" => 9001 })[
:Port
]
end
should "use empty directory index list when show_dir_listing is true" do
opts = { "show_dir_listing" => true }
assert_empty custom_opts(opts)[:DirectoryIndex]
assert custom_opts(opts)[:DirectoryIndex].empty?
end
should "keep config between build and serve" do
@@ -232,21 +237,21 @@ class TestCommandsServe < JekyllUnitTest
expect(Jekyll::Commands::Serve).to receive(:start_up_webrick)
end
should "set the site url by default to `http://localhost:4000`" do
@merc.execute(:serve, "watch" => false, "url" => "https://jekyllrb.com/")
@merc.execute(:serve, { "watch" => false, "url" => "https://jekyllrb.com/" })
assert_equal 1, Jekyll.sites.count
assert_equal "http://localhost:4000", Jekyll.sites.first.config["url"]
end
should "take `host`, `port` and `ssl` into consideration if set" do
@merc.execute(:serve,
@merc.execute(:serve, {
"watch" => false,
"host" => "example.com",
"port" => "9999",
"url" => "https://jekyllrb.com/",
"ssl_cert" => "foo",
"ssl_key" => "bar"
)
"ssl_key" => "bar",
})
assert_equal 1, Jekyll.sites.count
assert_equal "https://example.com:9999", Jekyll.sites.first.config["url"]
@@ -257,7 +262,7 @@ class TestCommandsServe < JekyllUnitTest
should "not update the site url" do
expect(Jekyll).to receive(:env).and_return("production")
expect(Jekyll::Commands::Serve).to receive(:start_up_webrick)
@merc.execute(:serve, "watch" => false, "url" => "https://jekyllrb.com/")
@merc.execute(:serve, { "watch" => false, "url" => "https://jekyllrb.com/" })
assert_equal 1, Jekyll.sites.count
assert_equal "https://jekyllrb.com/", Jekyll.sites.first.config["url"]
@@ -266,26 +271,26 @@ class TestCommandsServe < JekyllUnitTest
context "verbose" do
should "debug when verbose" do
assert_equal 5, custom_opts("verbose" => true)[:Logger].level
assert_equal custom_opts({ "verbose" => true })[:Logger].level, 5
end
should "warn when not verbose" do
assert_equal 3, custom_opts({})[:Logger].level
assert_equal custom_opts({})[:Logger].level, 3
end
end
context "enabling SSL" do
should "raise if enabling without key or cert" do
assert_raises RuntimeError do
custom_opts(
"ssl_key" => "foo"
)
custom_opts({
"ssl_key" => "foo",
})
end
assert_raises RuntimeError do
custom_opts(
"ssl_key" => "foo"
)
custom_opts({
"ssl_key" => "foo",
})
end
end
@@ -294,16 +299,16 @@ class TestCommandsServe < JekyllUnitTest
expect(OpenSSL::X509::Certificate).to receive(:new).and_return("c1")
allow(File).to receive(:read).and_return("foo")
result = custom_opts(
result = custom_opts({
"ssl_cert" => "foo",
"source" => "bar",
"enable_ssl" => true,
"ssl_key" => "bar"
)
"ssl_key" => "bar",
})
assert result[:SSLEnable]
assert_equal "c2", result[:SSLPrivateKey]
assert_equal "c1", result[:SSLCertificate]
assert_equal result[:SSLPrivateKey], "c2"
assert_equal result[:SSLCertificate], "c1"
end
end
end
@@ -312,7 +317,7 @@ class TestCommandsServe < JekyllUnitTest
allow(Jekyll::Commands::Serve).to receive(:start_up_webrick)
expect(Jekyll).to receive(:configuration).once.and_call_original
@merc.execute(:serve, "watch" => false)
@merc.execute(:serve, { "watch" => false })
end
end
end

View File

@@ -5,7 +5,7 @@ require "helper"
class TestEntryFilter < JekyllUnitTest
context "Filtering entries" do
setup do
@site = fixture_site
@site = Site.new(site_configuration)
end
should "filter entries" do
@@ -87,7 +87,7 @@ class TestEntryFilter < JekyllUnitTest
# no support for symlinks on Windows
skip_if_windows "Jekyll does not currently support symlinks on Windows."
site = fixture_site("safe" => true)
site = Site.new(site_configuration("safe" => true))
site.reader.read_directories("symlink-test")
assert_equal %w(main.scss symlinked-file).length, site.pages.length
@@ -99,22 +99,11 @@ class TestEntryFilter < JekyllUnitTest
# no support for symlinks on Windows
skip_if_windows "Jekyll does not currently support symlinks on Windows."
@site.reader.read_directories("symlink-test")
refute_equal [], @site.pages
refute_equal [], @site.static_files
end
site = Site.new(site_configuration)
should "include only safe symlinks in safe mode even when included" do
# no support for symlinks on Windows
skip_if_windows "Jekyll does not currently support symlinks on Windows."
site = fixture_site("safe" => true, "include" => ["symlinked-file-outside-source"])
site.reader.read_directories("symlink-test")
# rubocop:disable Performance/FixedSize
assert_equal %w(main.scss symlinked-file).length, site.pages.length
refute_includes site.static_files.map(&:name), "symlinked-file-outside-source"
# rubocop:enable Performance/FixedSize
refute_equal [], site.pages
refute_equal [], site.static_files
end
end

View File

@@ -10,10 +10,6 @@ class TestExcerpt < JekyllUnitTest
}).tap(&:read)
end
def setup_page
Page.new(@site, @site.in_source_dir, "", "page_with_excerpt.md")
end
def do_render(document)
@site.layouts = {
"default" => Layout.new(@site, source_dir("_layouts"), "simple.html"),
@@ -189,17 +185,12 @@ class TestExcerpt < JekyllUnitTest
@post = setup_post("2018-01-28-open-liquid-block-excerpt.markdown")
@excerpt = @post.data["excerpt"]
head = @post.content.split("\n\n")[0]
assert_includes @post.content, "{%\n highlight\n"
assert_includes @post.content, "{% raw"
refute_includes head, "{% endraw %}"
refute_includes head, "{% endhighlight %}"
assert_includes @post.content, "{% if"
refute_includes @post.content.split("\n\n")[0], "{% endif %}"
end
should "be appended to as necessary and generated" do
assert_includes @excerpt.content, "{% endraw %}"
assert_includes @excerpt.content, "{% endhighlight %}"
assert_includes @excerpt.content, "{% endif %}"
assert_equal true, @excerpt.is_a?(Jekyll::Excerpt)
end
end
@@ -211,111 +202,14 @@ class TestExcerpt < JekyllUnitTest
@post = setup_post("2018-01-28-closed-liquid-block-excerpt.markdown")
@excerpt = @post.data["excerpt"]
head = @post.content.split("\n\n")[0]
assert_includes @post.content, "{%\n highlight\n"
assert_includes @post.content, "{% raw"
assert_includes head, "{%\n endraw\n%}"
assert_includes head, "{%\n endhighlight\n%}"
assert_includes @post.content, "{% if"
assert_includes @post.content.split("\n\n")[0], "{% endif %}"
end
should "not be appended to but generated as is" do
assert_includes @excerpt.content, "{%\n endraw\n%}"
assert_includes @excerpt.content, "{%\n endhighlight\n%}"
refute_includes @excerpt.content, "{%\n endraw\n%}\n\n{% endraw %}"
refute_includes @excerpt.content, "{%\n endhighlight\n%}\n\n{% endhighlight %}"
assert_equal true, @excerpt.is_a?(Jekyll::Excerpt)
end
end
context "An excerpt with non-closed but valid Liquid block tag with whitespace control" do
setup do
clear_dest
@site = fixture_site
@post = setup_post("2018-05-15-open-liquid-block-excerpt-whitespace-control.md")
@excerpt = @post.data["excerpt"]
assert_includes @post.content, "{%- for"
refute_includes @post.content.split("\n\n")[0], "{%- endfor -%}"
end
should "be appended to as necessary and generated" do
assert_includes @excerpt.content, "{% endfor %}"
refute_includes @excerpt.content, "{% endfor %}\n\n{% endfor %}"
assert_equal true, @excerpt.is_a?(Jekyll::Excerpt)
end
end
context "An excerpt with valid closed Liquid block tag with whitespace control" do
setup do
clear_dest
@site = fixture_site
@post = setup_post("2018-05-15-closed-liquid-block-excerpt-whitespace-control.md")
@excerpt = @post.data["excerpt"]
assert_includes @post.content, "{%- for"
assert_includes @post.content.split("\n\n")[0], "{%- endfor -%}"
end
should "not be appended to but generated as is" do
assert_includes @excerpt.content, "{%- endfor -%}"
refute_includes @excerpt.content, "{% endfor %}\n\n{% endfor %}"
assert_equal true, @excerpt.is_a?(Jekyll::Excerpt)
end
end
context "An excerpt with valid Liquid variable with whitespace control" do
setup do
clear_dest
@site = fixture_site
@post = setup_post("2018-05-15-excerpt-whitespace-control-variable.md")
@excerpt = @post.data["excerpt"]
assert_includes @post.content, "{%- assign"
end
should "not be appended to but generated as is" do
assert_includes @excerpt.content, "{{- xyzzy -}}"
assert_equal true, @excerpt.is_a?(Jekyll::Excerpt)
end
end
context "An excerpt with Liquid tags" do
setup do
clear_dest
@site = fixture_site
@post = setup_post("2018-11-15-excerpt-liquid-block.md")
@excerpt = @post.data["excerpt"]
assert_includes @post.content.split("\n\n")[0].strip, "{% continue %}"
assert_equal true, Jekyll::DoNothingBlock.ancestors.include?(Liquid::Block)
assert_equal false, Jekyll::DoNothingOther.ancestors.include?(Liquid::Block)
assert_match "Jekyll::DoNothingBlock", Liquid::Template.tags["do_nothing"].name
assert_match "Jekyll::DoNothingOther", Liquid::Template.tags["do_nothing_other"].name
end
should "close open block tags, including custom tags, and ignore others" do
assert_includes @excerpt.content, "{% endcase %}"
assert_includes @excerpt.content, "{% endif %}"
assert_includes @excerpt.content, "{% endfor %}"
assert_includes @excerpt.content, "{% endunless %}"
assert_includes @excerpt.content, "{% enddo_nothing %}"
refute_includes @excerpt.content, "{% enddo_nothing_other %}"
refute_includes @excerpt.content, "{% endif %}\n\n{% endif %}"
assert_equal true, @excerpt.is_a?(Jekyll::Excerpt)
end
end
context "On a page" do
setup do
clear_dest
@site = fixture_site
@page = setup_page
@excerpt = Jekyll::Excerpt.new(@page)
end
should "produce a proper excerpt" do
assert_equal @excerpt.content, "I am the excerpt\n\n"
end
end
end

View File

@@ -809,7 +809,7 @@ class TestFilters < JekyllUnitTest
"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? ? 14 : 15
assert_equal qty, g["items"].size
end
end
@@ -1007,7 +1007,7 @@ class TestFilters < JekyllUnitTest
"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? ? 14 : 15
assert_equal qty, g["items"].size
end
end

View File

@@ -11,12 +11,12 @@ class TestGeneratedSite < JekyllUnitTest
@site.process
@index = File.read(
dest_dir("index.html"),
**Utils.merged_file_read_opts(@site, {})
Utils.merged_file_read_opts(@site, {})
)
end
should "ensure post count is as expected" do
assert_equal 58, @site.posts.size
assert_equal 54, @site.posts.size
end
should "insert site.posts into the index" do

View File

@@ -3,17 +3,10 @@
require "helper"
class TestKramdown < JekyllUnitTest
def fixture_converter(config)
site_config = Utils.deep_merge_hashes({ "markdown" => "kramdown" }, config)
site = fixture_site(site_config)
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
converter.setup
converter
end
context "kramdown" do
setup do
@config = {
"markdown" => "kramdown",
"kramdown" => {
"smart_quotes" => "lsquo,rsquo,ldquo,rdquo",
"entity_output" => "as_char",
@@ -27,7 +20,7 @@ class TestKramdown < JekyllUnitTest
"bold_every" => 8,
"css" => :class,
"css_class" => "highlight",
"formatter" => Jekyll::Utils::Rouge.html_formatter.class,
"formatter" => ::Rouge::Formatters::HTMLLegacy,
},
},
}
@@ -36,11 +29,12 @@ class TestKramdown < JekyllUnitTest
@config["kramdown"]["syntax_highlighter_opts"].keys
@config = Jekyll.configuration(@config)
@converter = fixture_converter(@config)
@markdown = Converters::Markdown.new(@config)
@markdown.setup
end
should "fill symbolized keys into config for compatibility with kramdown" do
kramdown_config = @converter.instance_variable_get(:@parser)
kramdown_config = @markdown.instance_variable_get(:@parser)
.instance_variable_get(:@config)
@kramdown_config_keys.each do |key|
@@ -60,70 +54,20 @@ class TestKramdown < JekyllUnitTest
end
should "run Kramdown" do
assert_equal "<h1>Some Header</h1>", @converter.convert("# Some Header #").strip
assert_equal "<h1>Some Header</h1>", @markdown.convert("# Some Header #").strip
end
should "should log kramdown warnings" do
allow_any_instance_of(Kramdown::Document).to receive(:warnings).and_return(["foo"])
expect(Jekyll.logger).to receive(:warn).with("Kramdown warning:", "foo")
@converter.convert("Something")
end
should "render fenced code blocks with syntax highlighting" do
result = nokogiri_fragment(@converter.convert(<<~MARKDOWN))
~~~ruby
puts "Hello World"
~~~
MARKDOWN
div_highlight = Rouge.version.to_i == 1 ? "" : ">div.highlight"
selector = "div.highlighter-rouge#{div_highlight}>pre.highlight>code"
refute(result.css(selector).empty?, result.to_html)
end
context "when configured" do
setup do
@source = <<~TEXT
## Code Sample
def ruby_fu
"Hello"
end
TEXT
end
should "have 'plaintext' as the default syntax_highlighter language" do
converter = fixture_converter(@config)
parser = converter.instance_variable_get(:@parser)
parser_config = parser.instance_variable_get(:@config)
assert_equal "plaintext", parser_config.dig("syntax_highlighter_opts", "default_lang")
end
should "accept the specified default syntax_highlighter language" do
override = {
"kramdown" => {
"syntax_highlighter_opts" => {
"default_lang" => "yaml",
},
},
}
converter = fixture_converter(Utils.deep_merge_hashes(@config, override))
parser = converter.instance_variable_get(:@parser)
parser_config = parser.instance_variable_get(:@config)
assert_equal "yaml", parser_config.dig("syntax_highlighter_opts", "default_lang")
refute_match %r!<div class="language-plaintext!, converter.convert(@source)
refute_match %r!<div class="language-html!, converter.convert(@source)
assert_match %r!<div class="language-yaml!, converter.convert(@source)
end
@markdown.convert("Something")
end
context "when asked to convert smart quotes" do
should "convert" do
converter = fixture_converter(@config)
assert_match(
%r!<p>(&#8220;|“)Pit(&#8217;|)hy(&#8221;|”)<\/p>!,
converter.convert(%("Pit'hy")).strip
@markdown.convert(%("Pit'hy")).strip
)
end
@@ -134,23 +78,36 @@ class TestKramdown < JekyllUnitTest
"smart_quotes" => "lsaquo,rsaquo,laquo,raquo",
},
}
converter = fixture_converter(Utils.deep_merge_hashes(@config, override))
markdown = Converters::Markdown.new(Utils.deep_merge_hashes(@config, override))
assert_match %r!<p>(&#171;|«)Pit(&#8250;|)hy(&#187;|»)<\/p>!, \
converter.convert(%("Pit'hy")).strip
markdown.convert(%("Pit'hy")).strip
end
end
should "render fenced code blocks with syntax highlighting" do
result = nokogiri_fragment(@markdown.convert(Utils.strip_heredoc(<<-MARKDOWN)))
~~~ruby
puts "Hello World"
~~~
MARKDOWN
div_highlight = ">div.highlight"
selector = "div.highlighter-rouge#{div_highlight}>pre.highlight>code"
refute result.css(selector).empty?
end
context "when a custom highlighter is chosen" do
should "use the chosen highlighter if it's available" do
override = {
"highlighter" => nil,
"markdown" => "kramdown",
"kramdown" => {
"syntax_highlighter" => "coderay",
"syntax_highlighter" => :coderay,
},
}
converter = fixture_converter(Utils.deep_merge_hashes(@config, override))
result = nokogiri_fragment(converter.convert(<<~MARKDOWN))
markdown = Converters::Markdown.new(Utils.deep_merge_hashes(@config, override))
result = nokogiri_fragment(markdown.convert(Utils.strip_heredoc(<<-MARKDOWN)))
~~~ruby
puts "Hello World"
~~~
@@ -162,6 +119,7 @@ class TestKramdown < JekyllUnitTest
should "support legacy enable_coderay... for now" do
override = {
"markdown" => "kramdown",
"kramdown" => {
"enable_coderay" => true,
},
@@ -169,9 +127,8 @@ class TestKramdown < JekyllUnitTest
@config.delete("highlighter")
@config["kramdown"].delete("syntax_highlighter")
converter = fixture_converter(Utils.deep_merge_hashes(@config, override))
result = nokogiri_fragment(converter.convert(<<~MARKDOWN))
markdown = Converters::Markdown.new(Utils.deep_merge_hashes(@config, override))
result = nokogiri_fragment(markdown.convert(Utils.strip_heredoc(<<-MARKDOWN)))
~~~ruby
puts "Hello World"
~~~
@@ -183,26 +140,24 @@ class TestKramdown < JekyllUnitTest
end
should "move coderay to syntax_highlighter_opts" do
override = {
original = Kramdown::Document.method(:new)
markdown = Converters::Markdown.new(Utils.deep_merge_hashes(@config, {
"higlighter" => nil,
"markdown" => "kramdown",
"kramdown" => {
"syntax_highlighter" => "coderay",
"coderay" => {
"hello" => "world",
},
},
}
original = Kramdown::Document.method(:new)
converter = fixture_converter(
Utils.deep_merge_hashes(@config, override)
)
}))
expect(Kramdown::Document).to receive(:new) do |arg1, hash|
assert_equal hash["syntax_highlighter_opts"]["hello"], "world"
original.call(arg1, hash)
end
converter.convert("hello world")
markdown.convert("hello world")
end
end
end

Some files were not shown because too many files have changed in this diff Show More