Compare commits

...

39 Commits

Author SHA1 Message Date
Ashwin Maroli
0420bb1ac2 Update history to reflect merge of #9752 [ci skip] 2025-01-16 17:49:47 +05:30
Ashwin Maroli
a60cf32de3 Backport #9747 for v4.3.x: Bump cucumber to v9 (#9752)
This backports 2db7db7 to 4.3-stable
2025-01-16 17:46:46 +05:30
Ashwin Maroli
7657fed492 Update history to reflect merge of #9744 [ci skip] 2025-01-01 19:53:15 +05:30
Ashwin Maroli
24cb60a98e Backport #9742 for v4.3.x: Add an optional :rdoc group of gems (#9744)
This backports 3689b5b to 4.3-stable
2025-01-01 19:50:25 +05:30
Ashwin Maroli
c72bc33d22 Update history to reflect merge of #9738 [ci skip] 2024-12-27 20:58:41 +05:30
Ashwin Maroli
444c98cd16 Backport #9737 for v4.3.x: Fix expected markup per WAI-ARIA requirements (#9738)
This backports 7072c65 to 4.3-stable
2024-12-27 20:53:32 +05:30
Ashwin Maroli
a09a8dea05 Release 💎 v4.3.4 2024-09-16 21:35:27 +05:30
Ashwin Maroli
4854cab130 Update history to reflect merge of #9684 [ci skip] 2024-09-16 21:31:26 +05:30
Ashwin Maroli
c0a92daf48 Backport #9680 for v4.3.x: Render theme-gem root only in development (#9684)
This backports 32074ef to 4.3-stable
2024-09-16 21:28:06 +05:30
Ashwin Maroli
e139840078 Update history to reflect merge of #9683 [ci skip] 2024-09-16 21:07:58 +05:30
Ashwin Maroli
02d3bf2353 Backport #9662 for v4.3.x: Relax version constraint on wdm in new Gemfile (#9683)
This backports 3a8b282 to 4.3-stable
2024-09-16 21:03:45 +05:30
Ashwin Maroli
e3d4d2eb92 Update history to reflect merge of #9681 [ci skip] 2024-09-16 20:33:02 +05:30
Ashwin Maroli
c5183479e9 Sync workflows with counterparts on master (#9681)
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-09-16 20:20:21 +05:30
Matt Rogers
33a5a803d4 Release 💎 v4.3.3 2023-12-27 12:25:58 -06:00
Matt Rogers
fb364ba91b Merge pull request #9285 from oturpe/ruby-3.2-fix-for-4.3.-stable
Backport #9237 to 4.3-stable "test: use hash explicitly for Struct initializer for ruby 3.2"
2023-12-27 10:31:02 -06:00
Matt Rogers
a6b18000b2 Merge pull request #9510 from ntkme/cherry-pick-fix-ruby-3.3
Cherry pick logger fix for Ruby 3.3
2023-12-27 10:28:16 -06:00
Ashwin Maroli
b52339004e Stop testing with Rubies older than 2.7 on Windows 2023-12-27 03:54:42 -08:00
Ashwin Maroli
935a7a99e2 Lock Ruby in CI to v3.1.2 and bump JRuby to v9.4.0.0 (#9196)
Merge pull request 9196
2023-12-27 02:58:09 -08:00
Matt Rogers
abd2cd9471 Keep activesupport at version 7.0.x (#9469)
Merge pull request 9469
2023-12-27 02:54:04 -08:00
Sutou Kouhei
595cc23067 Add support for upcoming logger 1.4.3 (#9392)
Merge pull request 9392
2023-12-27 02:16:46 -08:00
Mamoru TASAKA
9ff6eb78db test: use hash explicitly for Struct initializer for ruby 3.2 (#9237)
Merge pull request 9237
2023-01-30 08:30:13 +02:00
Ashwin Maroli
3874e124d7 Release 💎 v4.3.2 2023-01-20 23:39:01 +05:30
Ashwin Maroli
2a6efa2373 Update history to reflect merge of #9262 [ci skip] 2023-01-19 17:11:01 +05:30
Ashwin Maroli
e0f339a1e5 Backport #9257 for v4.3.x: Rename sass partial created for new blank site (#9262)
This backports 3a18480 to 4.3-stable
2023-01-19 17:10:41 +05:30
Ashwin Maroli
4df3d241ab Update history to reflect merge of #9256 [ci skip] 2023-01-16 18:01:52 +05:30
Ashwin Maroli
14a9c9c01a Backport #9187 for v4.3.x: Optimize Site#each_site_file (#9256)
This backports b2891a4 to 4.3-stable
2023-01-16 18:00:37 +05:30
Ashwin Maroli
a079df52bd Update history to reflect merge of #9255 [ci skip] 2023-01-16 14:25:52 +05:30
Ashwin Maroli
7a6e0f1802 Backport #9186 for v4.3.x: Remove totals in profile table properly
This backports 82bb271 to 4.3-stable
2023-01-16 14:25:16 +05:30
Ashwin Maroli
da570f02d7 Update history to reflect merge of #9254 [ci skip] 2023-01-15 18:58:22 +05:30
なつき
868d96948b Backport #9223 for 4.3.x
Update sass related tests for jekyll-sass-converter 3.x
This backports 572c86e to 4.3-stable
2023-01-15 18:51:23 +05:30
Ashwin Maroli
a260cabb89 Lock Ruby in CI to v3.1.2 2022-12-18 20:45:46 +05:30
Ashwin Maroli
7979f480b3 Lock psych to v4.x
Psych 5 has stopped bundling `libyaml` and expects it to be installed on the host system
prior to being invoked.
Since we don't have a direct dependency on the Psych gem (it gets included in the gem
bundle as a dependency of the `rdoc` gem), lock psych gem to v4.x instead of installing
`libyaml` in our development / CI environment.
2022-12-18 19:25:30 +05:30
Ashwin Maroli
4d439407a9 Release 💎 v4.3.1 2022-10-26 23:25:48 +05:30
jekyllbot
8810223544 Update history to reflect merge of #9171 [ci skip] 2022-10-26 23:19:17 +05:30
Ashwin Maroli
f519371e5d Release post for v4.3.1 (#9171)
Merge pull request 9171
2022-10-26 23:19:15 +05:30
jekyllbot
e83680e487 Update history to reflect merge of #9170 [ci skip] 2022-10-26 22:08:16 +05:30
Ashwin Maroli
590d0b58b9 Revert "Incrementally rebuild when a data file is changed (#8771)" (#9170)
Merge pull request 9170
2022-10-26 22:08:14 +05:30
jekyllbot
f3fa91e7c7 Update history to reflect merge of #9167 [ci skip] 2022-10-26 22:06:34 +05:30
Ashwin Maroli
6408c0f264 Respect user-defined name attribute in documents (#9167)
Merge pull request 9167
2022-10-26 22:06:32 +05:30
68 changed files with 1163 additions and 690 deletions

2
.github/CODEOWNERS vendored
View File

@@ -65,8 +65,6 @@
# @jekyll/stability
Gemfile @jekyll/stability
*.gemspec @jekyll/stability
.travis.yml @jekyll/stability
appveyor.yml @jekyll/stability
/lib/jekyll/configuration.rb @jekyll/stability
/lib/jekyll/deprecator.rb @jekyll/stability
/lib/jekyll/frontmatter_defaults.rb @jekyll/stability

View File

@@ -11,7 +11,7 @@ See the [support guidelines](https://jekyllrb.com/docs/support/)
Whether you're a developer, a designer, or just a Jekyll devotee, there are lots of ways to contribute. Here's a few ideas:
- [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know.
- Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
- Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a workaround? Do you have a suggestion for how the feature could be better?
- Read through the [documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved.
- Browse through the [Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing.
- Find an [open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions.

View File

@@ -8,8 +8,10 @@ File | Purpose | Format | Info
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[candidate.patterns](candidate.patterns) | Patterns that might be worth adding to [patterns.txt](patterns.txt) | perl regular expression with optional comment block introductions (all matches will be suggested) | [candidates](https://github.com/check-spelling/check-spelling/wiki/Feature:-Suggest-patterns)
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[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)
[advice.md](advice.md) | 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,28 +1,25 @@
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If the flagged items are :exploding_head: false positives</summary>
<details><summary>If you see a bunch of garbage</summary>
If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).
If it relates to a ...
<details><summary>well-formed pattern</summary>
Please add a file path to the `excludes.txt` file matching the containing file.
See if there's a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it.
If not, try writing one and adding it to the `patterns.txt` file.
Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
</details>
<details><summary>binary-ish string</summary>
Please add a file path to the `excludes.txt` file instead of just accepting the garbage.
File paths are Perl 5 Regular Expressions - you can [test](
File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).
</details>
* well-formed pattern.
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
try adding it to the `patterns.txt` file.
Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
</details>

View File

@@ -1,5 +1,17 @@
statictastic
Statictastic
Linting
hakiri
built-ins
github
hakiri
https
Linting
Microsoft
ssh
Statictastic
statictastic
ubuntu
Wikipedia
workaround
workaround
workarounds
WSL
decapcms
tina

View File

@@ -0,0 +1,520 @@
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# marker for ignoring a comment to the end of the line
// #no-spell-check.*$
# patch hunk comments
^\@\@ -\d+(?:,\d+|) \+\d+(?:,\d+|) \@\@ .*
# git index header
index [0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
# cid urls
(['"])cid:.*?\g{-1}
# data url in parens
\(data:[^)]*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})[^)]*\)
# data url in quotes
([`'"])data:.*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
# data url
data:[-a-zA-Z=;:/0-9+]*,\S*
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
# magnet urls
magnet:[?=:\w]+
# magnet urls
"magnet:[^"]+"
# obs:
"obs:[^"]*"
# The `\b` here means a break, it's the fancy way to handle urls, but it makes things harder to read
# In this examples content, I'm using a number of different ways to match things to show various approaches
# asciinema
\basciinema\.org/a/[0-9a-zA-Z]+
# apple
\bdeveloper\.apple\.com/[-\w?=/]+
# Apple music
\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
# appveyor api
\bci\.appveyor\.com/api/projects/status/[0-9a-z]+
# appveyor project
\bci\.appveyor\.com/project/(?:[^/\s"]*/){2}builds?/\d+/job/[0-9a-z]+
# Amazon
# Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
# AWS S3
\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]*
# AWS execute-api
\b[0-9a-z]{10}\.execute-api\.[-0-9a-z]+\.amazonaws\.com\b
# AWS ELB
\b\w+\.[-0-9a-z]+\.elb\.amazonaws\.com\b
# AWS SNS
\bsns\.[-0-9a-z]+.amazonaws\.com/[-\w/&#%_?:=]*
# AWS VPC
vpc-\w+
# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
# YouTube url
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
# YouTube music
\bmusic\.youtube\.com/youtubei/v1/browse(?:[?&]\w+=[-a-zA-Z0-9?&=_]*)
# YouTube tag
<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"]
# YouTube image
\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]*
# Google Accounts
\baccounts.google.com/[-_/?=.:;+%&0-9a-zA-Z]*
# Google Analytics
\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
# Google APIs
\bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+
# Google Storage
\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]+/(?:ccc\?key=\w+|(?:u/\d+|d/(?:e/|)[0-9a-zA-Z_-]+/)?(?:edit\?[-\w=#.]*|/\?[\w=&]*|))
# Google Drive
\bdrive\.google\.com/(?:file/d/|open)[-0-9a-zA-Z_?=]*
# Google Groups
\bgroups\.google\.com/(?:(?:forum/#!|d/)(?:msg|topics?|searchin)|a)/[^/\s"]+/[-a-zA-Z0-9$]+(?:/[-a-zA-Z0-9]+)*
# Google Maps
\bmaps\.google\.com/maps\?[\w&;=]*
# Google themes
themes\.googleusercontent\.com/static/fonts/[^/\s"]+/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 Books
\bgoogle\.(?:\w{2,4})/books(?:/\w+)*\?[-\w\d=&#.]*
# Google Fonts
\bfonts\.(?:googleapis|gstatic)\.com/[-/?=:;+&0-9a-zA-Z]*
# Google Forms
\bforms\.gle/\w+
# Google Scholar
\bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+
# Google Colab Research Drive
\bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]*
# GitHub SHAs (api)
\bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b
# GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
# GitHub SHAs
\bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b
# GitHub wiki
\bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b
# githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
# githubassets
\bgithubassets.com/[0-9a-f]+(?:[-/\w.]+)
# gist github
\bgist\.github\.com/[^/\s"]+/[0-9a-f]+
# git.io
\bgit\.io/[0-9a-zA-Z]+
# GitHub JSON
"node_id": "[-a-zA-Z=;:/0-9+]*"
# Contributor
\[[^\]]+\]\(https://github\.com/[^/\s"]+\)
# GHSA
GHSA(?:-[0-9a-z]{4}){3}
# GitLab commit
\bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b
# GitLab merge requests
\bgitlab\.[^/\s"]*/\S+/\S+/-/merge_requests/\d+/diffs#[0-9a-f]{40}\b
# GitLab uploads
\bgitlab\.[^/\s"]*/uploads/[-a-zA-Z=;:/0-9+]*
# GitLab commits
\bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b
# binanace
accounts.binance.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
# bitbucket diff
\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}diff(?:stat|)(?:/[^/\s"]+){2}:[0-9a-f]+
# bitbucket repositories commits
\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
# bitbucket commits
\bbitbucket\.org/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
# bit.ly
\bbit\.ly/\w+
# bitrise
\bapp\.bitrise\.io/app/[0-9a-f]*/[\w.?=&]*
# bootstrapcdn.com
\bbootstrapcdn\.com/[-./\w]+
# cdn.cloudflare.com
\bcdnjs\.cloudflare\.com/[./\w]+
# circleci
\bcircleci\.com/gh(?:/[^/\s"]+){1,5}.[a-z]+\?[-0-9a-zA-Z=&]+
# gitter
\bgitter\.im(?:/[^/\s"]+){2}\?at=[0-9a-f]+
# gravatar
\bgravatar\.com/avatar/[0-9a-f]+
# ibm
[a-z.]*ibm\.com/[-_#=:%!?~.\\/\d\w]*
# imgur
\bimgur\.com/[^.]+
# Internet Archive
\barchive\.org/web/\d+/(?:[-\w.?,'/\\+&%$#_:]*)
# discord
/discord(?:app\.com|\.gg)/(?:invite/)?[a-zA-Z0-9]{7,}
# Disqus
\bdisqus\.com/[-\w/%.()!?&=_]*
# medium link
\blink\.medium\.com/[a-zA-Z0-9]+
# medium
\bmedium\.com/\@?[^/\s"]+/[-\w]+
# microsoft
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
# powerbi
\bapp\.powerbi\.com/reportEmbed/[^"' ]*
# vs devops
\bvisualstudio.com(?::443|)/[-\w/?=%&.]*
# microsoft store
\bmicrosoft\.com/store/apps/\w+
# mvnrepository.com
\bmvnrepository\.com/[-0-9a-z./]+
# now.sh
/[0-9a-z-.]+\.now\.sh\b
# oracle
\bdocs\.oracle\.com/[-0-9a-zA-Z./_?#&=]*
# chromatic.com
/\S+.chromatic.com\S*[")]
# codacy
\bapi\.codacy\.com/project/badge/Grade/[0-9a-f]+
# compai
\bcompai\.pub/v1/png/[0-9a-f]+
# mailgun api
\.api\.mailgun\.net/v3/domains/[0-9a-z]+\.mailgun.org/messages/[0-9a-zA-Z=@]*
# mailgun
\b[0-9a-z]+.mailgun.org
# /message-id/
/message-id/[-\w@./%]+
# Reddit
\breddit\.com/r/[/\w_]*
# requestb.in
\brequestb\.in/[0-9a-z]+
# sched
\b[a-z0-9]+\.sched\.com\b
# Slack url
slack://[a-zA-Z0-9?&=]+
# Slack
\bslack\.com/[-0-9a-zA-Z/_~?&=.]*
# Slack edge
\bslack-edge\.com/[-a-zA-Z0-9?&=%./]+
# Slack images
\bslack-imgs\.com/[-a-zA-Z0-9?&=%.]+
# shields.io
\bshields\.io/[-\w/%?=&.:+;,]*
# stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
# Sentry
[0-9a-f]{32}\@o\d+\.ingest\.sentry\.io\b
# Twitter markdown
\[\@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\)
# Twitter hashtag
\btwitter\.com/hashtag/[\w?_=&]*
# Twitter status
\btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)
# Twitter profile images
\btwimg\.com/profile_images/[_\w./]*
# Twitter media
\btwimg\.com/media/[-_\w./?=]*
# Twitter link shortened
\bt\.co/\w+
# facebook
\bfburl\.com/[0-9a-z_]+
# facebook CDN
\bfbcdn\.net/[\w/.,]*
# facebook watch
\bfb\.watch/[0-9A-Za-z]+
# dropbox
\bdropbox\.com/sh?/[^/\s"]+/[-0-9A-Za-z_.%?=&;]+
# ipfs protocol
ipfs://[0-9a-z]*
# ipfs url
/ipfs/[0-9a-z]*
# w3
\bw3\.org/[-0-9a-zA-Z/#.]+
# loom
\bloom\.com/embed/[0-9a-f]+
# regex101
\bregex101\.com/r/[^/\s"]+/\d+
# figma
\bfigma\.com/file(?:/[0-9a-zA-Z]+/)+
# freecodecamp.org
\bfreecodecamp\.org/[-\w/.]+
# image.tmdb.org
\bimage\.tmdb\.org/[/\w.]+
# mermaid
\bmermaid\.ink/img/[-\w]+|\bmermaid-js\.github\.io/mermaid-live-editor/#/edit/[-\w]+
# Wikipedia
\ben\.wikipedia\.org/wiki/[-\w%.#]+
# gitweb
[^"\s]+/gitweb/\S+;h=[0-9a-f]+
# HyperKitty lists
/archives/list/[^@/]+\@[^/\s"]*/message/[^/\s"]*/
# lists
/thread\.html/[^"\s]+
# list-management
\blist-manage\.com/subscribe(?:[?&](?:u|id)=[0-9a-f]+)+
# kubectl.kubernetes.io/last-applied-configuration
"kubectl.kubernetes.io/last-applied-configuration": ".*"
# pgp
\bgnupg\.net/pks/lookup[?&=0-9a-zA-Z]*
# Spotify
\bopen\.spotify\.com/embed/playlist/\w+
# Mastodon
\bmastodon\.[-a-z.]*/(?:media/|\@)[?&=0-9a-zA-Z_]*
# scastie
\bscastie\.scala-lang\.org/[^/]+/\w+
# images.unsplash.com
\bimages\.unsplash\.com/(?:(?:flagged|reserve)/|)[-\w./%?=%&.;]+
# pastebin
\bpastebin\.com/[\w/]+
# heroku
\b\w+\.heroku\.com/source/archive/\w+
# quip
\b\w+\.quip\.com/\w+(?:(?:#|/issues/)\w+)?
# badgen.net
\bbadgen\.net/badge/[^")\]'\s]+
# statuspage.io
\w+\.statuspage\.io\b
# media.giphy.com
\bmedia\.giphy\.com/media/[^/]+/[\w.?&=]+
# tinyurl
\btinyurl\.com/\w+
# getopts
\bgetopts\s+(?:"[^"]+"|'[^']+')
# ANSI color codes
(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m
# URL escaped characters
\%[0-9A-F][A-F]
# IPv6
\b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b
# c99 hex digits (not the full format, just one I've seen)
0x[0-9a-fA-F](?:\.[0-9a-fA-F]*|)[pP]
# Punycode
\bxn--[-0-9a-z]+
# sha
sha\d+:[0-9]*[a-f]{3,}[0-9a-f]*
# sha-... -- uses a fancy capture
(['"]|&quot;)[0-9a-f]{40,}\g{-1}
# hex runs
\b[0-9a-fA-F]{16,}\b
# hex in url queries
=[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?&
# ssh
(?:ssh-\S+|-nistp256) [-a-zA-Z=;:/0-9+]{12,}
# PGP
\b(?:[0-9A-F]{4} ){9}[0-9A-F]{4}\b
# GPG keys
\b(?:[0-9A-F]{4} ){5}(?: [0-9A-F]{4}){5}\b
# Well known gpg keys
.well-known/openpgpkey/[\w./]+
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b
# integrity
integrity="sha\d+-[-a-zA-Z=;:/0-9+]{40,}"
# https://www.gnu.org/software/groff/manual/groff.html
# man troff content
\\f[BCIPR]
# '
\\\(aq
# .desktop mime types
^MimeTypes?=.*$
# .desktop localized entries
^[A-Z][a-z]+\[[a-z]+\]=.*$
# Localized .desktop content
Name\[[^\]]+\]=.*
# IServiceProvider
\bI(?=(?:[A-Z][a-z]{2,})+\b)
# crypt
"\$2[ayb]\$.{56}"
# scrypt / argon
\$(?:scrypt|argon\d+[di]*)\$\S+
# Input to GitHub JSON
content: "[-a-zA-Z=;:/0-9+]*="
# Python stringprefix / binaryprefix
# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
(?<!')\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
# Regular expressions for (P|p)assword
\([A-Z]\|[a-z]\)[a-z]+
# JavaScript regular expressions
# javascript test regex
/.*/[gim]*\.test\(
# javascript match regex
\.match\(/[^/\s"]*/[gim]*\s*
# javascript match regex
\.match\(/\\[b].*?/[gim]*\s*\)(?:;|$)
# javascript regex
^\s*/\\[b].*/[gim]*\s*(?:\)(?:;|$)|,$)
# javascript replace regex
\.replace\(/[^/\s"]*/[gim]*\s*,
# Go regular expressions
regexp?\.MustCompile\(`[^`]*`\)
# sed regular expressions
sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2}
# go install
go install(?:\s+[a-z]+\.[-@\w/.]+)+
# kubernetes pod status lists
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
\w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+
# kubectl - pods in CrashLoopBackOff
\w+-[0-9a-f]+-\w+\s+\d+/\d+\s+CrashLoopBackOff\s+
# kubernetes object suffix
-[0-9a-f]{10}-\w{5}\s
# posthog secrets
posthog\.init\((['"])phc_[^"',]+\g{-1},
# xcode
# xcodeproject scenes
(?:Controller|ID|id)="\w{3}-\w{2}-\w{3}"
# xcode api botches
customObjectInstantitationMethod
# font awesome classes
\.fa-[-a-z0-9]+
# Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally )
# grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review -
# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
## Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
## You could manually change `(?i)X...` to use `[Xx]...`
## or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
# Lorem
(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
# French
# This corpus only had capital letters, but you probably want lowercase ones as well.
\b[LN]'+[a-z]{2,}\b
# latex
\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+)
# the negative lookahead here is to allow catching 'templatesz' as a misspelling
# but to otherwise recognize a Windows path with \templates\foo.template or similar:
\\(?:necessary|r(?:eport|esolve[dr]?|esult)|t(?:arget|emplates?))(?![a-z])
# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# Compiler flags (Scala)
(?:^|[\t ,>"'`=(])-J-[DPWXY](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# Compiler flags
(?:^|[\t ,"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
# Compiler flags (linker)
,-B
# curl arguments
\b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# set arguments
\bset(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)*
# tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
# macOS temp folders
/var/folders/\w\w/[+\w]+/(?:T|-Caches-)/

View File

@@ -2,6 +2,8 @@
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)3rdparty/
(?:^|/)go\.sum$
(?:^|/)package(?:-lock|)\.json$
(?:^|/)vendor/
@@ -9,20 +11,52 @@
ignore$
\.avi$
\.bmp$
\.bz2$
\.class$
\.crt$
\.dll$
\.docx?$
\.drawio$
\.DS_Store$
\.eot$
\.exe$
\.gif$
\.gitattributes$
\.graffle$
\.gz$
\.icns$
\.ico$
\.jar$
\.jks$
\.jpe?g$
\.key$
\.lib$
\.lock$
\.map$
\.min\.
\.min\..
\.mod$
\.mp[34]$
\.o$
\.ocf$
\.otf$
\.pdf$
\.pem$
\.png$
\.svg$
\.psd$
\.pyc$
\.s$
\.svgz?$
\.tar$
\.tiff?$
\.ttf$
\.wav$
\.webm$
\.webp$
\.woff$
\.woff2$
\.xlsx?$
\.zip$
^docs/pages/redirects/github\.html$
^lib/jekyll/mime\.types$
@@ -33,3 +67,4 @@ ignore$
^test/fixtures/webrick/bar/foo\.xhtml$
^test/source/_posts/2009-06-22-no-yaml\.markdown$
^\.github/
^\Q.github/workflows/spelling.yml\E$

View File

@@ -36,6 +36,7 @@ awscli
backend
backport
backtick
backticks
barcamp
baseurl
bashrc
@@ -51,6 +52,7 @@ bitbucket
blog
Blogger
blogging
blogs
bonafide
Bou
breadcrumbs
@@ -60,6 +62,7 @@ bridgetownrb
brightbox
brighterplanet
buddyworks
builtatlightspeed
Bugfix
Burela
byparker
@@ -178,6 +181,7 @@ exe
execjs
extensionpack
extname
extnames
exts
favicon
Fengyun
@@ -203,6 +207,7 @@ formx
Forwardable
frameborder
freenode
frontend
frontmatter
fsnotify
ftp
@@ -313,6 +318,7 @@ Kewin
keycdn
kickster
Kinnula
kinsta
kiwifruit
Kolesky
konklone
@@ -376,6 +382,7 @@ mergable
Mertcan
mertkahyaoglu
metadata
metadatas
microdata
microsoft
mimetype
@@ -421,6 +428,7 @@ nakanishi
namespace
namespaced
navbar
navbars
nbsp
nearlyfreespeech
nethack
@@ -460,6 +468,7 @@ pathawks
Pathutil
paywall
pdf
PDFs
Pelykh
permalink
PHP
@@ -480,6 +489,7 @@ Posterous
postfiles
postlayout
postmodern
prefetching
preinstalled
prepends
Prioritise
@@ -510,6 +520,8 @@ redgreen
redhat
refactor
refactoring
refactorings
Refactors
Refheap
regen
regex
@@ -552,6 +564,7 @@ Schwartzian
scp
screenshot
scrollbar
scrollbars
scroller
scss
scssify
@@ -565,9 +578,9 @@ setenv
SFTP
shingo
shopify
shortlog
shortlinks
shoulda
shortlog
Shoulda
sieversii
sigpipe
simplecov
@@ -610,6 +623,7 @@ subdir
subdomain
subfolder
subfolderitems
subfolders
subnav
subpages
subpath
@@ -649,6 +663,7 @@ throughs
Tidelift
timeago
timezone
timezones
titleize
TLS
tmm
@@ -687,6 +702,7 @@ uri
url
urlset
username
usernames
usr
utf
utils
@@ -728,6 +744,7 @@ woff
wordpress
Workaround
workflow
workflows
wsl
www
xcode
@@ -758,5 +775,3 @@ Zsh
zshrc
zypper
zzot
frontend
prefetching

View File

@@ -0,0 +1,62 @@
# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
# \bm_data\b
# If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test,
# you might not want to check in code where you were debugging w/ `fit()`, in which case, you might want
# to use this:
#\bfit\(
# s.b. GitHub
\bGithub\b
# s.b. GitLab
\bGitlab\b
# s.b. JavaScript
\bJavascript\b
# s.b. Microsoft
\bMicroSoft\b
# s.b. another
\ban[- ]other\b
# s.b. greater than
\bgreater then\b
# s.b. into
#\sin to\s
# s.b. opt-in
\sopt in\s
# s.b. less than
\bless then\b
# s.b. otherwise
\bother[- ]wise\b
# s.b. nonexistent
\bnon existing\b
\b[Nn]o[nt][- ]existent\b
# s.b. preexisting
[Pp]re[- ]existing
# s.b. preempt
[Pp]re[- ]empt\b
# s.b. preemptively
[Pp]re[- ]emptively
# s.b. reentrancy
[Rr]e[- ]entrancy
# s.b. reentrant
[Rr]e[- ]entrant
# s.b. workaround(s)
#\bwork[- ]arounds?\b
# Reject duplicate words
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s

View File

@@ -71,5 +71,94 @@ apiKey: '[a-f0-9]+'
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9a-fA-FgGrR_]{2,}(?:[uU]?[lL]{0,2}|u\d+)\b
# Automatically suggested patterns
# hit-count: 23 file-count: 15
# GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
# hit-count: 7 file-count: 4
# Wikipedia
\ben\.wikipedia\.org/wiki/[-\w%.#]+
# hit-count: 5 file-count: 3
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
# hit-count: 4 file-count: 4
# Twitter status
\btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)
# hit-count: 3 file-count: 3
# stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
# hit-count: 3 file-count: 2
# vs devops
\bvisualstudio.com(?::443|)/[-\w/?=%&.]*
# hit-count: 2 file-count: 2
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
# hit-count: 2 file-count: 2
# githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
# hit-count: 2 file-count: 2
# hex runs
\b[0-9a-fA-F]{16,}\b
# hit-count: 2 file-count: 2
# curl arguments
\b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
# hit-count: 2 file-count: 1
# microsoft
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
# hit-count: 1 file-count: 1
# Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
# hit-count: 1 file-count: 1
# gist github
\bgist\.github\.com/[^/\s"]+/[0-9a-f]+
# hit-count: 1 file-count: 1
# Contributor
\[[^\]]+\]\(https://github\.com/[^/\s"]+\)
# hit-count: 1 file-count: 1
# medium
\bmedium\.com/\@?[^/\s"]+/[-\w]+
# hit-count: 1 file-count: 1
# Twitter markdown
\[\@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\)
# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
# https://www.tprteaching.com/log-into-log-in-to-login/
\b[Ll]og in to\b
# acceptable duplicates
# ls directory listings
[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+
# C types and repeated CSS values
\s(center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s
# go templates
\s(\w+)\s+\g{-1}\s+\`(?:graphql|json|yaml):
# javadoc / .net
(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s
# Commit message -- Signed-off-by and friends
^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$
# Autogenerated revert commit message
^This reverts commit [0-9a-f]{40}\.$
# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b
# ignore inline code
`\w+`

View File

@@ -1,7 +1,10 @@
^attache$
benefitting
occurence
occurences?
^dependan.*
^oer$
Sorce
^[Ss]pae
^untill
^wether
^[Ss]pae.*
^untill$
^untilling$
^wether.*

View File

@@ -5,61 +5,78 @@ on:
branches:
- master
- "*-stable"
paths-ignore:
- "docs/**"
pull_request:
branches:
- master
- "*-stable"
paths-ignore:
- "docs/**"
jobs:
ci:
name: "Run Tests (${{ matrix.label }})"
runs-on: "ubuntu-latest"
name: "Run Tests (${{ matrix.ruby.label }} on ${{ matrix.os.label }})"
runs-on: ${{ matrix.os.image }}
strategy:
fail-fast: false
matrix:
include:
ruby:
- 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"
version: "2.7"
- label: Ruby 3.3
version: "3.3"
os:
- label: Linux
image: "ubuntu-latest"
- label: Windows
image: "windows-latest"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: "Set up ${{ matrix.label }}"
uses: actions/checkout@v4
- name: "Set up ${{ matrix.ruby.label }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
ruby-version: ${{ matrix.ruby.version }}
bundler-cache: true
- name: Run Minitest based tests
run: bash script/test
- name: Run Cucumber based tests
run: bash script/cucumber
run: bash script/cucumber --color
- name: Generate and Build a new site
run: bash script/default-site
xtras:
name: "${{ matrix.job_name }} (Ruby ${{ matrix.ruby_version }})"
name: "${{ matrix.job_name }} (${{ matrix.setup_label }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
include:
- job_name: "Unit Test with JRuby"
setup_label: "JRuby 9.4.8.0"
step_name: "Run Minitest based tests"
script_file: "test"
ruby_version: "jruby-9.4.8.0"
- job_name: "Smoke Test with JRuby"
setup_label: "JRuby 9.4.8.0"
step_name: "Generate and Build a new site"
script_file: "default-site"
ruby_version: "jruby-9.4.8.0"
- job_name: "Profile Docs Site"
setup_label: "Ruby 2.7"
step_name: "Build and Profile docs site"
script_file: "profile-docs"
ruby_version: "2.7"
- job_name: "Style Check"
setup_label: "Ruby 2.7"
step_name: "Run RuboCop"
script_file: "fmt"
ruby_version: "2.7"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: actions/checkout@v4
- name: "Set up ${{ matrix.setup_label }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}

View File

@@ -20,7 +20,7 @@ jobs:
- 2.7
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:

View File

@@ -1,15 +1,51 @@
name: Spell Check
# Comment management is handled through a secondary job, for details see:
# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
#
# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
# (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)
# it needs `contents: write` in order to add a comment.
#
# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
# it needs `pull-requests: write` in order to manipulate those comments.
# Updating pull request branches is managed via comment handling.
# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
#
# These elements work together to make it happen:
#
# `on.issue_comment`
# This event listens to comments by users asking to update the metadata.
#
# `jobs.update`
# This job runs in response to an issue_comment and will push a new commit
# to update the spelling metadata.
#
# `with.experimental_apply_changes_via_bot`
# Tells the action to support and generate messages that enable it
# to make a commit to update the spelling metadata.
#
# `with.ssh_key`
# In order to trigger workflows when the commit is made, you can provide a
# secret (typically, a write-enabled github deploy key).
#
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
on:
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"
tags-ignore:
- "**"
types:
- 'opened'
- 'reopened'
- 'synchronize'
jobs:
spelling:
@@ -29,7 +65,7 @@ jobs:
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@v0.0.20
uses: check-spelling/check-spelling@v0.0.21
with:
# This workflow runs in response to both `push` and `pull_request`, if there's an open `pull_request` in the same repository for a given branch, there's no reason to spend resources checking both the `push` and the `pull_request`, so this flag tells the action while running for the `push` to find the `pull_request` and stop working early:
suppress_push_for_open_pull_request: 1
@@ -37,3 +73,18 @@ jobs:
checkout: true
# If running without `: write`, posting a comment won't work, and for security `: write` permissions are left to a distinct (optional) job, here we skip trying to post a comment:
post_comment: 0
use_magic_file: 1
extra_dictionary_limit: 10
extra_dictionaries:
cspell:software-terms/src/software-terms.txt
cspell:php/php.txt
cspell:node/node.txt
cspell:django/django.txt
cspell:html/html.txt
cspell:npm/npm.txt
cspell:ruby/ruby.txt
cspell:fullstack/fullstack.txt
cspell:filetypes/filetypes.txt
check_extra_dictionaries: ''
# This workflow has opted not to use comments (users can view the report in GitHub Step Summary)

16
Gemfile
View File

@@ -15,7 +15,8 @@ end
#
group :test do
gem "cucumber", RUBY_VERSION >= "2.5" ? "~> 5.1.2" : "~> 4.1"
gem "activesupport", "~> 7.0.0"
gem "cucumber", "~> 9.0"
gem "httpclient"
gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious"
@@ -75,7 +76,6 @@ group :jekyll_optional_dependencies do
gem "kramdown-syntax-coderay"
gem "matrix"
gem "mime-types", "~> 3.0"
gem "rdoc", "~> 6.0"
gem "tomlrb"
platforms :ruby, :mswin, :mingw, :x64_mingw do
@@ -94,6 +94,18 @@ end
#
group :rdoc, :optional => true do
# Psych 5 has stopped bundling `libyaml` and expects it to be installed on the host system prior
# to being invoked.
# Since we don't have a direct dependency on the Psych gem (it gets included in the gem bundle as
# a dependency of the `rdoc` gem), lock psych gem to v4.x instead of installing `libyaml` in our
# development / CI environment.
gem "psych", "~> 4.0"
gem "rdoc", "~> 6.0"
end
#
group :site do
gem "html-proofer", "~> 3.4" if ENV["PROOF"]

View File

@@ -1,3 +1,55 @@
## HEAD
### Development Fixes
* Backport #9737 for v4.3.x: Fix expected markup per WAI-ARIA requirements (#9738)
* Backport #9742 for v4.3.x: Add an optional `:rdoc` group of gems (#9744)
* Backport #9747 for v4.3.x: Bump cucumber to v9 (#9752)
## 4.3.4 / 2024-09-16
### Bug Fixes
* Backport #9662 for v4.3.x: Relax version constraint on wdm in new Gemfile (#9683)
* Backport #9680 for v4.3.x: Render theme-gem root only in development (#9684)
### Development Fixes
* Sync workflows with counterparts on `master` (#9681)
## 4.3.3 / 2023-12-27
### Bug Fixes
* Backport #9392 for v4.3.x: Fix backward compatibility issues in the Logger (#9510)
### Development Fixes
* Backport #9237 for v4.3.x: Use Hash explicitly for Struct initializer (#9285)
## 4.3.2 / 2023-01-20
### Bug Fixes
* Backport #9257 for v4.3.x: Rename sass partial created for new blank site (#9262)
* Backport #9187 for v4.3.x: Optimize `Site#each_site_file` (#9256)
* Backport #9186 for v4.3.x: Remove totals in profile table properly (#9255)
### Development Fixes
* Backport #9223 for 4.3.x: Update sass related tests for jekyll-sass-converter 3.x (#9254)
## 4.3.1 / 2022-10-26
### Bug Fixes
* Respect user-defined name attribute in documents (#9167)
* Revert &#34;Incrementally rebuild when a data file is changed&#34; (#9170)
### Documentation
* Release post for v4.3.1 (#9171)
## 4.3.0 / 2022-10-20
### Minor Enhancements

View File

@@ -1,8 +1,7 @@
# [Jekyll](https://jekyllrb.com/)
[![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]
[![Build Status](https://github.com/jekyll/jekyll/workflows/Continuous%20Integration/badge.svg)][ci-workflow]
[![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)

View File

@@ -1,47 +0,0 @@
version: "{build}"
clone_depth: 5
branches:
only:
- master
- themes
- /.*-stable/
build: off
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"
- RUBY_FOLDER_VER: "26"
TEST_SUITE: "profile-docs"
- 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:
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%-x64\bin;%PATH%
- bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle
test_script:
- ruby --version
- gem --version
- bundler --version
- bash ./script/cibuild
cache:
# If one of the files after the right arrow changes, cache will be invalidated
- 'vendor\bundle -> appveyor.yml,Gemfile,jekyll.gemspec'

View File

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

View File

@@ -156,7 +156,9 @@ page:
theme:
- name: theme.root
description: Absolute path to the theme-gem.
description: >-
Absolute path to the theme-gem. Rendered only when environment variable <code>JEKYLL_ENV</code>
is set to <code>development</code>.
- name: theme.authors
description: Comma separated string composed of the authors of the theme-gem.
- name: theme.description

View File

@@ -22,7 +22,7 @@ With [Razorops][razorops-homepage] you can set up your Jekyll websites project's
## 1. Getting started
1. Log in at [https://razorops.com/][razorops-homepage] with your GitHub/Bitbucket or Gitlab account
1. Log in at [https://razorops.com/][razorops-homepage] with your GitHub/Bitbucket or GitLab account
2. Create a pipeline, choose your Git provider and select your Jekyll Project
3. Add .razorops.yaml file in your root directory of your project
4. Add environment var and your deployment is ready

View File

@@ -15,7 +15,7 @@ See the [support guidelines](https://jekyllrb.com/docs/support/)
Whether you're a developer, a designer, or just a Jekyll devotee, there are lots of ways to contribute. Here's a few ideas:
- [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know.
- Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
- Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a workaround? Do you have a suggestion for how the feature could be better?
- Read through the [documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved.
- Browse through the [Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing.
- Find an [open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions.

View File

@@ -4,6 +4,20 @@ permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 4.3.1 / 2022-10-26
{: #v4-3-1}
### Bug Fixes
{: #bug-fixes-v4-3-1}
- Respect user-defined name attribute in documents ([#9167]({{ site.repository }}/issues/9167))
- Revert &#34;Incrementally rebuild when a data file is changed&#34; ([#9170]({{ site.repository }}/issues/9170))
### Documentation
- Release post for v4.3.1 ([#9171]({{ site.repository }}/issues/9171))
## 4.3.0 / 2022-10-20
{: #v4-3-0}
@@ -139,7 +153,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Remove Aerobatic ([#9007]({{ site.repository }}/issues/9007))
- Add Jekyll 3.9.2 release post to &#39;master&#39; branch ([#9013]({{ site.repository }}/issues/9013))
- Simplify macOS installation docs ([#8993]({{ site.repository }}/issues/8993))
- Improve document about Github Actions section ([#8853]({{ site.repository }}/issues/8853))
- Improve document about GitHub Actions section ([#8853]({{ site.repository }}/issues/8853))
- Update permalinks.md ([#9017]({{ site.repository }}/issues/9017))
- Add clarity to docs on permalinks placeholders and built-ins ([#8995]({{ site.repository }}/issues/8995))
- Remove Ionic Framework site from showcase ([#9057]({{ site.repository }}/issues/9057))
@@ -1323,7 +1337,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- make flakey test more robust ([#6277]({{ site.repository }}/issues/6277))
- Add a quick test for DataReader ([#6284]({{ site.repository }}/issues/6284))
- script/backport-pr: commit message no longer includes the `#` ([#6289]({{ site.repository }}/issues/6289))
- Add Add CODEOWNERS file to help automate reviews. ([#6320]({{ site.repository }}/issues/6320))
- Add CODEOWNERS file to help automate reviews. ([#6320]({{ site.repository }}/issues/6320))
- Fix builds on codeclimate ([#6333]({{ site.repository }}/issues/6333))
- Bump rubies on Travis ([#6366]({{ site.repository }}/issues/6366))
@@ -2482,7 +2496,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Fixed an unclear code comment in site template SCSS ([#3837]({{ site.repository }}/issues/3837))
- Fix reading of binary metadata file ([#3845]({{ site.repository }}/issues/3845))
- Remove var collision with site template header menu iteration variable ([#3838]({{ site.repository }}/issues/3838))
- Change non-existent `hl_linenos` to `hl_lines` to allow passthrough in safe mode ([#3787]({{ site.repository }}/issues/3787))
- Change nonexistent `hl_linenos` to `hl_lines` to allow passthrough in safe mode ([#3787]({{ site.repository }}/issues/3787))
- Add missing flag to disable the watcher ([#3820]({{ site.repository }}/issues/3820))
- Update CI guide to include more direct explanations of the flow ([#3891]({{ site.repository }}/issues/3891))
- Set `future` to `false` in the default config ([#3892]({{ site.repository }}/issues/3892))
@@ -2819,7 +2833,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Document the `name` variable for collection permalinks ([#2829]({{ site.repository }}/issues/2829))
- Adds info about installing jekyll in current dir ([#2839]({{ site.repository }}/issues/2839))
- Remove deprecated `jekyll-projectlist` plugin from list of third-party plugins ([#2742]({{ site.repository }}/issues/2742))
- Remove tag plugins that are built in to Jekyll ([#2751]({{ site.repository }}/issues/2751))
- Remove tag plugins that are built into Jekyll ([#2751]({{ site.repository }}/issues/2751))
- Add `markdown-writer` package for Atom Editor to list of third-party plugins ([#2763]({{ site.repository }}/issues/2763))
- Fix typo in site documentation for collections ([#2764]({{ site.repository }}/issues/2764))
- Fix minor typo on plugins docs page ([#2765]({{ site.repository }}/issues/2765))

View File

@@ -20,7 +20,7 @@ If the issue describes a feature request, ask:
1. Is this a setting? [Settings are a crutch](http://ben.balter.com/2016/03/08/optimizing-for-power-users-and-edge-cases/#settings-are-a-crutch) for doing "the right thing". Settings usually point to a bad default or an edge case that could be solved easily with a plugin. Keep the :christmas_tree: of settings as small as possible so as not to reduce the usability of the product. We like the philosophy "decisions not options."
2. Would at least 80% of users find it useful? If even a quarter of our users won't use it, it's very likely that the request doesn't fit our product's core goal.
3. Is there another way to accomplish the end goal of the request? Most feature requests are due to bad documentation for or understanding of a pre-existing feature. See if you can clarify the end goal of the request. What is the user trying to do? Could they accomplish that goal through another feature we already support?
3. Is there another way to accomplish the end goal of the request? Most feature requests are due to bad documentation for or understanding of a preexisting feature. See if you can clarify the end goal of the request. What is the user trying to do? Could they accomplish that goal through another feature we already support?
4. Even if 80% of our users will use it, does it fit the core goal of our project? We are writing a tool for making static websites, not a swiss army knife for publishing more generally.
Feel free to get others' opinions and ask questions of the issue author, but depending upon the answers to the questions above, it may be out of scope for our project.

View File

@@ -317,7 +317,7 @@ The issue is caused by trying to copy a non-existing symlink.
<h5>Please report issues you encounter!</h5>
<p>
If you come across a bug, please <a href="{{ site.repository }}/issues/new">create an issue</a>
on GitHub describing the problem and any work-arounds you find so we can
on GitHub describing the problem and any workarounds you find so we can
document it here for others.
</p>
</div>

View File

@@ -0,0 +1,21 @@
---
title: 'Jekyll 4.3.1 Released'
date: 2022-10-26 19:09:42 +0530
author: ashmaroli
version: 4.3.1
category: release
---
Hello Jekyllers!
We're shipping `v4.3.1` containing fixes for two issues with v4.3.0:
- Jekyll now respects user-defined `name` attribute for collection documents when accessed in Liquid templates.
- Revert the changes made to trigger incremental rebuilds when data files are changed.
Thanks to the users who took the time to report the issues to us.
Happy Jekyllin'
P.S. Development towards v5 has taken a back seat as of now. I plan on releasing a v4.4.0 instead.
That said, please feel free to comment on the [tentative roadmap to v5][roadmap].
[roadmap]: {{ site.repository }}/issues/9156

View File

@@ -1 +1 @@
4.3.0
4.3.1

View File

@@ -78,7 +78,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site
- [markdown-writer](https://atom.io/packages/markdown-writer): An Atom package for Jekyll. It can create new posts/drafts, manage tags/categories, insert link/images and add many useful key mappings.
- [sublime-jekyll](https://github.com/23maverick23/sublime-jekyll): A Sublime Text package for Jekyll static sites. This package should help creating Jekyll sites and posts easier by providing access to key template tags and filters, as well as common completions and a current date/datetime command (for dating posts). You can install this package manually via GitHub, or via [Package Control](https://packagecontrol.io/packages/Jekyll).
- [vim-jekyll](https://github.com/parkr/vim-jekyll): A vim plugin to generate new posts and run `jekyll build` all without leaving vim.
- [WordPress2Jekyll](https://wordpress.org/plugins/wp2jekyll/): A WordPress plugin that allows you to use WordPress as your editor and (automatically) export content in to Jekyll. WordPress2Jekyll attempts to marry these two systems together in order to make a site that can be easily managed from all devices.
- [WordPress2Jekyll](https://wordpress.org/plugins/wp2jekyll/): A WordPress plugin that allows you to use WordPress as your editor and (automatically) export content into Jekyll. WordPress2Jekyll attempts to marry these two systems together in order to make a site that can be easily managed from all devices.
## Posts

View File

@@ -82,8 +82,8 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/um_hi.md" in "_site/index.html" unless Windows
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/yaml_with_dots.md" in "_site/index.html" if on Windows
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/um_hi.md" in "_site/index.html" if platform supports symlinks
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/yaml_with_dots.md" in "_site/index.html" if platform does not support symlinks
Scenario: Collections specified as an hash
Given I have an "index.html" page that contains "Collections: {% for method in site.methods %}{{ method.relative_path }} {% endfor %}"
@@ -96,8 +96,8 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/um_hi.md" in "_site/index.html" unless Windows
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/yaml_with_dots.md" in "_site/index.html" if on Windows
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/um_hi.md" in "_site/index.html" if platform supports symlinks
And I should see "Collections: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/yaml_with_dots.md" in "_site/index.html" if platform does not support symlinks
Scenario: Rendered collection with document with future date
Given I have a _puppies directory
@@ -377,8 +377,8 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "All documents: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/um_hi.md" in "_site/index.html" unless Windows
And I should see "All documents: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/yaml_with_dots.md" in "_site/index.html" if on Windows
And I should see "All documents: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/um_hi.md" in "_site/index.html" if platform supports symlinks
And I should see "All documents: _methods/3940394-21-9393050-fifif1323-test.md _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/trailing-dots...md _methods/yaml_with_dots.md" in "_site/index.html" if platform does not support symlinks
Scenario: Documents have an output attribute, which is the converted HTML
Given I have an "index.html" page that contains "Second document's output: {{ site.documents[2].output }}"
@@ -432,8 +432,8 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "2. of 10: <p>Page without title.</p>" in "_site/index.html" unless Windows
And I should see "2. of 9: <p>Page without title.</p>" in "_site/index.html" if on Windows
And I should see "2. of 10: <p>Page without title.</p>" in "_site/index.html" if platform supports symlinks
And I should see "2. of 9: <p>Page without title.</p>" in "_site/index.html" if platform does not support symlinks
Scenario: Sort by relative_path
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{{ methods | map:"title" | join: ", " }}"
@@ -446,8 +446,8 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: this is a test!, Collection#entries, Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Ellipsis Path, Site#generate, YAML with Dots" in "_site/index.html" unless Windows
And I should see "Collections: this is a test!, Collection#entries, Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Ellipsis Path, YAML with Dots" in "_site/index.html" if on Windows
And I should see "Collections: this is a test!, Collection#entries, Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Ellipsis Path, Site#generate, YAML with Dots" in "_site/index.html" if platform supports symlinks
And I should see "Collections: this is a test!, Collection#entries, Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Ellipsis Path, YAML with Dots" in "_site/index.html" if platform does not support symlinks
Scenario: Sort all entries by a Front Matter key defined in all entries
Given I have an "index.html" page that contains "Collections: {{ site.tutorials | map: 'title' | join: ', ' }}"

View File

@@ -14,10 +14,15 @@ Feature: Create sites
And the test_blank/_sass directory should exist
And the test_blank/assets/css directory should exist
And the "test_blank/_layouts/default.html" file should exist
And the "test_blank/_sass/main.scss" file should exist
And the "test_blank/_sass/base.scss" file should exist
And the "test_blank/assets/css/main.scss" file should exist
And the "test_blank/_config.yml" file should exist
And the "test_blank/index.md" file should exist
When I run jekyll build --source test_blank --destination test_blank/_site
Then I should get a zero exit status
And the test_blank/_site directory should exist
And I should see "Start developing" in "test_blank/_site/index.html"
And I should see "body {" in "test_blank/_site/assets/css/main.css"
Scenario: Basic site
Given I have an "index.html" file that contains "Basic Site"

View File

@@ -67,59 +67,6 @@ Feature: Incremental rebuild
And the _site directory should exist
And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html"
Scenario: Rebuild when a data file is changed
Given I have a _data directory
And I have a "_data/colors.yml" file that contains "[red, green, blue]"
And I have a _data/members/core directory
And I have a "_data/members/core/emeritus.yml" file with content:
"""
- name: John Doe
role: Admin
"""
And I have an _includes directory
And I have an "_includes/about.html" file with content:
"""
<ul>
{% for entry in site.data.members.core.emeritus %}
<li title="{{ entry.name }} -- {{ entry.role }}">{{ entry.name }}</li>
{% endfor %}
</ul>
"""
And I have a _layouts directory
And I have a page layout that contains "{{ content }}\n\n{% include about.html %}"
And I have a home layout that contains "{{ content }}\n\nGenerated by Jekyll"
And I have a "_layouts/post.html" page with layout "page" that contains "{{ content }}"
And I have a "_layouts/static.html" page with layout "home" that contains "{{ content }}"
And I have an "index.html" page with layout "home" that contains "{{ site.data.colors | join: '_' }}"
And I have an "about.html" page with layout "page" that contains "About Us"
And I have a configuration file with "collections_dir" set to "collections"
And I have a collections/_posts directory
And I have the following post within the "collections" directory:
| title | date | layout | content |
| Table | 2009-03-26 | post | Post with data dependency |
| Wargames | 2009-03-27 | static | Post without data dependency |
When I run jekyll build -IV
Then I should get a zero exit status
And the _site directory should exist
And I should see "red_green_blue" in "_site/index.html"
And I should see "John Doe -- Admin" in "_site/about.html"
And I should see "Rendering: index.html" in the build output
And I should see "Rendering: _posts/2009-03-27-wargames.markdown" in the build output
When I wait 1 second
Then I have a "_data/members/core/emeritus.yml" file with content:
"""
- name: Jane Doe
role: Admin
"""
When I run jekyll build -IV
Then I should get a zero exit status
And the _site directory should exist
And I should see "red_green_blue" in "_site/index.html"
And I should see "Jane Doe -- Admin" in "_site/about.html"
And I should see "Rendering: _posts/2009-03-26-table.markdown" in the build output
But I should not see "Rendering: index.html" in the build output
And I should not see "Rendering: _posts/2009-03-27-wargames.markdown" in the build output
Scenario: Rebuild when a dependency of document in custom collection_dir is changed
Given I have a _includes directory
And I have a configuration file with "collections_dir" set to "collections"

View File

@@ -108,7 +108,7 @@ Feature: Post excerpts
Then I should get a zero exit status
And I should not see "Kramdown warning" in the build output
But I should see exactly "<p>Install Jekyll</p>" in "_site/just-text-excerpt.html"
And I should see "<p>Alpha <sup id=\"fnref:1\" role=\"doc-noteref\"><a href=\"#fn:1\" class=\"footnote\" rel=\"footnote\">1</a></sup></p>" in "_site/text-and-footnote.html"
And I should see "<p>Alpha <sup id=\"fnref:1\"><a href=\"#fn:1\" class=\"footnote\" rel=\"footnote\" role=\"doc-noteref\">1</a></sup></p>" in "_site/text-and-footnote.html"
And I should see "<p>Omega sigma <a href=\"#fnref:1\" class=\"reversefootnote\" role=\"doc-backlink\">&#8617;</a></p>" in "_site/text-and-footnote.html"
And I should see "<p>Read <a href=\"docs.jekyll.com\">docs</a></p>" in "_site/text-and-reference-link.html"
And I should see "<p>Check out <a href=\"jekyllrb.com\">jekyll</a></p>" in "_site/text-and-self-referencing-link.html"

View File

@@ -168,7 +168,7 @@ Feature: Rendering
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see ".foo-bar { color: red; }\n\n\/\*# sourceMappingURL=index.css.map \*\/" in "_site/index.css"
And I should see ".foo-bar {\n color: red;\n}\n\n\/\*# sourceMappingURL=index.css.map \*\/" in "_site/index.css"
Scenario: Not render liquid in CoffeeScript without explicitly including jekyll-coffeescript
Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'"

View File

@@ -287,28 +287,28 @@ end
#
Then(%r!^I should (not )?see "(.*)" in "(.*)" if on Windows$!) do |negative, text, file|
Then(%r!^I should (not )?see "(.*)" in "(.*)" if platform does not support symlinks$!) do |negative, text, file|
step %(the "#{file}" file should exist)
regexp = Regexp.new(text, Regexp::MULTILINE)
if negative.nil? || negative.empty?
if Jekyll::Utils::Platforms.really_windows?
expect(file_contents(file)).to match regexp
else
if Platform.supports_symlink?
expect(file_contents(file)).not_to match regexp
else
expect(file_contents(file)).to match regexp
end
end
end
#
Then(%r!^I should (not )?see "(.*)" in "(.*)" unless Windows$!) do |negative, text, file|
Then(%r!^I should (not )?see "(.*)" in "(.*)" if platform supports symlinks$!) do |negative, text, file|
step %(the "#{file}" file should exist)
regexp = Regexp.new(text, Regexp::MULTILINE)
if negative.nil? || negative.empty?
if Jekyll::Utils::Platforms.really_windows?
expect(file_contents(file)).not_to match regexp
else
if Platform.supports_symlink?
expect(file_contents(file)).to match regexp
else
expect(file_contents(file)).not_to match regexp
end
end
end

View File

@@ -1,222 +1,80 @@
# frozen_string_literal: true
require "fileutils"
require "colorator"
require "cucumber/formatter/console"
require "cucumber/formatter/io"
module Jekyll
module Cucumber
class Formatter
attr_accessor :indent, :runtime
include ::Cucumber::Formatter::Console
include ::Cucumber::Formatter::Io
include FileUtils
CHARS = {
:failed => "\u2718".red,
:pending => "\u203D".yellow,
:undefined => "\u2718".red,
:passed => "\u2714".green,
:skipped => "\u203D".blue,
}.freeze
#
def initialize(runtime, path_or_io, options)
@runtime = runtime
@snippets_input = []
@io = ensure_io(path_or_io)
@prefixes = options[:prefixes] || {}
@delayed_messages = []
@options = options
@exceptions = []
@indent = 0
def initialize(path_or_io, error_stream)
@io = ensure_io(path_or_io, error_stream)
@timings = {}
end
#
def before_features(_features)
print_profile_information
def before_test_case(test_case)
@timings[timing_key(test_case)] = Time.now
end
#
def after_features(features)
@io.puts
print_worst_offenders
print_summary(features)
def after_test_case(test_case)
@timings[timing_key(test_case)] = Time.now - @timings[timing_key(test_case)]
end
#
def before_feature(_feature)
@exceptions = []
@indent = 0
end
#
def feature_element_timing_key(feature_element)
"\"#{feature_element.name}\" (#{feature_element.location})"
end
#
def before_feature_element(feature_element)
@indent = 2
@scenario_indent = 2
@timings[feature_element_timing_key(feature_element)] = Time.now
end
#
def after_feature_element(feature_element)
@timings[feature_element_timing_key(feature_element)] = Time.now - @timings[feature_element_timing_key(feature_element)]
@io.print " (#{@timings[feature_element_timing_key(feature_element)]}s)"
end
#
def tag_name(tag_name); end
def comment_line(comment_line); end
def after_tags(tags); end
#
def before_background(_background)
@scenario_indent = 2
@in_background = true
@indent = 2
end
#
def after_background(_background)
@in_background = nil
end
#
def background_name(keyword, name, source_line, indent)
print_feature_element_name(
keyword, name, source_line, indent
)
end
#
def scenario_name(keyword, name, source_line, indent)
print_feature_element_name(
keyword, name, source_line, indent
)
end
#
def before_step(step)
@current_step = step
end
#
# rubocop:disable Metrics/ParameterLists
def before_step_result(_keyword, _step_match, _multiline_arg, status, exception, \
_source_indent, background, _file_colon_line)
@hide_this_step = false
if exception
if @exceptions.include?(exception)
@hide_this_step = true
return
end
@exceptions << exception
end
if status != :failed && @in_background ^ background
@hide_this_step = true
return
end
@status = status
end
#
def step_name(_keyword, _step_match, status, _source_indent, _background, _file_colon_line)
@io.print CHARS[status]
@io.print " "
end
# rubocop:enable Metrics/ParameterLists
#
def exception(exception, status)
return if @hide_this_step
@io.puts
print_exception(exception, status, @indent)
def print_test_case_info(test_case)
@io.print "\n#{test_case.location} #{truncate(test_case.name).inspect} "
@io.flush
end
#
def after_test_step(test_step, result)
collect_snippet_data(
test_step, result
)
def print_test_case_duration(test_case)
@io.print format(" (%.3fs)", @timings[timing_key(test_case)])
end
#
def print_feature_element_name(feature_element)
@io.print "\n#{feature_element.location} Scenario: #{feature_element.name} "
@io.flush
end
#
def cell_prefix(status)
@prefixes[status]
end
#
def print_worst_offenders
@io.puts
@io.puts "Worst offenders:"
@timings.sort_by { |_f, t| -t }.take(10).each do |(f, t)|
@io.puts " #{t}s for #{f}"
end
@io.puts
@io.puts "\n\nWorst offenders:"
rows = @timings.sort_by { |_f, t| -t }.take(10).map! { |r| r[0].split(" \t ", 2).push(r[1]) }
padding = rows.max_by { |r| r[0].length }.first.length + 2
rows.each { |row| @io.puts format_row_data(row, padding) }
end
#
private
def print_summary(features)
@io.puts
print_stats(features, @options)
print_snippets(@options)
print_passing_wip(@options)
def format_row_data(row, padding)
[
row[0].ljust(padding).rjust(padding + 2),
row[1].ljust(45),
format("(%.3fs)", row[2]),
].join
end
def timing_key(test_case)
"#{test_case.location} \t #{truncate(test_case.name).inspect}"
end
def truncate(input, max_len: 40)
str = input.to_s
str.length > max_len ? "#{str[0..(max_len - 2)]}..." : str
end
end
end
end
AfterConfiguration do |config|
f = Jekyll::Cucumber::Formatter.new(nil, $stdout, {})
InstallPlugin do |config|
progress_fmt = config.to_hash[:formats][0][0] == "progress"
f = Jekyll::Cucumber::Formatter.new($stdout, $stderr)
config.on_event :test_case_started do |event|
f.print_feature_element_name(event.test_case)
f.before_feature_element(event.test_case)
test_case = event.test_case
f.print_test_case_info(test_case) if progress_fmt
f.before_test_case(test_case)
end
config.on_event :test_case_finished do |event|
f.after_feature_element(event.test_case)
test_case = event.test_case
f.after_test_case(test_case)
f.print_test_case_duration(test_case) if progress_fmt
end
config.on_event :test_run_finished do

View File

@@ -18,6 +18,13 @@ class Paths
def self.source_dir; SOURCE_DIR; end
end
class Platform
REF_FILE = File.expand_path("../../test/source/symlink-test/symlinked-file", __dir__)
def self.supports_symlink?; File.symlink?(REF_FILE); end
end
#
def file_content_from_hash(input_hash)

View File

@@ -19,7 +19,7 @@ Feature: Writing themes
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see ".sample { color: red; }\n\n\/\*# sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
And I should see ".sample {\n color: red;\n}\n\n\/\*# sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
Scenario: Overriding a theme with SCSS
Given I have a configuration file with "theme" set to "test-theme"
@@ -28,7 +28,7 @@ Feature: Writing themes
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see ".sample { color: black; }\n\n\/\*# sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
And I should see ".sample {\n color: black;\n}\n\n\/\*# sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
Scenario: A theme with an include
Given I have a configuration file with "theme" set to "test-theme"

View File

@@ -1,4 +1,4 @@
---
---
@import "main";
@import "base";

View File

@@ -45,8 +45,6 @@ module Jekyll
autoload :Collection, "jekyll/collection"
autoload :Configuration, "jekyll/configuration"
autoload :Convertible, "jekyll/convertible"
autoload :DataEntry, "jekyll/data_entry"
autoload :DataHash, "jekyll/data_hash"
autoload :Deprecator, "jekyll/deprecator"
autoload :Document, "jekyll/document"
autoload :EntryFilter, "jekyll/entry_filter"

View File

@@ -88,7 +88,7 @@ module Jekyll
Jekyll.logger.error <<~STR
We have detected that there might be trouble using fsevent on your
operating system, you can read https://github.com/thibaudgg/rb-fsevent/wiki/no-fsevents-fired-(OSX-bug)
for possible work arounds or you can work around it immediately
for possible workarounds or you can work around it immediately
with `--force-polling`.
STR

View File

@@ -97,7 +97,7 @@ module Jekyll
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "wdm", "~> 0.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.

View File

@@ -1,83 +0,0 @@
# frozen_string_literal: true
module Jekyll
class DataEntry
attr_accessor :context
attr_reader :data
# Create a Jekyll wrapper for given parsed data object.
#
# site - The current Jekyll::Site instance.
# abs_path - Absolute path to the data source file.
# parsed_data - Parsed representation of data source file contents.
#
# Returns nothing.
def initialize(site, abs_path, parsed_data)
@site = site
@path = abs_path
@data = parsed_data
end
# Liquid representation of current instance is the parsed data object.
#
# Mark as a dependency for regeneration here since every renderable object primarily uses the
# parsed data object while the parent resource is being rendered by Liquid. Accessing the data
# object directly via Ruby interface `#[]()` is outside the scope of regeneration.
#
# FIXME: Marking as dependency on every call is non-ideal. Optimize at later day.
#
# Returns the parsed data object.
def to_liquid
add_regenerator_dependencies if incremental_build?
@data
end
# -- Overrides to maintain backwards compatibility --
# Any missing method will be forwarded to the underlying data object stored in the instance
# variable `@data`.
def method_missing(method, *args, &block)
@data.respond_to?(method) ? @data.send(method, *args, &block) : super
end
def respond_to_missing?(method, *)
@data.respond_to?(method) || super
end
def <=>(other)
data <=> (other.is_a?(self.class) ? other.data : other)
end
def ==(other)
data == (other.is_a?(self.class) ? other.data : other)
end
# Explicitly defined to bypass re-routing from `method_missing` hook for greater performance.
#
# Returns string representation of parsed data object.
def inspect
@data.inspect
end
private
def incremental_build?
@incremental = @site.config["incremental"] if @incremental.nil?
@incremental
end
def add_regenerator_dependencies
page = context.registers[:page]
return unless page&.key?("path")
absolute_path = \
if page["collection"]
@site.in_source_dir(@site.config["collections_dir"], page["path"])
else
@site.in_source_dir(page["path"])
end
@site.regenerator.add_dependency(absolute_path, @path)
end
end
end

View File

@@ -1,61 +0,0 @@
# frozen_string_literal: true
module Jekyll
# A class that behaves very similar to Ruby's `Hash` class yet different in how it is handled by
# Liquid. This class emulates Hash by delegation instead of inheritance to minimize overridden
# methods especially since some Hash methods returns another Hash instance instead of the
# subclass instance.
class DataHash
#
# Delegate given (zero-arity) method(s) to the Hash object stored in instance variable
# `@registry`.
# NOTE: Avoiding the use of `Forwardable` module's `def_delegators` for preventing unnecessary
# creation of interim objects on multiple calls.
def self.delegate_to_registry(*symbols)
symbols.each { |sym| define_method(sym) { @registry.send(sym) } }
end
private_class_method :delegate_to_registry
# -- core instance methods --
attr_accessor :context
def initialize
@registry = {}
end
def [](key)
@registry[key].tap do |value|
value.context = context if value.respond_to?(:context=)
end
end
# `Hash#to_liquid` returns the Hash instance itself.
# Mimic that behavior by returning `self` instead of returning the `@registry` variable value.
def to_liquid
self
end
# -- supplementary instance methods to emulate Hash --
delegate_to_registry :freeze, :inspect
def merge(other, &block)
merged_registry = @registry.merge(other, &block)
dup.tap { |d| d.instance_variable_set(:@registry, merged_registry) }
end
def merge!(other, &block)
@registry.merge!(other, &block)
self
end
def method_missing(method, *args, &block)
@registry.send(method, *args, &block)
end
def respond_to_missing?(method, *)
@registry.respond_to?(method)
end
end
end

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
@@ -26,6 +25,10 @@ module Jekyll
fallback_data["excerpt"].to_s
end
def name
fallback_data["name"] || @obj.basename
end
def <=>(other)
return nil unless other.is_a? DocumentDrop

View File

@@ -16,7 +16,7 @@ module Jekyll
end
def name
@obj.doc.basename
@obj.doc.data["name"] || @obj.doc.basename
end
end
end

View File

@@ -7,6 +7,7 @@ module Jekyll
mutable false
delegate_method_as :site_data, :data
delegate_methods :time, :pages, :static_files, :tags, :categories
private delegate_method_as :config, :fallback_data
@@ -23,12 +24,6 @@ module Jekyll
(key != "posts" && @obj.collections.key?(key)) || super
end
def data
@obj.site_data.tap do |value|
value.context = @context if value.respond_to?(:context=)
end
end
def posts
@site_posts ||= @obj.posts.docs.sort { |a, b| b <=> a }
end

View File

@@ -3,9 +3,12 @@
module Jekyll
module Drops
class ThemeDrop < Drop
delegate_methods :root
delegate_method_as :runtime_dependencies, :dependencies
def root
@root ||= ENV["JEKYLL_ENV"] == "development" ? @obj.root : ""
end
def authors
@authors ||= gemspec.authors.join(", ")
end

View File

@@ -15,16 +15,12 @@ module Jekyll
private
# rubocop:disable Metrics/AbcSize
def data_for_table(num_of_rows)
sorted = @stats.sort_by { |_, file_stats| -file_stats[:time] }
sorted = sorted.slice(0, num_of_rows)
table = [header_labels]
totals = Hash.new { |hash, key| hash[key] = 0 }
sorted.each do |filename, file_stats|
GAUGES.each { |gauge| totals[gauge] += file_stats[gauge] }
row = []
row << filename
row << file_stats[:count].to_s
@@ -33,14 +29,8 @@ module Jekyll
table << row
end
footer = []
footer << "TOTAL (for #{sorted.size} files)"
footer << totals[:count].to_s
footer << format_bytes(totals[:bytes])
footer << format("%.3f", totals[:time])
table << footer
table
end
# rubocop:enable Metrics/AbcSize
def header_labels
GAUGES.map { |gauge| gauge.to_s.capitalize }.unshift("Filename")

View File

@@ -33,18 +33,14 @@ module Jekyll
def profile_process
profile_data = { "PHASE" => "TIME" }
total_time = 0
[:reset, :read, :generate, :render, :cleanup, :write].each do |method|
start_time = Time.now
@site.send(method)
end_time = (Time.now - start_time).round(4)
profile_data[method.to_s.upcase] = format("%.4f", end_time)
total_time += end_time
end
profile_data["TOTAL TIME"] = format("%.4f", total_time)
Jekyll.logger.info "\nBuild Process Summary:"
Jekyll.logger.info Profiler.tabulate(Array(profile_data))

View File

@@ -6,7 +6,7 @@ module Jekyll
def initialize(site, in_source_dir: nil)
@site = site
@content = DataHash.new
@content = {}
@entry_filter = EntryFilter.new(site)
@in_source_dir = in_source_dir || @site.method(:in_source_dir)
@source_dir = @in_source_dir.call("/")
@@ -24,8 +24,6 @@ module Jekyll
@content
end
# rubocop:disable Metrics/AbcSize
# Read and parse all .yaml, .yml, .json, .csv and .tsv
# files under <dir> and add them to the <data> variable.
#
@@ -45,14 +43,13 @@ module Jekyll
next if @entry_filter.symlink?(path)
if File.directory?(path)
read_data_to(path, data[sanitize_filename(entry)] = DataHash.new)
read_data_to(path, data[sanitize_filename(entry)] = {})
else
key = sanitize_filename(File.basename(entry, ".*"))
data[key] = DataEntry.new(site, path, read_data_file(path))
data[key] = read_data_file(path)
end
end
end
# rubocop:enable Metrics/AbcSize
# Determines how to read a data file.
#

View File

@@ -360,15 +360,9 @@ module Jekyll
end
def each_site_file
seen_files = []
%w(pages static_files_to_write docs_to_write).each do |type|
send(type).each do |item|
next if seen_files.include?(item)
yield item
seen_files << item
end
end
pages.each { |page| yield page }
static_files.each { |file| yield(file) if file.write? }
collections.each_value { |coll| coll.docs.each { |doc| yield(doc) if doc.write? } }
end
# Returns the FrontmatterDefaults or creates a new FrontmatterDefaults

View File

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

View File

@@ -47,14 +47,7 @@ module Jekyll
end
def mergable?(value)
case value
when Hash, Drops::Drop, DataHash
true
when DataEntry
mergable?(value.data)
else
false
end
value.is_a?(Hash) || value.is_a?(Drops::Drop)
end
def duplicable?(obj)

View File

@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Jekyll
VERSION = "4.3.0"
VERSION = "4.3.4"
end

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
time ruby -S bundle exec cucumber \
--format progress --publish "$@"
--format progress --publish-quiet "$@"

View File

@@ -93,6 +93,37 @@ module DirectoryHelpers
end
end
module Jekyll
#
# --- NOTE: ---
#
# This monkey-patch was introduced because GitHub Actions on Windows acknowledges symlinked test
# file `test/source/symlink-test/symlinked-file-outside-source` but errors out since the linked
# location `/etc/passwd` does not exist on Windows.
#
# --- TODO: ---
#
# Consider having the `symlinked-file-outside-source` point to a file that is outside the
# `source_dir` (defaults to `test/source`) yet is certain to exist on tested platforms.
# For example, `jekyll.gemspec` is a good candidate.
#
# This monkey-patch will then no longer be necessary.
#
class ModifiedReader < Reader
def read_directories(dir = "")
if dir.start_with?("/symlink") && Utils::Platforms.really_windows?
Jekyll.logger.debug "Skipping:", "Jekyll does not support symlinks on Windows"
else
super
end
end
end
Hooks.register :site, :after_init do |site|
site.instance_variable_set(:@reader, ModifiedReader.new(site))
end
end
class JekyllUnitTest < Minitest::Test
include ::RSpec::Mocks::ExampleMethods
include DirectoryHelpers

View File

@@ -1 +0,0 @@
true

View File

@@ -1,4 +0,0 @@
- java
- ruby
- rust
- golang

View File

@@ -0,0 +1,5 @@
---
name: launcher
---
`name` defined in front matter.

View File

@@ -0,0 +1,4 @@
---
---
No `name` in front matter.

View File

@@ -1,34 +0,0 @@
# frozen_string_literal: true
require "helper"
class TestDataEntry < JekyllUnitTest
context "Data Entry" do
setup do
site = fixture_site
site.read
@data_hash = site.site_data
end
should "expose underlying data object es Liquid representation" do
subject = @data_hash["languages"]
assert_equal Jekyll::DataEntry, subject.class
assert_equal subject.data, subject.to_liquid
end
should "respond to `#[](key)` when expected to but raise Exception otherwise" do
greeting = @data_hash["greetings"]
assert greeting["foo"]
boolean = @data_hash["boolean"] # the value is a Boolean.
assert_raises(NoMethodError) { boolean["foo"] }
end
should "compare with another instance of same class using underlying data" do
assert_equal(
[%w(java ruby), %w(java ruby rust golang)],
[@data_hash["languages_plus"], @data_hash["languages"]].sort
)
end
end
end

View File

@@ -1,57 +0,0 @@
# frozen_string_literal: true
require "helper"
class TestDataHash < JekyllUnitTest
context "Data Hash" do
setup do
@site = fixture_site
@site.read
end
should "only mimic a ::Hash instance" do
subject = @site.site_data
assert_equal Jekyll::DataHash, subject.class
refute subject.is_a?(Hash)
copy = subject.dup
assert copy["greetings"]["foo"]
assert_includes copy.dig("greetings", "foo"), "Hello!"
copy["greetings"] = "Hola!"
assert_equal "Hola!", copy["greetings"]
refute copy["greetings"]["foo"]
frozen_data_hash = Jekyll::DataHash.new.freeze
assert_raises(FrozenError) { frozen_data_hash["lorem"] = "ipsum" }
end
should "be mergable" do
alpha = Jekyll::DataHash.new
beta = Jekyll::DataHash.new
assert_equal "{}", alpha.inspect
sample_data = { "foo" => "bar" }
assert_equal sample_data["foo"], alpha.merge(sample_data)["foo"]
assert_equal alpha.class, alpha.merge(sample_data).class
assert_empty alpha
beta.merge!(sample_data)
assert_equal sample_data["foo"], alpha.merge(beta)["foo"]
assert_equal alpha.class, alpha.merge(beta).class
assert_empty alpha
beta.merge!(@site.site_data)
assert_equal alpha.class, beta.class
assert_includes beta.dig("greetings", "foo"), "Hello!"
assert_empty alpha
assert_equal sample_data["foo"], Jekyll::Utils.deep_merge_hashes(alpha, sample_data)["foo"]
assert_includes(
Jekyll::Utils.deep_merge_hashes(alpha, beta).dig("greetings", "foo"),
"Hello!"
)
end
end
end

View File

@@ -159,6 +159,23 @@ class TestDocument < JekyllUnitTest
should "output its relative path as path in Liquid" do
assert_equal "_methods/configuration.md", @document.to_liquid["path"]
end
context "when rendered with Liquid" do
should "respect the front matter definition" do
site = fixture_site("collections" => ["roles"]).tap(&:process)
docs = site.collections["roles"].docs
# Ruby context: doc.basename is aliased as doc.to_liquid["name"] by default.
document = docs.detect { |d| d.relative_path == "_roles/unnamed.md" }
assert_equal "unnamed.md", document.basename
assert_equal "unnamed.md", document.to_liquid["name"]
document = docs.detect { |d| d.relative_path == "_roles/named.md" }
assert_equal "named.md", document.basename
assert_equal "launcher", document.to_liquid["name"]
end
end
end
context "a document as part of a collection with front matter defaults" do

View File

@@ -143,7 +143,7 @@ class TestFilters < JekyllUnitTest
should "sassify with simple string" do
assert_equal(
"p { color: #123456; }\n",
"p {\n color: #123456;\n}",
@filter.sassify(<<~SASS)
$blue: #123456
p
@@ -154,7 +154,7 @@ class TestFilters < JekyllUnitTest
should "scssify with simple string" do
assert_equal(
"p { color: #123456; }\n",
"p {\n color: #123456;\n}",
@filter.scssify("$blue:#123456; p{color: $blue}")
)
end
@@ -718,7 +718,7 @@ class TestFilters < JekyllUnitTest
{
"name" => name,
:v => 1,
:thing => M.new(:kay => "jewelers"),
:thing => M.new({:kay => "jewelers"}),
:stuff => true,
}
end

View File

@@ -15,7 +15,9 @@ class TestSass < JekyllUnitTest
should "import SCSS partial" do
result = <<~CSS
.half { width: 50%; }
.half {
width: 50%;
}
/*# sourceMappingURL=main.css.map */
CSS

View File

@@ -38,7 +38,7 @@ class TestThemeAssetsReader < JekyllUnitTest
file = @site.pages.find { |f| f.relative_path == "assets/style.scss" }
refute_nil file
assert_equal @site.in_dest_dir("assets/style.css"), file.destination(@site.dest)
assert_includes file.output, ".sample { color: black; }"
assert_includes file.output, ".sample {\n color: black;\n}"
end
should "not overwrite site content with the same relative path" do

View File

@@ -22,7 +22,7 @@ class TestThemeDrop < JekyllUnitTest
"dependencies" => [],
"description" => "This is a theme used to test Jekyll",
"metadata" => {},
"root" => theme_dir,
"root" => "",
"version" => "0.1.0",
}
expected.each_key do |key|
@@ -30,5 +30,22 @@ class TestThemeDrop < JekyllUnitTest
assert_equal expected[key], @drop[key]
end
end
should "render gem root only in development mode" do
with_env("JEKYLL_ENV", nil) do
drop = fixture_site("theme" => "test-theme").to_liquid.theme
assert_equal "", drop["root"]
end
with_env("JEKYLL_ENV", "development") do
drop = fixture_site("theme" => "test-theme").to_liquid.theme
assert_equal theme_dir, drop["root"]
end
with_env("JEKYLL_ENV", "production") do
drop = fixture_site("theme" => "test-theme").to_liquid.theme
assert_equal "", drop["root"]
end
end
end
end