Compare commits

..

2 Commits

Author SHA1 Message Date
Parker Moore
4588517192 Add 'signin' to allowed words for spell check 2021-09-27 08:52:30 -07:00
Parker Moore
d921bcff9e releasing-a-new-version: include some details for the *-stable branches
The `*-stable` branches are maintained slightly differently than the `master` branch. This attempts to explain some of the differences.
2021-09-27 08:48:33 -07:00
105 changed files with 703 additions and 1814 deletions

71
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,71 @@
---
name: Bug Report
about: Is something not working as expected?
title: ''
labels: ''
assignees: ''
---
<!--
Hi! Thanks for considering to file a bug with Jekyll. Please take the time to
answer the basic questions. Please try to be as detailed as possible.
If you are unsure this is a bug in Jekyll, or this is a bug caused
by a plugin that isn't directly related to Jekyll, or if this is just
a generic usage question, please consider asking your question at
https://talk.jekyllrb.com where non-bug questions go.
Thanks!
-->
<!--
Make sure that you've done all of these. If you're sure that the bug you're
reporting is only apparent in a previous version of Jekyll, please say so explicitly
in your description.
- I updated to the latest Jekyll (or) if on GitHub Pages to the latest `github-pages`
- I ran `jekyll doctor` to check my configuration
- I read the contributing document at https://jekyllrb.com/docs/contributing/
-->
## My Environment
<!--
Replace the values in the Version(s) column with the ones in your build. If you're not
using `github-pages`, just replace it with "No".
-->
| Software | Version(s) |
| ---------------- | ---------- |
| Operating System | |
| `jekyll` | Latest |
| `github-pages` | Latest |
---
## Expected Behaviour
<!--
What is it you expected to happen? This should be a description of how the
functionality you tried to use is supposed to work.
-->
## Current Behavior
<!--
Describe the details of the bug. Be sure to include any steps you took for the
problem to exist, such as the directories you created and the full command
you ran. Include any plugins you have installed (this is very important!).
You can include any logs you think relevant here. If you're using GitHub pages
and you're not sure where your logs are, please email support@github.com and
they will happily help you.
-->
## Code Sample
<!--
Please provide a code repository, gist, code snippet or sample files to
reproduce the issue.
-->

View File

@@ -1,104 +0,0 @@
name: Bug Report
description: "Is something not working as expected?"
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Hi! Thank you for taking the time to report a bug with Jekyll.
Please consider asking your question at https://talk.jekyllrb.com if one or more of the following is applicable to your situation:
- You are not sure if the issue is a bug in Jekyll.
- The issue is caused by a third-party plugin.
- This is just a generic usage question.
Additionally, please note that this platform is meant for bugs in Jekyll core only.
Issues regarding dependencies and plugins should be reported in their respective repositories.
- type: input
id: os
attributes:
label: Operating System
description: The operating system of your computer.
placeholder: "Ubuntu 21.10"
validations:
required: true
- type: input
id: ruby-version
attributes:
label: Ruby Version
description: |
The Ruby version you were using at the time.
Run `ruby -v` in your terminal and paste the output in the input field.
placeholder: "ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x64-mingw32]"
validations:
required: true
- type: input
id: jekyll-version
attributes:
label: Jekyll Version
description: |
The version of Jekyll used in your project.
Run `bundle exec jekyll -v` and paste the output in the input field.
*If you are not using a Gemfile, run `jekyll -v` instead.*
placeholder: "jekyll 4.2.1"
validations:
required: true
- type: input
id: ghp-version
attributes:
label: GitHub Pages Version
description: |
Are you deploying your site using GitHub Pages?
If yes, then we need to know the `github-pages` version used by your project. Proceed ahead otherwise.
If you're using the `github-pages` gem in your Gemfile, paste the output from running the following:
```
bundle exec github-pages -v
```
Otherwise, enter `Latest` in the input field and proceed ahead.
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: Briefly describe what you expected to see or get with a certain functionality.
placeholder: |
I expected my site to be built successfully when I run the following:
```
bundle exec jekyll build
```
validations:
required: true
- type: textarea
id: actual
attributes:
label: Current Behavior
description: >
Describe the details of the bug.
Be sure to include any steps you took for the problem to exist, such as the directories
you created and the full command you ran.
Include any plugins you have configured for use in the site.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output from your terminal.
*Note: This will be automatically formatted into code, so no need for backticks.*
render: shell
- type: textarea
id: sample
attributes:
label: Code Sample
description: >
The easiest way for someone to understand an issue is if they could reproduce your issue
in their environment. Therefore, please provide a link to your project repository alongwith
instructions to reproduce your issue. If your project is not publicly accessible, please
consider setting up a minimal test repository complete with necessary instructions.
placeholder: |
### Steps to reproduce issue
- Clone [my repo](https://github.com/owner/repo)
- Install site dependencies
- Run `bundle exec jekyll build -s src -d src/dist`

View File

@@ -1,4 +1,4 @@
blank_issues_enabled: true
blank_issues_enabled: false
contact_links:
- name: Jekyll Community Forum
url: https://talk.jekyllrb.com/

View File

@@ -1,9 +1,9 @@
---
name: Documentation
about: Found a typo or something that isn't crystal clear in our docs?
title: '[Docs]: '
title: 'docs: '
labels: documentation
assignees: ''
assignees: DirtyF
---

View File

@@ -1,32 +0,0 @@
# Security Policy
## Supported Versions
Security updates are applied to the latest MINOR version of Jekyll, and the version used by GitHub Pages, v3.9.x.
| Version | Supported |
| ------- | ------------------ |
| 4.2.x | :white_check_mark: |
| 3.9.x | :white_check_mark: |
| < 3.9.x | :x: |
## Reporting a Vulnerability
Please report vulnerabilities by sending an email to security@jekyllrb.com with the following information:
1. A description of the vulnerability
2. Reproduction steps and/or a sample site (share a private repo to the [Jekyll Security Team](docs/pages/team.md))
3. Your contact information
The Jekyll security team will respond to your submission and notify you whether it has been confirmed by the team.
Your confidentiality is kindly requested as we work on a fix. We will provide our patch to you to test and verify that the vulnerability has
been closed.
If you have created a patch and would like to submit that to us as well, we will happily consider it though we cannot guarantee that we will
use it. If we use your patch, we will attribute authorship to you either as the commit author, or as a co-author.
Once a fix is verified, we will release PATCH versions of the supported MINOR versions and assign a CVE to the vulnerability. You will receive
credit in our release post.
Once the patched version has been released, we will no longer request you to maintain confidentiality and you may choose to share details on
how you found the vulnerability with the community.

View File

@@ -11,5 +11,5 @@ File | Purpose | Format | Info
[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
[advice.txt](advice.txt) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
Note: you can replace any of these files with a directory by the same name (minus the `.txt` extension) and
then include multiple files (with a `.txt` extension) inside that directory to merge multiple files together.
Note: you can replace any of these files with a directory by the same name (minus the suffix)
and then include multiple files inside that directory (with that suffix) to merge multiple files together.

View File

@@ -1,5 +1,4 @@
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If you see a bunch of garbage</summary>
If it relates to a ...

View File

@@ -1,13 +1,10 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)package(?:-lock|)\.json$
(?:^|/)vendor/
/fonts/
ignore$
\.avi$
\.eot$
\.ico$
@@ -23,7 +20,6 @@ ignore$
\.wav$
\.woff$
\.woff2$
^docs/pages/redirects/github\.html$
^lib/jekyll/mime\.types$
^lib/theme_template/example/index\.html$

View File

@@ -84,7 +84,6 @@ chown
Chrononaut
chruby
cibuild
cimg
circleci
CJK
classname
@@ -116,7 +115,6 @@ cruft
css
csv
Currin
CVE
CWD
cygwin
daringfireball
@@ -159,7 +157,6 @@ Emacs
emails
emoji
endcapture
endcomment
endfor
endhighlight
endif
@@ -167,7 +164,7 @@ endraw
endrender
endtablerow
Enumerables
EOL
eol
erb
errordocument
Espinaco
@@ -392,7 +389,6 @@ mkdown
mmistakes
modernizr
mojombo
moncefbelyamani
moz
mreid
msdn
@@ -479,7 +475,6 @@ Posterous
postfiles
postlayout
postmodern
preinstalled
prepends
Prioritise
Probot
@@ -567,6 +562,7 @@ shopify
shortlog
shoulda
sieversii
signin
sigpipe
simplecov
Singhaniya
@@ -756,5 +752,3 @@ Zsh
zshrc
zypper
zzot
frontend
prefetching

View File

@@ -9,48 +9,34 @@ https?://(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|playlist\?list=|
<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"]
\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]*
youtube_id:\s*[-a-zA-Z0-9?&=_]*
# Google Analytics
\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
# Google APIs
\bgoogleapis\.com/[a-z]+/v\d+/[a-z]+/[@./?=\w]+
\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|)
# Google Calendar
\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+
\w+\@group\.calendar\.google\.com\b
# Google DataStudio
\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|)
# The leading `/` here is as opposed to the `\b` above
# ... a short way to match `https://` or `http://` since most urls have one of those prefixes
# Google Docs
/docs\.google\.com/[a-z]+/d/(?:e/|)[0-9a-zA-Z_-]+/?
# Google Groups
https://groups\.google\.com/d/topic/[^/]+/[a-zA-Z0-9]+/discussion
https://groups\.google\.com/d/msg/[^/]+/[a-zA-Z0-9]+/[a-zA-Z0-9]+
# Google themes
themes\.googleusercontent\.com/static/fonts/[^/]+/v\d+/[^.]+.
# Google CDN
\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]*
# Goo.gl
/goo\.gl/[a-zA-Z0-9]+
# Google Chrome Store
\bchrome\.google\.com/webstore/detail/\w*(?:/\w*|)
# google_site_verification:
google_site_verification: [-a-zA-Z=;:/0-9+]*
# Ruby-doc.org
https://ruby-doc\.org/.*
# Contributors
alphabetical order.*:.*
twitter_handle: .*

View File

@@ -1,30 +0,0 @@
name: Micro Benchmark Runs
on:
workflow_dispatch:
inputs:
path:
description: "Path to benchmark script relative to 'benchmark' directory."
required: true
default: "capture-assign.rb"
ruby_version:
description: "Ruby version to use (via `ruby/setup-ruby@v1`) action."
required: false
default: "2.7"
jobs:
benchmark:
name: "Benchmark (${{ github.event.inputs.path }}) (Ruby ${{ github.event.inputs.ruby_version }})"
runs-on: "ubuntu-latest"
env:
BENCHMARK: true
steps:
- name: Checkout Jekyll
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ github.event.inputs.ruby_version }}
bundler-cache: true
- name: Run Benchmark
run: "bundle exec ruby benchmark/${{ github.event.inputs.path }}"

View File

@@ -3,71 +3,60 @@ name: Continuous Integration
on:
push:
branches:
- master
- "*-stable"
- master
- /.*-stable/
pull_request:
branches:
- master
- "*-stable"
- master
- /.*-stable/
jobs:
ci:
name: "Run Tests (${{ matrix.label }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
include:
- 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: JRuby 9.3.4.0
ruby_version: "jruby-9.3.4.0"
- label: Liquid 4
ruby_version: 3.1
liquid_version: "~> 4.0"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: "Set up ${{ matrix.label }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
env:
LIQUID_VERSION: ${{ matrix.liquid_version }}
- name: Run Minitest based tests
run: bash script/test
- name: Run Cucumber based tests
run: bash script/cucumber
- name: Generate and Build a new site
run: bash script/default-site
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: 'Ruby ${{ matrix.ruby_version }}'
runs-on: 'ubuntu-latest'
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.7"
- job_name: "Style Check"
step_name: "Run RuboCop"
script_file: "fmt"
ruby_version: "2.7"
ruby_version:
- 2.5
- 2.7
- 3.0
- jruby:9.2.14.0
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: ${{ matrix.step_name }}
run: bash script/${{ matrix.script_file }}
- uses: actions/checkout@v2
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +test
profile_docs:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: 'Profile Docs Site (Ruby ${{ matrix.ruby_version }})'
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5 # Minimum required Ruby version in gemspec
steps:
- uses: actions/checkout@v2
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +profile-docs
style_check:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: 'Style Check (Ruby ${{ matrix.ruby_version }})'
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
steps:
- uses: actions/checkout@v2
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +style-check

View File

@@ -17,7 +17,7 @@ jobs:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

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@v3
- 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,22 +1,19 @@
name: Spell Check
name: Spell checking
on:
pull_request_target:
push:
branches:
- master
- "*-stable"
# Switch from `pull_request_target` event to reduce distraction from comments
# regarding errors reported in unmodified files.
pull_request:
branches:
- master
- "*-stable"
jobs:
build:
name: Spell Check
runs-on: "ubuntu-latest"
name: Spell checking
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Check Spellings
uses: check-spelling/check-spelling@v0.0.19
- name: checkout-merge
if: "contains(github.event_name, 'pull_request')"
uses: actions/checkout@v2.0.0
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge
- name: checkout
if: "!contains(github.event_name, 'pull_request')"
uses: actions/checkout@v2.0.0
- uses: check-spelling/check-spelling@v0.0.19

View File

@@ -18,12 +18,12 @@ jobs:
BUNDLE_RETRY: 3
steps:
- name: Checkout Jekyll
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
fetch-depth: 5
path: jekyll
- name: Checkout Third-Party Repository
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: ashmaroli/tomjoht.github.io
path: sandbox

View File

@@ -13,7 +13,7 @@ Jekyll/NoPutsAllowed:
- rake/*.rake
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 2.5
Include:
- lib/**/*.rb
- test/**/*.rb

View File

@@ -1,17 +1,11 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude`
# on 2022-04-06 10:48:47 UTC using RuboCop version 1.26.1.
# on 2020-11-23 15:56:48 UTC using RuboCop version 1.4.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
Performance/BindCall:
Exclude:
- 'test/helper.rb'
# Offense count: 1
Style/CombinableLoops:
Exclude:
@@ -23,3 +17,9 @@ Style/CombinableLoops:
Style/OptionalBooleanParameter:
Exclude:
- 'lib/jekyll/log_adapter.rb'
# Offense count: 1
# Configuration parameters: Methods.
Style/RedundantArgument:
Exclude:
- 'lib/jekyll/tags/link.rb'

17
Gemfile
View File

@@ -5,10 +5,6 @@ gemspec :name => "jekyll"
gem "rake", "~> 13.0"
if ENV["LIQUID_VERSION"] && ENV["LIQUID_VERSION"] != ""
gem "liquid", ENV["LIQUID_VERSION"]
end
group :development do
gem "launchy", "~> 2.3"
gem "pry"
@@ -27,7 +23,7 @@ group :test do
gem "nokogiri", "~> 1.7"
gem "rspec"
gem "rspec-mocks"
gem "rubocop", "~> 1.26.0"
gem "rubocop", "~> 1.18.3"
gem "rubocop-minitest"
gem "rubocop-performance"
gem "rubocop-rake"
@@ -36,12 +32,8 @@ group :test do
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 "test-theme-w-empty-data", :path => File.expand_path("test/fixtures/test-theme-w-empty-data", __dir__)
if RUBY_ENGINE == "jruby"
gem "http_parser.rb", "~> 0.6.0"
gem "jruby-openssl"
end
gem "jruby-openssl" if RUBY_ENGINE == "jruby"
end
#
@@ -77,9 +69,8 @@ group :jekyll_optional_dependencies do
gem "jekyll-paginate"
gem "jekyll-redirect-from"
gem "kramdown-syntax-coderay"
gem "matrix"
gem "mime-types", "~> 3.0"
gem "rdoc", "~> 6.3.0"
gem "rdoc", "~> 6.0"
gem "tomlrb"
platforms :ruby, :mswin, :mingw, :x64_mingw do
@@ -91,7 +82,7 @@ group :jekyll_optional_dependencies do
# 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", "~> 1.2"
gem "tzinfo-data"
end
end

View File

@@ -38,49 +38,18 @@
* Remove AWS Amplify from the showcase (#8812)
* Move Frank to Emeritus Core Team Members (#8813)
* Release post for v4.2.1 (#8818)
* Update CircleCI example (#8829)
* Fix typo (#8835)
* Added docs for running locally (#8852)
* Linting README.markdown (#8900)
* Remove text on GITHUB_TOKEN which is now built-in (#8907)
* Add Security Policy document (#8823)
* Manage repository meta documents consistently (#8908)
* docs: add Layer0 deployment guide (#8915)
* docs: Update REAMDE generated by `jekyll new-theme` (#8919)
* Update resources.md (#8925)
* Rewrite documentation on installing plugins (#8921)
* Improve maintainers guide on releasing a new version (#8928)
* Fix link for &#34;CloudSh&#34; (#8934)
* Recommend using `actions/cache` in GitHub Actions documentation (#8948)
* Remove references to EOL hakiri.io service (#8946)
* Release post for v4.2.2 (#8982)
* Document releasing off `*-stable` branches (#8984)
* Update document by fix yaml syntax error (#8991)
* Enhance option&#39;s case for Jekyll configuration (#8992)
* Fix typo in `_docs/deployment/manual.md` (#8997)
* Add quiet/verbose options (#8996)
* Update README.markdown re IRC Pointer (#9005)
* Remove Aerobatic (#9007)
* Add Jekyll 3.9.2 release post to &#39;master&#39; branch (#9013)
* Simplify macOS installation docs (#8993)
* Improve document about Github Actions section (#8853)
* Update permalinks.md (#9017)
### Bug Fixes
* Add webrick as a dependency (#8524)
* fix: pin rubocop to 1.12 due to error with ruby 2.4 (#8651)
* Revert &#34;style: run rubocop -a&#34; (#8676)
* Load Jekyll plugins from BUNDLE_GEMFILE location (#8585)
* fix(security): CVE-2021-28834 (#8680)
* Inject livereload script using `location.protocol` instead of `http:` (#8718)
* Respect collections_dir config within include tag (#8756)
* Fix regression in Convertible module from v4.2.0 (#8786)
* Revert #7253: &#34;Don&#39;t reset site.url to localhost:4000 by default&#34; (#8620)
* Improve readability of CI logs (#8877)
* Fix deprecation message for missing doc method (#8960)
* Fix response header for content served via `jekyll serve` (#8965)
* Trigger livereload in sites without pages (#8337)
* Only enable BOM encoding option on UTF encodings (#8363)
### Development Fixes
@@ -90,19 +59,12 @@
* Pin rubocop version (#8564)
* style: add rubocop 1.9 cops (#8567)
* Cross Version Testing Locally and Faster CI (#8610)
* style: run rubocop -a (#8654)
* Use official Ruby setup GH action (#8614)
* Spell check action for markdown documentation (#8675)
* Update expect to cover docs/_posts (#8677)
* Enable Rubocop accessor grouping, fix existing offenses (#8293)
* Tags:Highlight: Decomposed HTMLLegacy formatter (#8623)
* Relax Rubocop Dependency (#8831)
* Add a workflow to build gems consistently (#8830)
* Fix random test failures in TestExcerpt #to_liquid (#8884)
* Lock gem `psych` to `v3.x` (#8918)
* Fix typo in Bug Report template (#8951)
* Check symlink outside site_source without Pathutil (#9015)
* Stop testing with Rubies older than 2.7 on non-Windows (#8955)
* Bump actions/checkout from 2 to 3 (#8986)
### Minor Enhancements
@@ -112,28 +74,10 @@
* Update rubocop from 1.12 to 1.18 and min ruby from 2.4 to 2.5 (#8741)
* Always hide cache-dir contents from Git (#8798)
* Remove the warning about auto-regeneration on Windows (#8821)
* Propagate _data folder from theme (#8815)
* Support both tzinfo v1 and v2 alongwith non-half hour offsets. (#8880)
* Run vendor-mimes to update mime.types (#8940)
* Expose collection static files via `site.static_files` (#8961)
* Expose `basename` from `document.rb` as `name` to Liquid templates (#8761)
* Allow Configurable Converters on CSV (#8858)
### Site Enhancements
* Improvements to CSS (#7834)
* Slightly update lang `sh` code-block styling (#8857)
## 4.2.2 / 2022-03-03
### Bug Fixes
* Lock `http_parser.rb` gem to `v0.6.x` on JRuby.
### Development Fixes
* Backport #8830 for v4.2.x: Add a workflow to build gems consistently (#8869)
* Lock `rubocop-performance` to `v1.11.x`.
## 4.2.1 / 2021-09-27
@@ -439,19 +383,6 @@
* Fix Kramdown converter based tests for v4.0.x (#8143)
## 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

View File

@@ -3,10 +3,12 @@
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
[![Linux Build Status](https://github.com/jekyll/jekyll/workflows/Continuous%20Integration/badge.svg)][ci-workflow]
[![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
[![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
[![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)
[ruby-gems]: https://rubygems.org/gems/jekyll
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
[ci-workflow]: https://github.com/jekyll/jekyll/actions?query=workflow%3A%22Continuous+Integration%22+branch%3Amaster
[appveyor]: https://ci.appveyor.com/project/jekyll/jekyll/branch/master
@@ -16,7 +18,7 @@ Jekyll is a simple, blog-aware, static site generator perfect for personal, proj
Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
See: [https://jekyllrb.com/philosophy](https://jekyllrb.com/philosophy)
See: https://jekyllrb.com/philosophy
## Getting Started
@@ -24,7 +26,7 @@ See: [https://jekyllrb.com/philosophy](https://jekyllrb.com/philosophy)
* Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
* Take a gander at some existing [Sites](https://github.com/jekyll/jekyll/wiki/sites)
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) and [`#jekyll` Channel on Libera IRC](https://libera.chat)
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
## Diving In
@@ -43,7 +45,7 @@ If you don't find the answer to your problem in our [docs](https://jekyllrb.com/
## Code of Conduct
In order to have a more open and welcoming community, Jekyll adheres to a
[code of conduct](https://jekyllrb.com/docs/conduct/) adapted from the Ruby on Rails code of
[code of conduct](CODE_OF_CONDUCT.markdown) adapted from the Ruby on Rails code of
conduct.
Please adhere to this code of conduct in any interactions you have in the
@@ -56,27 +58,28 @@ these terms, please let one of our [core team members](https://jekyllrb.com/team
### Sponsors
Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
[![Jekyll Sponsor 0](https://opencollective.com/jekyll/sponsor/0/avatar.svg)](https://opencollective.com/jekyll/sponsor/0/website)
[![Jekyll Sponsor 1](https://opencollective.com/jekyll/sponsor/1/avatar.svg)](https://opencollective.com/jekyll/sponsor/1/website)
[![Jekyll Sponsor 2](https://opencollective.com/jekyll/sponsor/2/avatar.svg)](https://opencollective.com/jekyll/sponsor/2/website)
[![Jekyll Sponsor 3](https://opencollective.com/jekyll/sponsor/3/avatar.svg)](https://opencollective.com/jekyll/sponsor/3/website)
[![Jekyll Sponsor 4](https://opencollective.com/jekyll/sponsor/4/avatar.svg)](https://opencollective.com/jekyll/sponsor/4/website)
[![Jekyll Sponsor 5](https://opencollective.com/jekyll/sponsor/5/avatar.svg)](https://opencollective.com/jekyll/sponsor/5/website)
[![Jekyll Sponsor 6](https://opencollective.com/jekyll/sponsor/6/avatar.svg)](https://opencollective.com/jekyll/sponsor/6/website)
[![Jekyll Sponsor 7](https://opencollective.com/jekyll/sponsor/7/avatar.svg)](https://opencollective.com/jekyll/sponsor/7/website)
[![Jekyll Sponsor 8](https://opencollective.com/jekyll/sponsor/8/avatar.svg)](https://opencollective.com/jekyll/sponsor/8/website)
[![Jekyll Sponsor 9](https://opencollective.com/jekyll/sponsor/9/avatar.svg)](https://opencollective.com/jekyll/sponsor/9/website)
<a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/3/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/3/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/4/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/4/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/5/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/5/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/6/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/6/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/7/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/7/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/8/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/8/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/9/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/9/avatar.svg" /></a>
### Contributors
This project exists thanks to all the people who contribute.
[![Jekyll Contributors](https://opencollective.com/jekyll/contributors.svg?width=890&button=false)](../../graphs/contributors)
<a href="../../graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
### Backers
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
[![Jekyll Backers](https://opencollective.com/jekyll/backers.svg?width=890)](https://opencollective.com/jekyll#backers)
<a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
## License

View File

@@ -14,10 +14,6 @@ environment:
BUNDLE_WITHOUT: "benchmark: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: "default-site"
@@ -26,10 +22,6 @@ environment:
- RUBY_FOLDER_VER: "26"
TEST_SUITE: "memprof"
- RUBY_FOLDER_VER: "26"
TZINFO_VERSION: "~> 1.2"
TEST_SUITE: "cucumber"
- RUBY_FOLDER_VER: "26"
TZINFO_VERSION: "~> 2.0"
TEST_SUITE: "cucumber"
install:

View File

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

View File

@@ -55,7 +55,7 @@
flag: --lsi
- name: Limit posts
- name: Limit Posts
description: Limit the number of posts to parse and publish.
option: "limit_posts: NUM"
flag: --limit_posts NUM
@@ -69,17 +69,15 @@
- name: Verbose output
description: Print verbose output.
option: "verbose: BOOL"
flag: -V, --verbose
- name: Silence output
- name: Silence Output
description: Silence the normal output from Jekyll during a build.
option: "quiet: BOOL"
flag: -q, --quiet
- name: Log level
- name: Log Level
description: Specify a log level among debug, info, warn, or error.
flag: JEKYLL_LOG_LEVEL=info
@@ -95,7 +93,7 @@
flag: -I, --incremental
- name: Disable bundle require
- name: Disable Bundle Require
description: Disables the need to require gems in `:jekyll_plugins` Gemfile
flag: JEKYLL_NO_BUNDLER_REQUIRE=true
@@ -106,7 +104,7 @@
flag: --profile
- name: Strict front matter
- name: Strict Front Matter
description: Cause a build to fail if there is a YAML syntax error in a page's front matter.
option: "strict_front_matter: BOOL"
flag: --strict_front_matter

View File

@@ -1,10 +1,10 @@
- name: Site source
- name: Site Source
description: Change the directory where Jekyll will read files
option: "source: DIR"
flag: -s, --source DIR
- name: Site destination
- name: Site Destination
description: Change the directory where Jekyll will write files
option: "destination: DIR"
flag: -d, --destination DIR
@@ -17,7 +17,7 @@
flag: --safe
- name: Disable disk cache
- name: Disable Disk Cache
version-badge: 4.1.0
description: >-
Disable caching of content to disk in order to skip creating a <code>.jekyll-cache</code> or similar directory at
@@ -57,7 +57,7 @@
option: "keep_files: [DIR, FILE, ...]"
- name: Time zone
- name: Time Zone
description: >-
Set the time zone for site generation. This sets the <code>TZ</code> environment variable, which Ruby uses to handle
time and date creation and manipulation. Any entry from the

View File

@@ -1,28 +1,28 @@
- name: Local server port
- name: Local Server Port
description: Listen on the given port. The default is `4000`.
option: "port: PORT"
flag: "-P, --port PORT"
- name: Local server hostname
- name: Local Server Hostname
description: Listen at the given hostname. The default is `localhost`.
option: "host: HOSTNAME"
flag: "-H, --host HOSTNAME"
- name: Live reload
- name: Live Reload
description: Reload a page automatically on the browser when its content is edited.
option: "livereload: BOOL"
flag: "-l, --livereload"
- name: Live reload ignore
- name: Live Reload Ignore
description: File glob patterns for LiveReload to ignore.
option: "livereload_ignore: [ GLOB1,... ]"
flag: "--livereload-ignore GLOB1[,GLOB2,...]"
- name: Live reload min/max delay
- name: Live Reload Min/Max Delay
description: Minimum/Maximum delay before automatically reloading page.
options:
- "livereload_min_delay: SECONDS"
@@ -32,7 +32,7 @@
- "--livereload-max-delay SECONDS"
- name: Live reload port
- name: Live Reload Port
description: Port for LiveReload to listen on.
flag: "--livereload-port PORT"
@@ -55,17 +55,17 @@
flag: "--skip-initial-build"
- name: Show directory listing
- name: Show Directory Listing
description: Show a directory listing instead of loading your index file.
option: "show_dir_listing: BOOL"
flag: "--show-dir-listing"
- name: X.509 (SSL) private key
- name: X.509 (SSL) Private Key
description: "SSL Private Key, stored or symlinked in the site source."
flag: "--ssl-key"
- name: X.509 (SSL) certificate
- name: X.509 (SSL) Certificate
description: "SSL Public certificate, stored or symlinked in the site source."
flag: "--ssl-cert"

View File

@@ -1,3 +1,3 @@
min_version: 2.5.0
current_version: 3.1.1
current_version_output: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236)
current_version: 3.0.0
current_version_output: ruby 3.0.0p0 (2020-12-25 revision 95aff21468)

View File

@@ -1,7 +1,7 @@
---
title: Code of Conduct
permalink: "/docs/code_of_conduct/"
note: This file is autogenerated. Edit /.github/CODE_OF_CONDUCT.markdown instead.
note: This file is autogenerated. Edit /CODE_OF_CONDUCT.markdown instead.
redirect_from: "/conduct/index.html"
editable: false
---

View File

@@ -10,13 +10,6 @@ As contributors and maintainers of this project, and in the interest of fosterin
Read the full [code of conduct]({{ '/docs/conduct/' | relative_url }})
## Reporting Security Vulnerabilities
Find something in our codebase that could be exploited by malicious elements?
Consult our [Security Policy]({{ '/docs/security/' | relative_url }}) to see if a product version is considered *outdated* and how to report
the situation responsibly.
## Where to get support
If you're looking for support for Jekyll, there are a lot of options:

View File

@@ -15,9 +15,9 @@ To start building your project on CircleCI, all you need to do is 'follow' your
1. Visit the 'Add Projects' page
1. From the GitHub or Bitbucket tab on the left, choose a user or organization.
1. Find your project in the list and click 'Build project' on the right.
1. The first build will start on its own. You can start telling CircleCI how to build your project by creating a [.circleci/config.yml][3] file in the root of your repository.
1. The first build will start on its own. You can start telling CircleCI how to build your project by creating a [circle.yml][3] file in the root of your repository.
[3]: https://circleci.com/docs/2.0/configuration-reference/
[3]: https://circleci.com/docs/configuration/
## 2. Dependencies
@@ -28,24 +28,22 @@ The easiest way to manage dependencies for a Jekyll project (with or without Cir
```ruby
source 'https://rubygems.org'
ruby '2.7.4'
ruby '2.4.0'
gem 'jekyll'
gem 'html-proofer'
```
```yaml
- step:
run: bundle install
```
CircleCI detects when `Gemfile` is present and will automatically run `bundle install` for you in the `dependencies` phase.
## 3. Testing
The most basic test that can be run is seeing if `jekyll build` actually works. This is a blocker, a dependency if you will, for other tests you might run on the generate site. So we'll run Jekyll, via Bundler, in the `dependencies` phase.
```yaml
- step:
run: bundle exec jekyll build
dependencies:
post:
- bundle exec jekyll build
```
### HTML Proofer
@@ -56,32 +54,26 @@ With your site built, it's useful to run tests to check for valid HTML, broken l
[6]: https://github.com/gjtorikian/html-proofer/blob/master/README.md#configuration
```yaml
- step:
run: bundle exec htmlproofer ./_site --check-html --disable-external
test:
post:
- bundle exec htmlproofer ./_site --check-html --disable-external
```
## Complete Example .circleci/config.yml File
## Complete Example circle.yml File
The example `.circleci/config.yml` below demonstrates how to
Since v2, CircleCI is a Docker-based system. The example `circle.yml` below demonstrates how to
deploy your Jekyll project to AWS. In order for this to work you would first have to set the
`S3_BUCKET_NAME` [environment variable](https://circleci.com/docs/2.0/env-vars/).
```yaml
workflows:
test-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
version: 2.1
defaults: &defaults
working_directory: ~/repo
version: 2
jobs:
build:
<<: *defaults
docker:
- image: cimg/ruby:2.7.4
- image: circleci/ruby:2.5
environment:
BUNDLE_PATH: ~/repo/vendor/bundle
steps:
@@ -113,8 +105,9 @@ jobs:
paths:
- _site
deploy:
<<: *defaults
docker:
- image: cimg/python:3.9.1
- image: circleci/python:3.6.3
environment:
S3_BUCKET_NAME: <<YOUR BUCKET NAME HERE>>
steps:
@@ -126,6 +119,17 @@ jobs:
- run:
name: Upload to s3
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --delete --acl public-read
workflows:
version: 2
test-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
```
## Questions?

View File

@@ -92,8 +92,8 @@ was generated with an old version of Bundler.
### Setting up the Action
GitHub Actions are registered for a repository by using a YAML file inside the directory path
`.github/workflows` (note the dot at the start). For simplicity, here we use one of the
[Jekyll Actions](#external-links) to show you how to use the action.
`.github/workflows` (note the dot at the start). Here we shall employ
[Jekyll Actions][jekyll-actions] from the Marketplace for its simplicity.
Create a **workflow file**, say `github-pages.yml`, using either the GitHub interface or by pushing
a YAML file to the workflow directory path manually. The base contents are:
@@ -113,14 +113,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: helaili/jekyll-action@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@2.0.5 # Choose any one of the Jekyll Actions
with: # Some relative inputs of your action
token: ${{ secrets.GITHUB_TOKEN }}
```
@@ -132,13 +126,10 @@ The above workflow can be explained as the following:
the Action from overwriting the `gh-pages` branch on any feature branch pushes.
- The **name** of the job matches our YAML filename: `github-pages`.
- The **checkout** action takes care of cloning your repository.
- The **cache** action is an optimization to avoid fetching and installing gems on every build.
- We specify our selected **action** and **version number** using `helaili/jekyll-action@2.0.5`,
this handles the build and deploy. You can choose any one of the Jekyll Actions that matches
your project and flavor from [GitHub Marketplace](https://github.com/marketplace?type=actions&query=jekyll+action).
- We specify our selected **action** and **version number** using `helaili/jekyll-action@2.0.5`.
This handles the build and deploy.
- We set a reference to a secret **environment variable** for the action to use. The `GITHUB_TOKEN`
is a secret token automatically initialized at the start of every workflow run.
More information can be found in [GitHub documentation](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret).
is a _Personal Access Token_ and is detailed in the next section.
Instead of using the **on.push** condition, you could trigger your build on a **schedule** by
using the [on.schedule] parameter. For example, here we build daily at midnight by specifying
@@ -157,16 +148,9 @@ Note that this string must be quoted to prevent the asterisks from being evaluat
### Providing permissions
At the start of each workflow run, GitHub automatically creates a unique `GITHUB_TOKEN` secret to use in
your workflow. You can use the `GITHUB_TOKEN` to authenticate in a workflow run. You can use the
`GITHUB_TOKEN` by using the standard syntax for referencing secrets: `${{ secrets.GITHUB_TOKEN }}`.
For more information, please read [GitHub's docs on token authentication][github-token-ref]
[github-token-ref]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
If you need a token that requires permissions that aren't available in the `GITHUB_TOKEN`, you can create
a Personal Access Token (PAT), and set it as a secret in your repository for this action to push to the
`gh-pages` branch:
The action needs permissions to push to your `gh-pages` branch. So you need to create a GitHub
**authentication token** on your GitHub profile, then set it as an environment variable in your
build using _Secrets_:
1. On your GitHub profile, under **Developer Settings**, go to the [Personal Access Tokens][tokens]
section.
@@ -175,12 +159,12 @@ a Personal Access Token (PAT), and set it as a secret in your repository for thi
to commit to the `gh-pages` branch.
3. **Copy** the token value.
4. Go to your repository's **Settings** and then the **Secrets** tab.
5. **Create** a token named `YOUR_CUSTOM_TOKEN` (_important_). Give it a value using the value copied
5. **Create** a token named `GITHUB_TOKEN` (_important_). Give it a value using the value copied
above.
### Build and deploy
On pushing any local changes onto `main`, the action will be triggered and the build will
On pushing any local changes onto `master`, the action will be triggered and the build will
**start**.
To watch the progress and see any build errors, check on the build **status** using one of the
@@ -221,7 +205,6 @@ successful deploy from the Action.
- [jekyll-actions-quickstart] is an unofficial repository that includes a live demo of the
`jekyll-actions` action. That project can be used as a template for making a new site.
- [jekyll-action-ts] is another action to build and publish Jekyll sites on GiHub Pages that includes HTML formatting options with Prettier and caching.
- [jekyll-deploy-action] is a GitHub Action to deploy the Jekyll site conveniently for GitHub Pages (An alternative action with better speed and compatibility).
[ghp-whitelist]: https://pages.github.com/versions/
[timeago-plugin]: https://rubygems.org/gems/jekyll-timeago
@@ -229,4 +212,3 @@ successful deploy from the Action.
[jekyll-actions]: https://github.com/marketplace/actions/jekyll-actions
[jekyll-actions-quickstart]: https://github.com/MichaelCurrin/jekyll-actions-quickstart
[jekyll-action-ts]: https://github.com/limjh16/jekyll-action-ts
[jekyll-deploy-action]: https://github.com/jeffreytse/jekyll-deploy-action

View File

@@ -153,6 +153,25 @@ script/cucumber features/blah.feature
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
### Test Ruby Versions Locally
The CI process runs the build against with several [Ruby](https://github.com/jekyll/jekyll/blob/master/.github/workflows/ci.yml#L22) versions. This process can be repeated locally without changing your default installation by using [earthly](https://earthly.dev/get-earthly).
To run the full CI process across all supported Ruby Versions:
```sh
earthly +all
```
To run the tests for a specific version of Ruby:
```sh
earthly --build-arg RUBY=2.5 +test
```
To run the tests for a specific version of JRuby specify the full version:
```sh
earthly --build-arg RUBY=jruby:9.2.14.0 +test
```
## Visual Studio Code Development Container
If you've got [Visual Studio Code](https://code.visualstudio.com/) with the [Remote Development Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) installed then simply opening this repository in Visual Studio Code and following the prompts to "Re-open In A Development Container" will get you setup and ready to go with a fresh environment with all the requirements installed.

View File

@@ -148,30 +148,3 @@ author: dave
{% endraw %}
For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation]({{ '/tutorials/navigation/' | relative_url }}).
## CSV/TSV Parse Options
The way Ruby parses CSV and TSV files can be customized with the `csv_reader` and `tsv_reader`
configuration options. Each configuration key exposes the same options:
`converters`: What [CSV converters](https://ruby-doc.org/stdlib-2.5.0/libdoc/csv/rdoc/CSV.html#Converters) should be
used when parsing the file. Available options are `integer`, `float`, `numeric`, `date`, `date_time` and
`all`. By default, this list is empty.
`encoding`: What encoding the files are in. Defaults to the site `encoding` configuration option.
`headers`: Boolean field for whether to parse the first line of the file as headers. When `false`, it treats the
first row as data. Defaults to `true`.
Examples:
```yaml
csv_reader:
converters:
- numeric
- datetime
headers: true
encoding: utf-8
tsv_reader:
converters:
- all
headers: false
```

View File

@@ -25,7 +25,7 @@ low-volume blogs as you only pay for what you use.
## FTP
Most traditional web hosting providers let you upload files to their servers over FTP. To upload a Jekyll site to a web host using FTP, run the `jekyll build` command and copy the contents of the generated `_site` folder to the root folder of your hosting account. This is most likely to be the `httpdocs` or `public_html` folder on most hosting providers.
Most traditional web hosting provider let you upload files to their servers over FTP. To upload a Jekyll site to a web host using FTP, run the `jekyll build` command and copy the contents of the generated `_site` folder to the root folder of your hosting account. This is most likely to be the `httpdocs` or `public_html` folder on most hosting providers.
## scp

View File

@@ -4,6 +4,12 @@ permalink: /docs/deployment/third-party/
---
## Aerobatic
[Aerobatic](https://www.aerobatic.com) has custom domains, global CDN distribution, basic auth, CORS proxying, and a growing list of plugins all included.
Automating the deployment of a Jekyll site is simple. See their [Jekyll docs](https://www.aerobatic.com/docs/static-site-generators/#jekyll) for more details. Your built `_site` folder is deployed to their highly-available, globally distributed hosting service.
## AWS Amplify
The [AWS Amplify Console](https://console.amplify.aws) provides continuous deployment and hosting for modern web apps (single page apps and static site generators). Continuous deployment allows developers to deploy updates to their web app on every code commit to their Git repository. Hosting includes features such as globally available CDNs, 1-click custom domain setup + HTTPS, feature branch deployments, redirects, trailing slashes, and password protection.
@@ -68,7 +74,3 @@ Read this [Jekyll step-by-step guide](https://www.netlify.com/blog/2020/04/02/a-
[21YunBox](https://www.21yunbox.com) provides blazing fast Chinese CDN, Continuous Deployment, one click HTTPS and [much more](https://www.21yunbox.com/docs/), providing developers a hassle-free solution to launch their web projects in China.
Read this [Jekyll step-by-step guide](https://www.21yunbox.com/docs/#/deploy-jekyll) to deploy your Jekyll site on 21YunBox.
## Layer0
[Layer0](https://www.layer0.co) is an all-in-one platform to develop, deploy, preview, experiment on, monitor, and run your headless frontend. It is focused on large, dynamic websites and best-in-class performance through EdgeJS (a JavaScript-based Content Delivery Network), predictive prefetching, and performance monitoring. Layer0 offers a free tier. Get started in just a few minutes by following [Layer0's guide to deploying Jekyll](https://docs.layer0.co/guides/jekyll).

View File

@@ -118,14 +118,3 @@ to see more detailed examples.
<a href="{{ '/docs/installation/windows/' | relative_url }}">Windows-specific docs page</a>.
</p>
</div>
### Running and Testing Locally
Once the project is configured with the github-pages environment, it's quite hard to switch back and forth with the local settings and the production-level settings. For that we can use certain CLI options to make the workflow hassle-free.
```sh
bundle exec jekyll serve --baseurl=""
```
This will run the jekyll server on your local machine i.e. on `http://localhost:4000`. Refer <a href="{{ '/docs/configuration/options/#serve-command-options' | relative_url }}">server options</a> for available options.

View File

@@ -4,21 +4,6 @@ permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 4.2.2 / 2022-03-03
{: #v4-2-2}
### Bug Fixes
{: #bug-fixes-v4-2-2}
- Lock `http_parser.rb` gem to `v0.6.x` on JRuby.
### Development Fixes
{: #development-fixes-v4-2-2}
- Backport [#8830]({{ site.repository }}/issues/8830) for v4.2.x: Add a workflow to build gems consistently ([#8869]({{ site.repository }}/issues/8869))
- Lock `rubocop-performance` to `v1.11.x`.
## 4.2.1 / 2021-09-27
{: #v4-2-1}
@@ -348,23 +333,6 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Fix Kramdown converter based tests for v4.0.x ([#8143]({{ site.repository }}/issues/8143))
## 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}

View File

@@ -24,19 +24,19 @@ See [Requirements]({{ '/docs/installation/#requirements' | relative_url }}) for
1. Install all [prerequisites]({{ '/docs/installation/' | relative_url }}).
2. Install the jekyll and bundler [gems]({{ '/docs/ruby-101/#gems' | relative_url }}).
```sh
```
gem install jekyll bundler
```
3. Create a new Jekyll site at `./myblog`.
```sh
```
jekyll new myblog
```
4. Change into your new directory.
```sh
```
cd myblog
```
5. Build the site and make it available on a local server.
```sh
```
bundle exec jekyll serve
```
6. Browse to [http://localhost:4000](http://localhost:4000){:target="_blank"}

View File

@@ -3,90 +3,155 @@ title: Jekyll on macOS
permalink: /docs/installation/macos/
---
## Supported macOS versions
## Install Command Line Tools
To install the command line tools to compile native extensions, open a terminal and run:
- Monterey (macOS 12)
- Big Sur (macOS 11)
- Catalina (macOS 10.15)
```sh
xcode-select --install
```
Older macOS versions might work, but we don't officially support them.
### set SDKROOT (only macOS Catalina or later)
Starting on macOS Catalina (10.15) the headers used for Ruby have been moved from their previous location which results in some gems, including Jekyll to fail installation. This can be solved by setting SDKROOT in your shell configuration to the value provided by xcrun.
```ssh
export SDKROOT=$(xcrun --show-sdk-path)
```
## Install Ruby
To install Jekyll on macOS, you need a proper Ruby development environment.
While macOS comes preinstalled with Ruby, we don't recommend using that version
to install Jekyll. This external article goes over the various reasons
[why you shouldn't use the system Ruby](https://www.moncefbelyamani.com/why-you-shouldn-t-use-the-system-ruby-to-install-gems-on-a-mac/).
Jekyll requires **Ruby v{{ site.data.ruby.min_version }}** or higher.
macOS Big Sur 11.x ships with Ruby 2.6.3. Check your Ruby version using `ruby -v`.
Instead, you'll need to install a separate and newer version of Ruby using a
version manager such as [asdf], [chruby], [rbenv], or [rvm]. Version managers
allow you to easily install multiple versions of Ruby, and switch between them.
If you're running a previous version of macOS, you'll have to install a newer version of Ruby. Installation with [Homebrew](https://brew.sh) is simple if you're only planning to use Ruby for Jekyll. Install with a version manager such as [asdf](https://asdf-vm.com/), [chruby](https://github.com/postmodern/chruby), [rbenv](https://github.com/rbenv/rbenv), or [rvm](https://rvm.io/) if you need to switch among Ruby versions (instructions for rbenv are below). See the guide [Install Ruby on Mac](https://mac.install.guide/ruby/index.html) for details and recommendations.
We recommend `chruby` because it's the simplest and least likely to cause issues.
The instructions below are an excerpt from this detailed external guide to
[install Ruby on Mac]. They work best if you're setting up development tools
for the first time on your Mac. If you've already tried to install Ruby or
Jekyll on your Mac, or if you run into any issues, read that guide.
[asdf]: https://asdf-vm.com/
[chruby]: https://github.com/postmodern/chruby
[rbenv]: https://github.com/rbenv/rbenv
[rvm]: https://rvm.io/
[install Ruby on Mac]: https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
### Step 1: Install Homebrew
[Homebrew](https://brew.sh/) makes it easy to install development tools on a Mac.
### With Homebrew {#brew}
To run the latest Ruby version you need to install it through [Homebrew](https://brew.sh).
```sh
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Ruby
brew install ruby
```
### Step 2: Install chruby and the latest Ruby with ruby-install
Add the brew ruby and gems path to your shell configuration:
Install `chruby` and `ruby-install` with Homebrew:
```bash
# If you're using Zsh
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.zshrc
```sh
brew install chruby ruby-install
# If you're using Bash
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.bash_profile
# Unsure which shell you are using? Type
echo $SHELL
```
Install the latest stable version of Ruby:
Relaunch your terminal and check your Ruby setup:
```sh
ruby-install ruby
```
which ruby
# /usr/local/opt/ruby/bin/ruby
This will take a few minutes, and once it's done, configure your shell to
automatically use `chruby`:
```sh
echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc
echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc
echo "chruby ruby-{{ site.data.ruby.current_version }}" >> ~/.zshrc
```
If you're using Bash, replace `.zshrc` with `.bash_profile`. If you're not sure,
read this external guide to
[find out which shell you're using](https://www.moncefbelyamani.com/which-shell-am-i-using-how-can-i-switch/).
Quit and relaunch Terminal, then check that everything is working:
```sh
ruby -v
{{ site.data.ruby.current_version_output }}
```
It should show {{ site.data.ruby.current_version_output }} or a newer version.
You're now running the current stable version of Ruby!
Next, read that same external guide for important notes about
[setting and switching between Ruby versions with chruby](https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/#how-to-install-different-versions-of-ruby-and-switch-between-them).
### With rbenv {#rbenv}
People often use [rbenv](https://github.com/rbenv/rbenv) to manage multiple
Ruby versions. This is very useful when you need to be able to run a given Ruby version on a project.
```sh
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install rbenv and ruby-build
brew install rbenv
# Set up rbenv integration with your shell
rbenv init
# Check your installation
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
```
Restart your terminal to apply your changes.
Next, you can install the Ruby version you want. Let's install the latest stable version:
```sh
rbenv install {{ site.data.ruby.current_version }}
rbenv global {{ site.data.ruby.current_version }}
ruby -v
{{ site.data.ruby.current_version_output }}
```
That's it! Head over to [rbenv command references](https://github.com/rbenv/rbenv#command-reference) to learn how to use different versions of Ruby in your projects.
## Install Jekyll
After installing Ruby with chruby, install the latest Jekyll gem:
After installing Ruby, install Jekyll and Bundler.
### Local Install
Install the bundler and jekyll gems:
```sh
gem install jekyll
gem install --user-install bundler jekyll
```
Get your Ruby version:
```sh
ruby -v
{{ site.data.ruby.current_version_output }}
```
Append your path file with the following, replacing the `X.X` with the first two digits of your Ruby version:
```bash
# If you're using Zsh
echo 'export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"' >> ~/.zshrc
# If you're using Bash
echo 'export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"' >> ~/.bash_profile
# Unsure which shell you are using? Type
echo $SHELL
```
Check that `GEM PATHS:` points to your home directory:
```sh
gem env
```
{: .note .info}
Every time you update Ruby to a version in which the first two digits change, update your path to match.
### Global Install
{: .note .warning}
We recommend not installing Ruby gems globally to avoid file permissions problems and using `sudo`.
#### On Mojave (10.14)
Because of SIP Protections in Mojave, run:
```sh
sudo gem install bundler
sudo gem install -n /usr/local/bin/ jekyll
```
#### Before Mojave (<10.14)
Run:
```sh
sudo gem install bundler jekyll
```
## Troubleshooting

View File

@@ -121,14 +121,22 @@ While 'new' blogs created with Jekyll v3.4 and greater, will have the following
sites *will* have to update their `Gemfile` (and installed gems) 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
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
```
<div class="note warning">
<h5>TZInfo 2.0 incompatibility</h5>
<p>
Version 2.0 of the TZInfo library has introduced a change in how timezone offsets are calculated.
This will result in incorrect date and time for your posts when the site is built with Jekyll 3.x on Windows.
</p>
<p>
We therefore recommend that you lock the Timezone library to version 1.2 and above by listing
<code>gem 'tzinfo', '~> 1.2'</code> in your <code>Gemfile</code>.
</p>
</div>
## Auto Regeneration
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve.

View File

@@ -15,7 +15,6 @@ Hello! This is where we document various processes for maintaining Jekyll. Being
- [Avoiding burnout](avoiding-burnout/)
- [Special Labels](special-labels/)
- [Releasing a new version](releasing-a-new-version/)
- [Releasing a new version off `*-stable` branches](releasing-off-stable-branches/)
Interested in becoming a maintainer? Here is some documentation for **contributors**:

View File

@@ -2,107 +2,29 @@
title: "Releasing a new version"
---
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the
contributions of others. You may find what is written here interesting, but it's definitely not for everyone.
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.
{: .note .info}
The most important thing to understand before making a release is that there's no need to feel nervous. Most things are revertable, and even if
you do publish an incomplete gem version, we can always skip that one. Don't hesitate to contact the other maintainers if you feel unsure or
don't know what to do next.
The most important thing to understand before making a release is that there's no need to feel nervous. Most things are revertable, and even if you do publish an incomplete gem version, we can always skip that one. Don't hesitate to contact the other maintainers if you feel unsure or don't know what to do next.
## Branches: `master` vs `*-stable`
We maintain several branches for major/minor releases that have since passed. For example, we maintain the `3.9-stable` branch for the `3.9.x` series since this is still used by GitHub Pages. This allows us to more easily make patches for bugs and security vulnerabilities. Maintaining a `*-stable` version is very similar to `master`, except that the jekyllrb.com blog post must (also) land on the `master` branch in order to be published.
### Bump the version
The only important place you need to manually bump the version is in `lib/jekyll/version.rb`. Adjust that, and everything else should work fine.
The version will mostly be of the format `"major.minor.patch"`. At times, we may decide to ship pre-releases which will be in the format
`"major.minor.patch.suffix"`. `suffix` is not standardized and may be anything like `pre.alpha1`, `pre.rc2`, or simply `beta3`, etc.
### Update the history document
To determine the correct version, consult the `## HEAD` section of our history document, `History.markdown`, first.
- If there's a subsection titled `Major Enhancements`
- Increment the `major` component of the version string and reset both `minor` and `patch` components to `0`.
- Add `suffix` if applicable.
- For example, `"3.9.1" => "4.0.0"` or, `"3.9.1 => "4.0.0.alpha1"`.
- Skip to next step in the release process.
- If there's a subsection titled `Minor Enhancements`
- Increment just the `minor` component and reset the patch component to `0`.
- Add `suffix` if applicable.
- For example, `"4.0.2" => "4.1.0"` or `"4.1.0" => "4.2.0.pre"`.
- Skip to next step in the release process.
- For anything else, increment just the `patch` component or `suffix` component as applicable. For example, `"4.0.2" => "4.0.3"` or
`"4.1.0.beta3" => "4.1.0.rc"`.
### Write a release post
In case this wasn't done already, you can generate a new release post scaffold using the included `rake` command:
```sh
bundle exec rake site:releases:new[3.8.0]
```
where `3.8.0` should be replaced with the new version.
Then, write the post. Be sure to thank all of the collaborators and maintainers who have contributed since the last release. You can generate
a log of their names using the following command:
```sh
git shortlog -sn master...v3.7.2
```
where `v3.7.2` is the git tag for the previous release. In case the tag doesn't exist in your repository, run:
```sh
git pull
```
Be sure to open a pull request for your release post once its finished.
### Update the History document
Replace the first header of `History.markdown` with a version milestone. This looks like the following:
Replace the first header of the history document with a version milestone. This looks like the following:
```diff
- ## HEAD
+ ## 3.7.1 / 2018-01-25
-## HEAD
+## 3.7.1 / 2018-01-25
```
Adjust the version number and the date. The `## HEAD` heading will be regenerated the next time a pull request is merged.
Rearrange the subsections (as a whole) based on decreasing priorities as illustrated below:
```
## 4.2.0 / 2020-12-14
### Major Enhancements
...
### Minor Enhancements
...
### Bug Fixes
...
### Security Fixes
...
### Optimization Fixes
...
### Development Fixes
...
### Site Enhancements
...
```
Adjust the version number and the date. The `## HEAD` heading will be regenerated next time a pull request is merged.
Once you've done this, update the website by running the following command:
@@ -112,51 +34,71 @@ bundle exec rake site:generate
This updates the website's changelog, and pushes the versions in various other places.
It's recommended that you go over the `History.markdown` file manually one more time, in case there are any spelling errors or such. Feel free
to fix those manually, and after you're done generating the website changelog, commit your changes.
It's recommended that you go over the `History.markdown` file manually one more time, in case there are any spelling errors or such. Feel free to fix those manually, and after you're done generating the website changelog, commit your changes.
## Write a release post (`master` branch)
In case this isn't done already, you can generate a new release post using the included `rake` command:
```sh
bundle exec rake site:releases:new[3.8.0]
```
where `3.8.0` should be replaced with the new version. Then, write the post. Be sure to thank all of the collaborators and maintainers who have contributed since the last release. You can generate a log of their names using the following command:
```sh
git shortlog -sn master...v3.7.2
```
where, again `v3.7.2` is the last release. Be sure to open a pull request for your release post.
If you are releasing from a `*-stable` branch, you can generate the post like normal on this branch and create a pull request. The log of names will use the stable branch name instead of `master`:
```sh
git shortlog -sn 3.9-stable...v3.9.1
```
where `v3.9.1` is the previous release on this branch.
**After your blog post has been approved and merged into the `*-stable` branch, you must re-create a pull request on the `master` branch in order to publish the post to jekyllrb.com.**
### Push the version
Before you do this step, make sure the following things are done:
- A release post has been prepared, and is ideally already live via a prior pull request.
- All of the prior steps are done, especially the change to `lib/jekyll/version.rb` has been staged for commit.
- Commit staged changes to the local `master` branch preferably with commit message `"Release :gem: v[CURRENT_VERSION]"`.
- You are on the correct branch with your changes (`master` or a `*-stable` branch)
- You have permission to push a new gem version to RubyGems
- You're [logged into RubyGems on your command line](https://guides.rubygems.org/command-reference/#gem-signin)
- A release post has been prepared, and is ideally already live
- All of the prior steps are done, committed, and pushed to `master`
The only thing left to do now is to run this command:
Really the only thing left to do is to run this command:
```sh
git push upstream master
bundle exec rake release
```
where `upstream` references `git@github.com:jekyll/jekyll.git`.
This will automatically build the new gem, make a release commit and tag and then push the new gem to RubyGems. Don't worry about creating a GitHub release, @jekyllbot should take care of that.
This will trigger a GitHub Actions workflow that will automatically build the new gem, tag the release commit, push the tag to GitHub and
then finally, push the new gem to RubyGems. Don't worry about creating a GitHub release either, @jekyllbot will take care of that when the
release workflow publishes the new tag.
And then, you're done! :tada: Feel free to celebrate!
And then, if the workflow has completed successfully, 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.
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.
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:
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:
- Bump the gem version manually, usually in `lib/<plugin_name>/version.rb`
- Adjust the history file
- Commit changes to default branch preferably with message `"Release :gem: v[CURRENT_VERSION]"`
- Push to remote repository
- Run `bundle exec rake release` or `script/release`, depending on which of the two exists
- Rejoice
Be sure to ask your project's maintainers if you're unsure!

View File

@@ -1,63 +0,0 @@
---
title: Releasing off older stable branches
---
Apart from having releases cut from the default `master` branch, Jekyll Core may occasionally cut releases containing security patches and
critical bug-fixes for older versions under maintenance. Such releases are cut from specially named branches, following the pattern
`[x].[y]-stable` where `[x]` denotes semver-major-version and `[y]`, the semver-minor-version. For example, the branch `3.9-stable` refers to
commits released as part of `jekyll-3.9.x` series.
Co-ordinating a release off a `*-stable` branch is complicated mainly because the default branch has to inevitably reflect the release as well.
## Requirements
- The maintainer has to have **write-access** to both the concerned `*-stable` and `master` branches.
- The maintainer needs to complete the task using their **local CLI program** instead of dispatching via GitHub Web UI.
- The maintainer is abreast with the workflow to [release off `master`]({{ 'docs/maintaining/releasing-a-new-version/' | relative_url }}). The
procedure documented in the following section is an abridged adaptation of the workflow for `master`.
- A release post has been drafted and **is awaiting publish to `master`** via an approved pull request.
- Stable internet connection.
## Trigger release workflow
1. Ensure that you've **checked out the concerned `*-stable` branch** and is up-to-date with its counterpart at `jekyll/jekyll` at GitHub.
2. Bump the `VERSION` string in `lib/jekyll/version.rb`.
3. Update the **History document** as documented [here]({{ 'docs/maintaining/releasing-a-new-version/#update-the-history-document' | relative_url }}).<br/>
(**IMPORTANT: Do not run `rake site:generate` on the stable branch though**).
4. Copy the entire History section pertaining to current release and paste into a new tab / window of your text-editor. We will use this
temporary snippet at a future stage.
5. Commit changes to the version-file and History document with commit message `Release :gem: v[CURRENT_VERSION]`.
6. Push commit to upstream remote `jekyll/jekyll` at GitHub.
## Publish release post
1. Ensure the `Release Gem` workflow has completed successfully.
2. Merge release-post pull request to `master`.
## Update default branch to reflect release off the stable branch
1. Locally, check out `master` and ensure it is up-to-date with its remote counterpart at `jekyll/jekyll` at GitHub.
2. Update History document using the snippet in the temporary tab / window created earlier. The various sections in the History document are
primarily in reverse chronological order and secondarily scoped to the semver-major-version. For example, a release section for `v3.9.2`
will be listed above the section for `v3.9.1` but under release sections for v4.x.
The snippet stashed earlier has to be injected into the correct location manually.
3. Optionally, update `VERSION` string in `lib/jekyll/version.rb`. (*If existing version is lesser than latest version*).
4. Now **run `rake site:generate`** to update various meta files:
- docs/_config.yml
- docs/_docs/history.md
- docs/latest_version.txt
5. Commit changes to various meta files with commit message `Release :gem: v[CURRENT_VERSION]`.
6. Push commit to upstream remote.
## Publish GitHub Release
Unlike releases cut off the `master` branch, our JekyllBot does not automatically create and publish a GitHub Release for tags created from
*non-default* branches. Therefore, the maintainer has to **manually create and publish** the concerned GitHub Release.
1. Choose the newly pushed tag.
2. Title is same as the name of the selected tag.
3. The release snippet stashed previously forms the body.
4. Delete the snippet's title (`## x.y.z / YYYY-MM-DD`) from the release body.
5. Publish.
Note: The GitHub Release may optionally be *drafted* prior to updating the default branch and then *published* immediately after pushing the
update commit to the default branch to streamline the procedure.

View File

@@ -229,7 +229,7 @@ Here's the full list of placeholders available:
<td>
<p>
Title from the documents filename. May be overridden via
the documents <code>slug</code> front matter. Preserves case from the source.
the documents <code>slug</code> front matter.
</p>
</td>
</tr>
@@ -409,7 +409,6 @@ Collections have the following placeholders available:
variable value if any is present in the document; if none is
defined then <code>:title</code> will be equivalent to
<code>:name</code>, aka the slug generated from the filename.
Preserves case from the source.
</p>
</td>
</tr>

View File

@@ -3,123 +3,77 @@ title: Plugins
permalink: /docs/plugins/installation/
---
Jekyll has built-in support for using plugins to extend the core functionality.
You have 3 options for installing plugins:
Primarily, any file with extension `.rb` placed within a `_plugins` directory at the root of the site's `source`, will be automatically loaded
during a build session.
1. In your site source root, make a `_plugins` directory. Place your plugins
here. Any file ending in `*.rb` inside this directory will be loaded before
Jekyll generates your site.
This behavior can be configured as follows:
2. In your `_config.yml` file, add a new array with the key `plugins` (or `gems` for Jekyll < `3.5.0`) and the
values of the gem names of the plugins you'd like to use. An example:
- The `_plugins` directory may be changed either directly via the command-line or via the configuration file(s).
- Plugins in the `_plugins` directory (or its equivalent(s)) will not be loaded when Jekyll is running in `safe` mode.
- This route cannot be used to extend the Jekyll CLI.
```yaml
# This will require each of these plugins automatically.
plugins:
- jekyll-gist
- jekyll-coffeescript
- jekyll-assets
- another-jekyll-plugin
```
To work with plugins packaged as gems, one has to list the desired gems in the configuration file under a top-level key named `plugins`.
Additionally, if you're building in `safe` mode, the gem needs to be listed under a top-level key named `whitelist`. For example:
Then install your plugins using `gem install jekyll-gist jekyll-coffeescript jekyll-assets another-jekyll-plugin`
```yaml
plugins:
- jekyll-gist
- jekyll-coffeescript
- jekyll-seo-tag
- some-other-jekyll-plugin
3. Add the relevant plugins to a Bundler group in your `Gemfile`. An
example:
# Enable safe mode
safe: true
```ruby
group :jekyll_plugins do
gem "jekyll-gist"
gem "jekyll-coffeescript"
gem "jekyll-assets"
gem "another-jekyll-plugin"
end
```
# Whitelist plugins under safe mode.
# Note that `some-other-jekyll-plugin` is not listed here. Therefore,
# it will not be loaded under safe mode.
whitelist:
- jekyll-gist
- jekyll-coffeescript
- jekyll-seo-tag
```
In the absence of a Gemfile, one must manually ensure that listed plugins have been installed prior to invoking Jekyll. For example, the
latest versions of gems in the above list may be installed to a system-wide location by running:
```sh
gem install jekyll-gist jekyll-coffeescript jekyll-remote-theme some-other-jekyll-plugin
```
## Using a Gemfile
The maintenance of various gem dependencies may be greatly simplified by using a Gemfile (usually at the root of the site's source) in
conjunction with a Rubygem named `bundler`. The Gemfile however **should** list all the primary dependencies of your site, including Jekyll
itself, not just gem-based plugins of the site because Bundler narrows the scope of installed gems to just *runtime dependencies* resolved by
evaluating the Gemfile. For example:
```ruby
source "https://rubygems.org"
# Use the latest version.
gem "jekyll"
# The theme of current site, locked to a certain version.
gem "minima", "2.4.1"
# Plugins of this site loaded during a build with proper
# site configuration.
gem "jekyll-gist"
gem "jekyll-coffeescript"
gem "jekyll-seo-tag", "~> 1.5"
gem "some-other-jekyll-plugin"
# A dependency of a custom-plugin inside `_plugins` directory.
gem "nokogiri", "~> 1.11"
```
The gems listed in the Gemfile can be collectively installed by simply running `bundle install`.
### The `:jekyll_plugins` Gemfile group
{: #the-jekyll_plugins-group}
Jekyll gives a special treatment to gems listed as part of the `:jekyll_plugins` group in a Gemfile. Any gem under this group is loaded at
the very beginning of any Jekyll process, irrespective of the `--safe` CLI flag or entries in the configuration file(s).
While this route allows one to enhance Jekyll's CLI with additional subcommands and options, or avoid having to list gems in the configuration
file, the downside is the necessity to be mindful of what gems are included in the group. For example:
```ruby
source "https://rubygems.org"
# Use the latest version.
gem "jekyll"
# The theme of current site, locked to a certain version.
gem "minima", "2.4.1"
# Plugins of this site loaded only if configured correctly.
gem "jekyll-gist"
gem "jekyll-coffeescript"
# Gems loaded irrespective of site configuration.
group :jekyll_plugins do
gem "jekyll-cli-plus"
gem "jekyll-seo-tag", "~> 1.5"
gem "some-other-jekyll-plugin"
end
```
Now you need to install all plugins from your Bundler group by running single command `bundle install`.
<div class="note info">
<h5>Plugins on GitHub Pages</h5>
<p>
<a href="https://pages.github.com/">GitHub Pages</a> is powered by Jekyll. All GitHub Pages sites are generated using the
<code>--safe</code> option to disable plugins (with the exception of some
<a href="https://pages.github.com/versions">whitelisted plugins</a>) for security reasons. Unfortunately, this means your plugins won't
work if youre deploying via GitHub Pages.<br><br>
You can still use GitHub Pages to publish your site, but youll need to build the site locally and push the generated files to your
GitHub repository instead of the Jekyll source files.
<a href="https://pages.github.com/">GitHub Pages</a> is powered by Jekyll.
All Pages sites are generated using the <code>--safe</code> option
to disable plugins (with the exception of some
<a href="https://pages.github.com/versions">whitelisted plugins</a>) for
security reasons. Unfortunately, this means
your plugins wont work if youre deploying to GitHub Pages.<br><br>
You can still use GitHub Pages to publish your site, but youll need to
convert the site locally and push the generated static files to your GitHub
repository instead of the Jekyll source files.
</p>
</div>
<div class="note">
<h5>
<code>_plugins</code>, <code>_config.yml</code> and <code>Gemfile</code> can be used simultaneously
<code>_plugins</code>, <code>_config.yml</code> and <code>Gemfile</code>
can be used simultaneously
</h5>
<p>
You may use any of the aforementioned plugin routes simultaneously in the same site if you so choose.
Use of one does not restrict the use of the others.
You may use any of the aforementioned plugin options simultaneously in the
same site if you so choose. Use of one does not restrict the use of the
others.
</p>
</div>
### The jekyll_plugins group
Jekyll gives this particular group of gems in your `Gemfile` a different
treatment. Any gem included in this group is loaded before Jekyll starts
processing the rest of your source directory.
A gem included here will be activated even if its not explicitly listed under
the `plugins:` key in your site's config file.
{: .note .warning}
Gems included in the <code>:jekyll-plugins</code> group are activated
regardless of the <code>--safe</code> mode setting. Be aware of which
gems are included under this group!

View File

@@ -1,36 +0,0 @@
---
title: Security Policy
permalink: "/docs/security/"
note: This file is autogenerated. Edit /.github/SECURITY.markdown instead.
---
## Supported Versions
Security updates are applied to the latest MINOR version of Jekyll, and the version used by GitHub Pages, v3.9.x.
| Version | Supported |
| ------- | ------------------ |
| 4.2.x | :white_check_mark: |
| 3.9.x | :white_check_mark: |
| < 3.9.x | :x: |
## Reporting a Vulnerability
Please report vulnerabilities by sending an email to security@jekyllrb.com with the following information:
1. A description of the vulnerability
2. Reproduction steps and/or a sample site (share a private repo to the [Jekyll Security Team](docs/pages/team.md))
3. Your contact information
The Jekyll security team will respond to your submission and notify you whether it has been confirmed by the team.
Your confidentiality is kindly requested as we work on a fix. We will provide our patch to you to test and verify that the vulnerability has
been closed.
If you have created a patch and would like to submit that to us as well, we will happily consider it though we cannot guarantee that we will
use it. If we use your patch, we will attribute authorship to you either as the commit author, or as a co-author.
Once a fix is verified, we will release PATCH versions of the supported MINOR versions and assign a CVE to the vulnerability. You will receive
credit in our release post.
Once the patched version has been released, we will no longer request you to maintain confidentiality and you may choose to share details on
how you found the vulnerability with the community.

View File

@@ -12,7 +12,7 @@ If you're looking for support for Jekyll, there are a lot of options:
* Read [Jekyll Documentation](https://jekyllrb.com/docs/home/)
* If you have a question about using Jekyll, start a discussion on [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll)
* Chat with Jekyllers &mdash; Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc:irc.freenode.net/jekyll)
* Chat with Jekyllers &mdash; Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc://irc.freenode.net/jekyll)
There are a bunch of helpful community members on these services that should be willing to point you in the right direction.

View File

@@ -21,7 +21,7 @@ See also: [resources](/resources/).
When you [create a new Jekyll site](/docs/) (by running the `jekyll new <PATH>` command), Jekyll installs a site that uses a gem-based theme called [Minima](https://github.com/jekyll/minima).
With gem-based themes, some of the site's directories (such as the `assets`, `_data`, `_layouts`, `_includes`, and `_sass` directories) are stored in the theme's gem, hidden from your immediate view. Yet all of the necessary directories will be read and processed during Jekyll's build process.
With gem-based themes, some of the site's directories (such as the `assets`, `_layouts`, `_includes`, and `_sass` directories) are stored in the theme's gem, hidden from your immediate view. Yet all of the necessary directories will be read and processed during Jekyll's build process.
In the case of Minima, you see only the following files in your Jekyll site directory:
@@ -46,7 +46,7 @@ The goal of gem-based themes is to allow you to get all the benefits of a robust
## Overriding theme defaults
Jekyll themes set default data, layouts, includes, and stylesheets. However, you can override any of the theme defaults with your own site content.
Jekyll themes set default layouts, includes, and stylesheets. However, you can override any of the theme defaults with your own site content.
To replace layouts or includes in your theme, make a copy in your `_layouts` or `_includes` directory of the specific file you wish to modify, or create the file from scratch giving it the same name as the file you wish to override.
@@ -117,7 +117,6 @@ To modify any stylesheet you must take the extra step of also copying the main s
Jekyll will look first to your site's content before looking to the theme's defaults for any requested file in the following folders:
- `/assets`
- `/_data`
- `/_layouts`
- `/_includes`
- `/_sass`
@@ -127,49 +126,6 @@ Note that making copies of theme files will prevent you from receiving any theme
{: .note .info}
Refer to your selected theme's documentation and source repository for more information on which files you can override.
### Themes with `_data` directory {%- include docs_version_badge.html version="4.3.0" -%}
{: #themes-with-data-directory }
Starting with version 4.3.0, Jekyll also takes into account the `_data` directory of themes. This allows data to be distributed across themes.
A typical example is text used within design elements.
Imagine a theme provides the include file `testimonials.html`. This design element creates a new section on the page, and puts a h3 heading over the list of testimonials.
A theme developer will probably formulate the heading in English and put it directly into the HTML source code.
Consumers of the theme can copy the included file into their project and replace the heading there.
With the consideration of the `_data` directory there is another solution for this standard task.
Instead of entering the text directly into the design template, the designer adds a reference to a text catalog (e.g. `site.data.i18n.testimonials.header`) and create a file `_data/i18n/testimonials.yml` in the data directory of the theme.
In this file the header is put under the key `header` and Jekyll takes care of the rest.
For theme developers, this, at first sight, is of course a bigger effort than before.
However, for the consumers of the theme, the customization is greatly simplified.
Imagine the theme is used by a customer from Germany. In order for her to get the translated header for the testimonials design element in, she just has to create a data file in her project directory with the key `site.data.i18n.testimonials.header`, put the German translation or a header of her choice on top of it and the design element is already customized.
She no longer has to copy the included file into her project directory, customize it there and, what weighs heaviest, waiver all updates of the theme, simply because the theme developer offered her the possibility to make changes to text modules centrally via text files.
{: .note .warning}
Data files provide a high degree of flexibility. The place where theme developers put text modules may differ from that of the consumer of the theme which can cause unforeseen troubles!
Related to above example the overriding key `site.data.i18n.testimonials.header` from the theme's `_data/i18n/testimonials.yml` file on the consumer site can be located in three different locations:
- `_data/i18n.yml` with key `testimonials.header`
- `_data/i18n/testimonials.yml` with key `header` (which mirrors the layout of the given example)
- `_data/i18n/testimonials/header.yml` without any key, the headline can go straight into the file
Theme developers should have this ambiguity in mind, when supporting consumers that feel lost in setting their text modules for the design elements the theme provides.
{: .note .info}
When using the data feature ask yourself, is the key that you introduce something that changes the behaviour of the theme when present or not, or is it just data that's displayed anyway. If it's changing the behaviour of the theme it should go into `site.config` otherwise it's fine to be provided via `site.data`.
Bundling data that modifies the behavior of a theme is considered an **anti-pattern** whose use is strongly discouraged. It is solely up to the author of the theme to ensure that every provided data can be easily overridden by the consumer of the theme if they desire to.
## Converting gem-based themes to regular themes
Suppose you want to get rid of the gem-based theme and convert it to a regular theme, where all files are present in your Jekyll site directory, with nothing stored in the theme gem.

View File

@@ -1,30 +0,0 @@
---
title: "Jekyll 4.2.2 Released"
date: 2022-03-03 19:15:20 +0530
author: ashmaroli
version: 4.2.2
category: release
---
Hello Jekyllers!
Jekyll 4.2.2 has been released. Unlike prior releases, this is a simple maintenance release and may be skipped.
For those who are still curious about the current release, here is some technical context: The previous `jekyll-4.2.1` package was built and
published using a Windows system. A side-effect of that action was that every file bundled into the gem ended up with Windows-style CRLF
line-endings instead of Unix-style LF line-endings.
For our end-users, this difference holds no significance. However, a third-party entity vendoring the release faced a roadblock. The executable
program `jekyll` apparently misplaced the executable bit because of the change in line-endings.
To that end, the Jekyll team decided to use the GitHub Actions service to build and publish releases. In-house plugins have already published
releases via this route serving as trials. Henceforth, and unless explicitly reported, all Jekyll releases will be built on GitHub Actions'
Ubuntu platform and published to Rubygems by @jekyllbot irrespective of the maintainer overseeing the release.
That is all for now.
Happy Jekyllin'!!
*P.S.: Jekyll 4.3.0 will be bringing you some new features very soon.. Also, our sass-converter plugin has been [enhanced][sass-220] to support
modern improvements to Sass.*
[sass-220]: https://github.com/jekyll/jekyll-sass-converter/tree/v2.2.0#sass-embedded

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

@@ -83,4 +83,4 @@
}
}
.language-sh .highlight * { color: #eaeaea }
.language-sh .highlight * { color: #ffffff }

View File

@@ -1252,11 +1252,9 @@ p.note {
}
.language-sh {
margin-top: 5px;
margin-bottom: 5px;
position: relative;
&:before {
display: inline-table;
display: table;
padding: 8px;
width: 100%;
padding: 5px 0;
@@ -1269,28 +1267,20 @@ p.note {
background-image: -webkit-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
background-image: -moz-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
background-image: -o-linear-gradient(top, #f7f7f7 0%, #cfcfcf 7%, #aaaaaa 100%);
background-image: linear-gradient(to bottom, #ddd 0%,#999 84%,#bbb 100%);
background-image: linear-gradient(top, #f7f7f7 0%,#cfcfcf 7%,#aaaaaa 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#aaaaaa',GradientType=0 );
border-bottom: 1px solid #111;
text-align: center;
content: "terminal";
@include border-radius(3px 3px 0 0);
@include border-radius(5px 5px 0 0);
@include box-shadow(0 3px 10px rgba(0,0,0,.5));
}
.highlight {
@include border-radius(0 0 3px 3px);
}
div.highlight {
border: 1px solid;
border-color: transparent #bbb #bbb #bbb;
@include box-shadow(0 3px 10px rgba(0,0,0,.5));
@include border-radius(0 0 5px 5px);
}
pre.highlight {
min-height: 48px;
background: #1c1c1c;
}
code {
font-size: 15px
}
}
.showcase {

View File

@@ -1 +1 @@
4.2.2
4.2.1

View File

@@ -44,6 +44,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site
- [Forestry.io](https://forestry.io/): A free Git-based responsive CMS, with content modeling and instant previews.
- [Netlify CMS](https://www.netlifycms.org/): Open source content management for your Git workflow
- [Siteleaf](https://www.siteleaf.com/): Built for developers, Loved by everyone
- [Statictastic](https://www.statictastic.com/): Static site hosting, publishing and content management for teams
- [Kentico Kontent](https://github.com/Kentico/kontent-jekyll): A headless CMS with full control over content presentation
### E-commerce
@@ -69,7 +70,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site
- [Algolia](https://blog.algolia.com/instant-search-blog-documentation-jekyll-plugin/): Add a powerful instant search to your Jekyll site
- [Elastic Site Search](http://elastic.co/products/site-search/service?ultron=resources&blade=jekyll&hulk=referral): Another option for adding search to your Jekyll site, built on Elasticsearch
- [Bonsai Search](https://docs.bonsai.io/article/217-jekyll): The easiest way to use Elasticsearch for your Jekyll site
- [CloudSh](https://cloudsh.com/generators/how-to-setup-search-on-jekyll/): Website search with a few lines of JavaScript
- [CloudSh](https://cloudsh.com/generators/How-to-setup-search-on-Jekyll/): Website search with a few lines of JavaScript
## Editors plugins

View File

@@ -12,15 +12,6 @@ community around the Jekyll ecosystem thrive._
* Ashwin (@ashmaroli)
* Matt (@mattr-)
## Security Team
_The Jekyll Security Team's responsibility is to triage, validate, and
patch security vulnerabilities reported to them._
* Parker (@parkr)
* Ashwin (@ashmaroli)
* Matt (@mattr-)
## Emeritus Core Team Members
_Emeritus Core Team Members were once members of Jekyll's Core Team._

View File

@@ -27,18 +27,6 @@ Feature: Post data
And the _site directory should exist
And I should see "Post url: /2009/03/27/star-wars.html" in "_site/2009/03/27/star-wars.html"
Scenario: Use page.name variable
Given I have a _posts directory
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Page name: {{ page.name }}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Page name: 2009-03-27-star-wars.markdown" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.date variable
Given I have a _posts directory
And I have a _layouts directory
@@ -394,35 +382,3 @@ Scenario: Use page.render_with_liquid variable
And the _site directory should exist
And I should see "next post: Some like it hot" in "_site/2009/03/27/star-wars.html"
And I should see "Previous post: Some like it hot" in "_site/2009/05/27/terminator.html"
Scenario: Deprecate calling data keys directly via Ruby
Given I have a _posts directory
And I have a _plugins directory
And I have the following post:
| title | date | content |
| My post | 2016-01-21 | Luke, I am your father. |
And I have a "_plugins/foo.rb" file with content:
"""
Jekyll::Hooks.register :documents, :pre_render do |doc|
doc.title
end
"""
And I have a "_plugins/bar.rb" file with content:
"""
module FooBar
def self.dummy?(doc)
doc.title == "Dummy Document"
end
end
Jekyll::Hooks.register :documents, :post_render do |doc|
FooBar.dummy?(doc)
end
"""
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Deprecation: Document#title" in the build output
And I should see "_plugins/foo.rb:2" in the build output
And I should see "_plugins/bar.rb:3" in the build output
But I should not see "lib/jekyll/document.rb" in the build output

View File

@@ -291,28 +291,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

@@ -41,33 +41,6 @@ Feature: Writing themes
And I should see "I'm in the project." in "_site/index.html"
And I should see "<span class=\"sample\">include.html from test-theme</span>" in "_site/index.html"
Scenario: A theme without data
Given I have a configuration file with "theme" set to "test-theme-skinny"
And I have a _data directory
And I have a "_data/greetings.yml" file with content:
"""
foo: "Hello! Im foo. And who are you?"
"""
And I have an "index.html" page that contains "{{ site.data.greetings.foo }}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Hello! Im foo. And who are you?" in "_site/index.html"
Scenario: A theme with data overridden by data in source directory
Given I have a configuration file with "theme" set to "test-theme"
And I have a _data directory
And I have a "_data/greetings.yml" file with content:
"""
foo: "Hello! Im foo. And who are you?"
"""
And I have an "index.html" page that contains "{{ site.data.greetings.foo }}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Hello! Im foo. And who are you?" in "_site/index.html"
And I should not see "Hello! Im bar. Whats up so far?" in "_site/index.html"
Scenario: A theme with a layout
Given I have a configuration file with "theme" set to "test-theme"
And I have an _layouts directory
@@ -133,19 +106,3 @@ Feature: Writing themes
And I should see "default.html from test-theme:" in "_site/2016/04/21/entry1.html"
And I should see "I am using a local layout." in "_site/2016/04/21/entry1.html"
And I should see "I am a post layout!" in "_site/2016/04/21/entry1.html"
Scenario: Complicated site that puts it all together in respect to data folders
Given I have a configuration file with "theme" set to "test-theme"
And I have a _data directory
And I have a "_data/i18n.yml" file with content:
"""
testimonials:
header: Kundenstimmen
"""
And I have an "index.html" page that contains "{% include testimonials.html %}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should not see "Testimonials" in "_site/index.html"
And I should see "Kundenstimmen" in "_site/index.html"
And I should see "Design by FTC" in "_site/index.html"

View File

@@ -40,14 +40,9 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("jekyll-watch", "~> 2.0")
s.add_runtime_dependency("kramdown", "~> 2.3", ">= 2.3.1")
s.add_runtime_dependency("kramdown-parser-gfm", "~> 1.0")
s.add_runtime_dependency("liquid", ">= 4.0", "< 6.0")
s.add_runtime_dependency("liquid", "~> 4.0")
s.add_runtime_dependency("mercenary", ">= 0.3.6", "< 0.5")
s.add_runtime_dependency("pathutil", "~> 0.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.
s.add_runtime_dependency("psych", "~> 3.3")
s.add_runtime_dependency("rouge", "~> 3.0")
s.add_runtime_dependency("safe_yaml", "~> 1.0")
s.add_runtime_dependency("terminal-table", ">= 1.8", "< 4.0")

View File

@@ -65,7 +65,6 @@ module Jekyll
read_static_file(file_path, full_path)
end
end
site.static_files.concat(files) unless files.empty?
sort_docs!
end

View File

@@ -92,16 +92,13 @@ module Jekyll
# 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", "~> 1.2"
gem "tzinfo-data"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# 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

@@ -144,9 +144,9 @@ module Jekyll
@reload_reactor = LiveReloadReactor.new
Jekyll::Hooks.register(:site, :post_render) do |site|
@changed_pages = []
site.each_site_file do |item|
@changed_pages << item if site.regenerator.regenerate?(item)
regenerator = Jekyll::Regenerator.new(site)
@changed_pages = site.pages.select do |p|
regenerator.regenerate?(p)
end
end
@@ -194,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"]),
@@ -354,10 +353,6 @@ module Jekyll
WEBrick::HTTPUtils.load_mime_types(file)
end
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

@@ -72,7 +72,8 @@ module Jekyll
:liveCSS => true
)
Jekyll.logger.debug "LiveReload:", "Reloading URL #{p.url.inspect}"
Jekyll.logger.debug "LiveReload:", "Reloading #{p.url}"
Jekyll.logger.debug "", json_message
@websockets.each { |ws| ws.send(json_message) }
end
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

@@ -134,7 +134,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
@@ -174,7 +173,7 @@ module Jekyll
end
end
conditionally_inject_charset(res)
validate_and_ensure_charset(req, res)
res.header.merge!(@headers)
rtn
end
@@ -182,16 +181,13 @@ module Jekyll
private
# 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)
def validate_and_ensure_charset(_req, res)
key = res.header.keys.grep(%r!content-type!i).first
typ = res.header[key]
res.header["content-type"] = "#{typ}; charset=#{@jekyll_opts["encoding"]}"
unless %r!;\s*charset=!.match?(typ)
res.header[key] = "#{typ}; charset=#{@jekyll_opts["encoding"]}"
end
end
def set_defaults

View File

@@ -406,8 +406,9 @@ module Jekyll
# Override of method_missing to check in @data for the key.
def method_missing(method, *args, &blck)
if data.key?(method.to_s)
Jekyll::Deprecator.deprecation_message "Document##{method} is now a key in the #data hash."
Jekyll.logger.warn "", "Called by #{caller(1..1)[0]}."
Jekyll::Deprecator.deprecation_message "Document##{method} is now a key "\
"in the #data hash."
Jekyll::Deprecator.deprecation_message "Called by #{caller(0..0)}."
data[method.to_s]
else
super

View File

@@ -12,7 +12,6 @@ module Jekyll
mutable false
delegate_method_as :relative_path, :path
delegate_method_as :basename, :name
private delegate_method_as :data, :fallback_data
delegate_methods :id, :output, :content, :to_s, :relative_path, :url, :date

View File

@@ -14,10 +14,6 @@ module Jekyll
def excerpt
nil
end
def name
@obj.doc.basename
end
end
end
end

View File

@@ -86,10 +86,14 @@ module Jekyll
end
# --
# Check if given path is outside of current site's configured source directory.
# NOTE: Pathutil#in_path? gets the realpath.
# @param [<Anything>] entry the entry you want to validate.
# Check if a path is outside of our given root.
# --
def symlink_outside_site_source?(entry)
!File.realpath(entry).start_with?(site.in_source_dir)
!Pathutil.new(entry).in_path?(
site.in_source_dir
)
end
# Check if an entry matches a specific pattern.

View File

@@ -398,17 +398,11 @@ module Jekyll
# `where` filter helper
#
def compare_property_vs_target(property, target)
# Liquid v4 handles 'empty' and 'blank' keywords separately from v5.
# Delete when we remove Liquid v5 support.
if Liquid::VERSION.start_with?("4.") && target.is_a?(Liquid::Expression::MethodLiteral)
target = target.to_s
return true if property == target || Array(property).join == target
end
case target
when NilClass
return true if property.nil?
when "", Liquid::Expression::MethodLiteral # empty/blank hashes and arrays will match this
when Liquid::Expression::MethodLiteral # `empty` or `blank`
target = target.to_s
return true if property == target || Array(property).join == target
else
target = target.to_s

View File

@@ -19,10 +19,8 @@ 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
@@ -32,7 +30,6 @@ 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/geo+json geojson
@@ -45,7 +42,7 @@ 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
@@ -61,10 +58,9 @@ 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
@@ -73,28 +69,28 @@ 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/mrb-consumer+xml xdf
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
@@ -108,7 +104,7 @@ 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 owl
application/reginfo+xml rif
application/relax-ng-compact-syntax rnc
application/resource-lists+xml rl
@@ -134,7 +130,7 @@ application/sensml+xml sensml
application/set-payment-initiation setpay
application/set-registration-initiation setreg
application/shf+xml shf
application/sieve sieve siv
application/sieve siv sieve
application/smil+xml smi smil
application/sparql-query rq
application/sparql-results+xml srx
@@ -148,7 +144,6 @@ application/tei+xml tei te
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
@@ -162,13 +157,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
@@ -198,7 +192,7 @@ 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
@@ -217,10 +211,10 @@ 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 +236,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 +285,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 +305,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 +317,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 +330,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 +350,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 +363,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 +380,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
@@ -431,7 +424,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,7 +436,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.quark.quarkxpress qxd qxt qwd qwt qxl qxb
application/vnd.rar rar
application/vnd.realvnc.bed bed
application/vnd.recordare.musicxml mxl
@@ -466,7 +459,7 @@ application/vnd.simtech-mindmapper twd tw
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
@@ -496,7 +489,7 @@ 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 +500,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
@@ -532,7 +525,6 @@ application/vnd.zul zir zi
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 +533,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 +553,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
@@ -574,7 +566,7 @@ application/x-font-ghostscript gsf
application/x-font-linux-psf psf
application/x-font-pcf pcf
application/x-font-snf snf
application/x-font-type1 afm pfa pfb pfm
application/x-font-type1 pfa pfb pfm afm
application/x-freearc arc
application/x-futuresplash spl
application/x-gca-compressed gca
@@ -590,10 +582,10 @@ 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,15 +595,15 @@ 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
@@ -637,7 +629,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,7 +642,7 @@ 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
@@ -659,31 +651,29 @@ application/x-zmachine z1 z2
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/midi mid midi kar rmi
audio/mobile-xmf mxmf
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 opus
audio/s3m s3m
audio/silk sil
audio/vnd.dece.audio uva uvva
@@ -700,14 +690,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
@@ -723,8 +713,6 @@ 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
@@ -741,11 +729,11 @@ image/hsj2 hsj2
image/ief ief
image/jls jls
image/jp2 jp2 jpg2
image/jpeg jpe jpeg jpg
image/jpeg jpeg jpg jpe
image/jph jph
image/jphc jhc
image/jpm jpm
image/jpx jpf jpx
image/jpx jpx jpf
image/jxr jxr
image/jxra jxra
image/jxrs jxrs
@@ -765,8 +753,8 @@ image/tiff tif ti
image/tiff-fx tfx
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
@@ -790,10 +778,10 @@ 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-jng jng
image/x-mrsid-image sid
image/x-pict pct pic
image/x-pict pic pct
image/x-portable-anymap pnm
image/x-portable-bitmap pbm
image/x-portable-graymap pgm
@@ -813,12 +801,9 @@ 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/iges igs iges
model/mesh msh mesh silo
model/mtl mtl
model/step+xml stpx
model/step+zip stpz
model/step-xml+zip stpxz
model/vnd.collada+xml dae
model/vnd.dwf dwf
model/vnd.gdl gdl
@@ -827,11 +812,10 @@ 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,7 +824,7 @@ text/calendar ics if
text/coffeescript coffee litcoffee
text/css css
text/csv csv
text/html htm html shtml
text/html html htm shtml
text/jade jade
text/jsx jsx
text/less less
@@ -848,16 +832,16 @@ text/markdown markdo
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/sgml sgml sgm
text/shex shex
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 +849,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 +858,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 +884,14 @@ video/3gpp2 3g2
video/h261 h261
video/h263 h263
video/h264 h264
video/iso.segment m4s
video/jpeg jpgv
video/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 +899,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 +908,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

@@ -16,26 +16,9 @@ module Jekyll
read_directories
read_included_excludes
sort_files!
@site.data = DataReader.new(site).read(site.config["data_dir"])
CollectionReader.new(site).read
ThemeAssetsReader.new(site).read
read_data
end
# Read and merge the data files.
# If a theme is specified and it contains data, it will be read.
# Site data will overwrite theme data with the same key using the
# semantics of Utils.deep_merge_hashes.
#
# Returns nothing.
def read_data
@site.data = DataReader.new(site).read(site.config["data_dir"])
return unless site.theme&.data_path
theme_data = DataReader.new(
site,
:in_source_dir => site.method(:in_theme_dir)
).read(site.theme.data_path)
@site.data = Jekyll::Utils.deep_merge_hashes(theme_data, @site.data)
end
# Sorts posts, pages, and static files.

View File

@@ -4,12 +4,11 @@ module Jekyll
class DataReader
attr_reader :site, :content
def initialize(site, in_source_dir: nil)
def initialize(site)
@site = site
@content = {}
@entry_filter = EntryFilter.new(site)
@in_source_dir = in_source_dir || @site.method(:in_source_dir)
@source_dir = @in_source_dir.call("/")
@source_dir = site.in_source_dir("/")
end
# Read all the files in <dir> and adds them to @content
@@ -19,7 +18,7 @@ module Jekyll
# Returns @content, a Hash of the .yaml, .yml,
# .json, and .csv files in the base directory
def read(dir)
base = @in_source_dir.call(dir)
base = site.in_source_dir(dir)
read_data_to(base, @content)
@content
end
@@ -39,7 +38,7 @@ module Jekyll
end
entries.each do |entry|
path = @in_source_dir.call(dir, entry)
path = @site.in_source_dir(dir, entry)
next if @entry_filter.symlink?(path)
if File.directory?(path)
@@ -59,9 +58,14 @@ module Jekyll
case File.extname(path).downcase
when ".csv"
CSV.read(path, **csv_config).map { |row| convert_row(row) }
CSV.read(path,
:headers => true,
:encoding => site.config["encoding"]).map(&:to_hash)
when ".tsv"
CSV.read(path, **tsv_config).map { |row| convert_row(row) }
CSV.read(path,
:col_sep => "\t",
:headers => true,
:encoding => site.config["encoding"]).map(&:to_hash)
else
SafeYAML.load_file(path)
end
@@ -71,43 +75,5 @@ module Jekyll
name.gsub(%r![^\w\s-]+|(?<=^|\b\s)\s+(?=$|\s?\b)!, "")
.gsub(%r!\s+!, "_")
end
private
# @return [Hash]
def csv_config
@csv_config ||= read_config("csv_reader")
end
# @return [Hash]
def tsv_config
@tsv_config ||= read_config("tsv_reader", { :col_sep => "\t" })
end
# @param config_key [String]
# @param overrides [Hash]
# @return [Hash]
# @see https://ruby-doc.org/stdlib-2.5.0/libdoc/csv/rdoc/CSV.html#Converters
def read_config(config_key, overrides = {})
reader_config = config[config_key] || {}
defaults = {
:converters => reader_config.fetch("csv_converters", []).map(&:to_sym),
:headers => reader_config.fetch("headers", true),
:encoding => reader_config.fetch("encoding", config["encoding"]),
}
defaults.merge(overrides)
end
def config
@config ||= site.config
end
# @param row [Array, CSV::Row]
# @return [Array, Hash]
def convert_row(row)
row.instance_of?(CSV::Row) ? row.to_hash : row
end
end
end

View File

@@ -343,13 +343,6 @@ module Jekyll
documents.select(&:write?)
end
# Get the to be written static files
#
# Returns an Array of StaticFiles which should be written
def static_files_to_write
static_files.select(&:write?)
end
# Get all the documents
#
# Returns an Array of all Documents
@@ -360,7 +353,7 @@ module Jekyll
end
def each_site_file
%w(pages static_files_to_write docs_to_write).each do |type|
%w(pages static_files docs_to_write).each do |type|
send(type).each do |item|
yield item
end

View File

@@ -43,10 +43,6 @@ module Jekyll
@assets_path ||= path_for "assets"
end
def data_path
@data_path ||= path_for "_data"
end
def runtime_dependencies
gemspec.runtime_dependencies
end

View File

@@ -3,7 +3,7 @@
module Jekyll
class ThemeBuilder
SCAFFOLD_DIRECTORIES = %w(
assets _data _layouts _includes _sass
assets _layouts _includes _sass
).freeze
attr_reader :name, :path, :code_of_conduct

View File

@@ -304,15 +304,12 @@ module Jekyll
# and a given param
def merged_file_read_opts(site, opts)
merged = (site ? site.file_read_opts : {}).merge(opts)
# always use BOM when reading UTF-encoded files
if merged[:encoding]&.downcase&.start_with?("utf-")
if merged[:encoding] && !merged[:encoding].start_with?("bom|")
merged[:encoding] = "bom|#{merged[:encoding]}"
end
if merged["encoding"]&.downcase&.start_with?("utf-")
if merged["encoding"] && !merged["encoding"].start_with?("bom|")
merged["encoding"] = "bom|#{merged["encoding"]}"
end
merged
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: http://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
sign = difference.negative? ? "-" : "+"
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("%<hour>02d", :hour => 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 = "4.2.2"
VERSION = "4.2.1"
end

View File

@@ -6,6 +6,7 @@ To experiment with this code, add some sample content and run `bundle exec jekyl
TODO: Delete this and the text above, and describe your gem
## Installation
Add this line to your Jekyll site's `Gemfile`:
@@ -34,7 +35,7 @@ TODO: Write usage instructions here. Describe your available layouts, includes,
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/<%= theme_name %>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## Development
@@ -48,3 +49,4 @@ To add a custom directory to your theme-gem, please edit the regexp in `<%= them
## License
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

View File

@@ -7,7 +7,7 @@
#############################################################################
namespace :site do
task :generated_pages => [:history, :latest_version, :conduct, :contributing, :security, :support]
task :generated_pages => [:history, :latest_version, :conduct, :contributing, :support]
desc "Generate and view the site locally"
task :preview => :generated_pages do
@@ -71,7 +71,7 @@ namespace :site do
"redirect_from" => "/conduct/index.html",
"editable" => false,
}
siteify_file(".github/CODE_OF_CONDUCT.markdown", front_matter)
siteify_file("CODE_OF_CONDUCT.markdown", front_matter)
end
desc "Copy the contributing file"
@@ -84,11 +84,6 @@ namespace :site do
siteify_file(".github/SUPPORT.markdown", "title" => "Support")
end
desc "Copy the security policy"
task :security do
siteify_file(".github/SECURITY.markdown", "title" => "Security Policy")
end
desc "Write the latest Jekyll version"
task :latest_version do
next if version =~ %r!(beta|rc|alpha)!i

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,30 +23,13 @@ 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"
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.sort.join(" ")}" }.join("\n")
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,3 +0,0 @@
id,field_a
1,"foo"
2,"bar"
1 id field_a
2 1 foo
3 2 bar

View File

@@ -1,3 +0,0 @@
id field_a
1 "foo"
2 "bar"
1 id field_a
2 1 foo
3 2 bar

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,11 +0,0 @@
# frozen_string_literal: true
Gem::Specification.new do |s|
s.name = "test-theme-w-empty-data"
s.version = "0.1.0"
s.licenses = ["MIT"]
s.summary = "This is a theme with just one layout and an empty _data folder used to test Jekyll"
s.authors = ["Jekyll"]
s.files = ["lib/example.rb"]
s.homepage = "https://github.com/jekyll/jekyll"
end

View File

@@ -1,6 +0,0 @@
manufacturer: Mercedes
models:
- model: A-Klasse
price: 32,000.00
- model: B-Klasse
price: 35,000.00

View File

@@ -1,6 +0,0 @@
name: Cheese Dairy
products:
- name: spread cheese
price: 1.2
- name: cheddar cheese
price: 4.5

View File

@@ -1 +0,0 @@
foo: "Hello! Im bar. Whats up so far?"

View File

@@ -1,2 +0,0 @@
header: Testimonials
footer: Design by FTC

View File

@@ -1,9 +0,0 @@
<section class="testimonials">
<h3>{{ site.data.i18n.testimonials.header }}</h3>
<!-- for testimonial in site.data.testimonial }} -->
<!-- endfor -->
<footer class="testimonials-footer">
{{ site.data.i18n.testimonials.footer }}
</footer>
</section>

View File

@@ -245,7 +245,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 +0,0 @@
foo: "Hello! Im foo. And who are you?"

View File

@@ -1,3 +0,0 @@
testimonials:
header: Kundenstimmen
# footer omitted by design

View File

@@ -130,7 +130,6 @@ class TestCollections < JekyllUnitTest
assert @site.collections["methods"].docs.is_a? Array
@site.collections["methods"].docs.each do |doc|
assert doc.is_a? Jekyll::Document
# rubocop:disable Style/WordArray
assert_includes %w(
_methods/configuration.md
_methods/sanitized_path.md
@@ -143,7 +142,6 @@ class TestCollections < JekyllUnitTest
_methods/3940394-21-9393050-fifif1323-test.md
_methods/trailing-dots...md
), doc.relative_path
# rubocop:enable Style/WordArray
end
end

View File

@@ -14,47 +14,4 @@ class TestDataReader < JekyllUnitTest
)
end
end
context "with no csv options set" do
setup do
@reader = DataReader.new(fixture_site)
@parsed = [{ "id" => "1", "field_a" => "foo" }, { "id" => "2", "field_a" => "bar" }]
end
should "parse CSV normally" do
assert_equal @parsed, @reader.read_data_file(File.expand_path("fixtures/sample.csv", __dir__))
end
should "parse TSV normally" do
assert_equal @parsed, @reader.read_data_file(File.expand_path("fixtures/sample.tsv", __dir__))
end
end
context "with csv options set" do
setup do
reader_config = {
"csv_converters" => [:numeric],
"headers" => false,
}
@reader = DataReader.new(
fixture_site(
{
"csv_reader" => reader_config,
"tsv_reader" => reader_config,
}
)
)
@parsed = [%w(id field_a), [1, "foo"], [2, "bar"]]
end
should "parse CSV with options" do
assert_equal @parsed, @reader.read_data_file(File.expand_path("fixtures/sample.csv", __dir__))
end
should "parse TSV with options" do
assert_equal @parsed, @reader.read_data_file(File.expand_path("fixtures/sample.tsv", __dir__))
end
end
end

View File

@@ -37,7 +37,6 @@ class TestFilters < JekyllUnitTest
context "filters" do
setup do
@sample_time = Time.utc(2013, 3, 27, 11, 22, 33)
@timezone_before_test = ENV["TZ"]
@filter = make_filter_mock(
"timezone" => "UTC",
"url" => "http://example.com",
@@ -56,10 +55,6 @@ class TestFilters < JekyllUnitTest
]
end
teardown do
ENV["TZ"] = @timezone_before_test
end
should "markdownify with simple string" do
assert_equal(
"<p>something <strong>really</strong> simple</p>\n",
@@ -665,7 +660,6 @@ class TestFilters < JekyllUnitTest
should "convert drop to json" do
@filter.site.read
expected = {
"name" => "2008-02-02-published.markdown",
"path" => "_posts/2008-02-02-published.markdown",
"previous" => nil,
"output" => nil,
@@ -918,13 +912,13 @@ class TestFilters < JekyllUnitTest
# `{{ hash | where: 'tags', empty }}`
assert_equal(
[{ "tags" => {} }, { "tags" => "" }, { "tags" => nil }, { "tags" => [] }],
@filter.where(hash, "tags", Liquid::Condition.parse_expression(nil, "empty"))
@filter.where(hash, "tags", Liquid::Expression::LITERALS["empty"])
)
# `{{ `hash | where: 'tags', blank }}`
assert_equal(
[{ "tags" => {} }, { "tags" => "" }, { "tags" => nil }, { "tags" => [] }],
@filter.where(hash, "tags", Liquid::Condition.parse_expression(nil, "blank"))
@filter.where(hash, "tags", Liquid::Expression::LITERALS["blank"])
)
end
@@ -1151,13 +1145,13 @@ class TestFilters < JekyllUnitTest
# `{{ hash | find: 'tags', empty }}`
assert_equal(
{ "tags" => {} },
@filter.find(hash, "tags", Liquid::Condition.parse_expression(nil, "empty"))
@filter.find(hash, "tags", Liquid::Expression::LITERALS["empty"])
)
# `{{ `hash | find: 'tags', blank }}`
assert_equal(
{ "tags" => {} },
@filter.find(hash, "tags", Liquid::Condition.parse_expression(nil, "blank"))
@filter.find(hash, "tags", Liquid::Expression::LITERALS["blank"])
)
end

View File

@@ -241,7 +241,6 @@ class TestSite < JekyllUnitTest
@site.process
# exclude files in symlinked directories here and insert them in the
# following step when not on Windows.
# rubocop:disable Style/WordArray
sorted_pages = %w(
%#\ +.md
.htaccess
@@ -269,7 +268,6 @@ class TestSite < JekyllUnitTest
test-styles.scss
trailing-dots...md
)
# rubocop:enable Style/WordArray
unless Utils::Platforms.really_windows?
# files in symlinked directories may appear twice
sorted_pages.push("main.css.map", "main.scss", "symlinked-file").sort!
@@ -735,13 +733,4 @@ class TestSite < JekyllUnitTest
end
end
end
context "static files in a collection" do
should "be exposed via site instance" do
site = fixture_site("collections" => ["methods"])
site.read
assert_includes site.static_files.map(&:relative_path), "_methods/extensionless_static_file"
end
end
end

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