Compare commits

...

252 Commits

Author SHA1 Message Date
Pat Hawks
b0c591a3f2 Add Inline Markdown converter 2016-10-27 20:30:32 -05:00
David Stosik
167af4552b Avoid modifying existing test's behavior in my PR 2016-10-24 01:03:53 +09:00
David Stosik
3cc4bef2e6 Fix Rubocop errors 2016-10-24 00:39:09 +09:00
David Stosik
4785f6f71f Provide an "inline" mode to markdownify filter 2016-10-24 00:01:09 +09:00
jekyllbot
12a86c1298 Update history to reflect merge of #5504 [ci skip] 2016-10-21 13:58:47 -07:00
jekyllbot
0ce9d726f5 Merge pull request #5504 from baiyangcao/patch-2
Merge pull request 5504
2016-10-21 13:58:47 -07:00
baiyangcao
d6844d284c Update deployment-methods.md 2016-10-21 13:30:26 +08:00
jekyllbot
4d597643ec Update history to reflect merge of #5502 [ci skip] 2016-10-20 13:12:08 -07:00
jekyllbot
343d5f7be5 Merge pull request #5502 from DirtyF/docs-jekyll-hook-outdated
Merge pull request 5502
2016-10-20 13:12:07 -07:00
Frank Taillandier
11a0b6578e Remove jekyll-hook from deployment methods 2016-10-20 21:12:16 +02:00
jekyllbot
3431c9f7b8 Update history to reflect merge of #5495 [ci skip] 2016-10-19 21:24:11 -07:00
jekyllbot
eca7f46749 Merge pull request #5495 from jekyll/pr/layouts-error
Merge pull request 5495
2016-10-19 21:24:11 -07:00
jekyllbot
821a845166 Update history to reflect merge of #5496 [ci skip] 2016-10-19 12:10:11 -07:00
jekyllbot
d979b4bf9b Merge pull request #5496 from jekyll/pr/rubocop
Merge pull request 5496
2016-10-19 12:10:11 -07:00
jekyllbot
124c63fd59 Update history to reflect merge of #5492 [ci skip] 2016-10-19 10:58:48 -07:00
jekyllbot
89bbb249af Merge pull request #5492 from tnhu/patch-2
Merge pull request 5492
2016-10-19 10:58:48 -07:00
jekyllbot
344d07cb55 Update history to reflect merge of #5497 [ci skip] 2016-10-19 10:40:43 -07:00
jekyllbot
0484986c16 Merge pull request #5497 from kingscott/master
Merge pull request 5497
2016-10-19 10:40:42 -07:00
Scott King
c7d0dda5a7 Add comment about gem outdated 2016-10-19 09:40:43 -04:00
Tan Nhu
ea72f98609 Fix typo 2016-10-19 00:53:44 -07:00
jekyllbot
0f5c34d16d Update history to reflect merge of #5494 [ci skip] 2016-10-18 18:38:14 -07:00
jekyllbot
0d8e21f779 Merge pull request #5494 from jekyll/pr/gsub
Merge pull request 5494
2016-10-18 18:38:13 -07:00
Scott King
2be5d56059 Fix some typos 2016-10-18 21:32:40 -04:00
Scott King
e6829b5949 Fix some typos 2016-10-18 21:15:50 -04:00
Scott King
8a4edc550b Add info about checking version + updating 2016-10-18 21:07:58 -04:00
Pat Hawks
cc1972848d Restrict Rubocop version 2016-10-18 19:51:54 -05:00
Pat Hawks
51d9be83a1 Do not swallow all exceptions on render 2016-10-18 19:45:03 -05:00
Pat Hawks
c4a23b4ced Collapse gsub 2016-10-18 18:53:54 -05:00
Tan Nhu
b9275920dd Update jekyll-include-absolute-plugin description 2016-10-18 09:52:57 -07:00
jekyllbot
53d20bc77e Update history to reflect merge of #5479 [ci skip] 2016-10-18 09:51:45 -07:00
jekyllbot
7aa9c3f12c Merge pull request #5479 from ashmaroli/test-script
Merge pull request 5479
2016-10-18 09:51:45 -07:00
Tan Nhu
00e3c979c9 Add jekyll-include-absolute-plugin 2016-10-18 09:51:16 -07:00
jekyllbot
0a1c837755 Update history to reflect merge of #5489 [ci skip] 2016-10-18 09:50:50 -07:00
jekyllbot
7c901baac1 Merge pull request #5489 from ashmaroli/rubocop-fix
Merge pull request 5489
2016-10-18 09:50:49 -07:00
jekyllbot
1f9c2b1380 Update history to reflect merge of #5491 [ci skip] 2016-10-18 09:49:12 -07:00
jekyllbot
146d5930a4 Merge pull request #5491 from ashmaroli/patch-1
Merge pull request 5491
2016-10-18 09:49:12 -07:00
ashmaroli
6ec86f4207 Add jekyll-data to the list of plugins 2016-10-18 16:20:41 +05:30
Ashwin Maroli
d1f67bf85a fix rubocop errors on testing with Rubocop 0.44
- have the new `Metrics/BlockLength` cop ignore test files and
    `jekyll/configuration.rb`
  - have `AllCops` ignore Jekyll Executable which is not going to be
    altered in the near future.
2016-10-17 13:24:54 +05:30
jekyllbot
c9d24b7d18 Update history to reflect merge of #5472 [ci skip] 2016-10-12 17:53:51 -07:00
jekyllbot
62ec32c883 Merge pull request #5472 from codethebeard/patch-1
Merge pull request 5472
2016-10-12 17:53:51 -07:00
jekyllbot
aa97be3ab5 Update history to reflect merge of #5471 [ci skip] 2016-10-12 15:34:51 -07:00
jekyllbot
389bbe1621 Merge pull request #5471 from chrisfinazzo/normalize-css-v5
Merge pull request 5471
2016-10-12 15:34:50 -07:00
Ashwin Maroli
0d12a02893 script/test: add missing whitespace 2016-10-12 14:35:39 +05:30
jekyllbot
d4b7b44328 Update history to reflect merge of #5475 [ci skip] 2016-10-11 08:46:53 -07:00
Michael Large
6cec4aebc6 Additional typo related to pull request #5472 2016-10-11 09:05:39 -04:00
Michael Large
f2fcd17627 Fix typo in theme_template README 2016-10-10 11:10:41 -04:00
chrisfinazzo
c569edcf0a Update normalize.css to v5.0.0 2016-10-09 11:36:04 -04:00
jekyllbot
53d472b7e2 Update history to reflect merge of #5449 [ci skip] 2016-10-06 11:45:20 -07:00
jekyllbot
f93e40209c Merge pull request #5449 from DirtyF/docs-link-tag
Merge pull request 5449
2016-10-06 11:45:19 -07:00
Parker Moore
5e93ca6353 Release 💎 3.3.0 2016-10-06 11:12:15 -07:00
jekyllbot
8bac0559d1 Update history to reflect merge of #5442 [ci skip] 2016-10-06 10:41:24 -07:00
jekyllbot
b4393e2d36 Merge pull request #5442 from jekyll/3-3-release-post
Merge pull request 5442
2016-10-06 10:41:24 -07:00
jekyllbot
dc554c2cd5 Update history to reflect merge of #5456 [ci skip] 2016-10-06 10:36:50 -07:00
jekyllbot
21cd382409 Merge pull request #5456 from jekyll/revert-server-address-sig-change
Merge pull request 5456
2016-10-06 10:36:49 -07:00
jekyllbot
b37d18234a Update history to reflect merge of #5433 [ci skip] 2016-10-06 10:22:23 -07:00
jekyllbot
6f05ebb520 Merge pull request #5433 from ayastreb/5429-data-dir-with-period-in-name
Merge pull request 5433
2016-10-06 10:22:23 -07:00
Parker Moore
ed042de6c4 Oh fine, rubocop. 2016-10-06 10:15:45 -07:00
Parker Moore
7c8c825f27 Fix. 2016-10-06 10:01:55 -07:00
Parker Moore
63e4e750ec New site: lock minima to v2.x 2016-10-06 09:58:16 -07:00
Parker Moore
6d1bc6c6ea Revert Commands::Serve#server_address signature change. 2016-10-06 09:48:37 -07:00
Parker Moore
c90d44d2be Updates to 3.3.0 release post per comments. 2016-10-06 09:36:56 -07:00
jekyllbot
7133bddfb2 Update history to reflect merge of #5452 [ci skip] 2016-10-06 09:11:32 -07:00
jekyllbot
41d0ba66ea Merge pull request #5452 from danayel/change-yaml-list-link
Merge pull request 5452
2016-10-06 09:11:31 -07:00
Daniel Chapman
8ec7421c03 Update Wikipedia YAML list link
List no longer exists on that page as an id.  Basic_components holds the lists now, and at the top conveniently ✌️

I also added a second link under the tags heading.
2016-10-06 17:49:27 +09:00
Frank Taillandier
c61752a336 Fix line length 2016-10-06 01:17:26 +02:00
Parker Moore
fcef78c4b6 Revert "templates.md: {% link %} tag only accepts collection documents"
This reverts commit ab4abb1933.
2016-10-06 01:13:18 +02:00
Parker Moore
6f2d1591fc Release 💎 3.3.0.pre.rc1 2016-10-05 11:47:43 -07:00
jekyllbot
f67dfb71fe Update history to reflect merge of #4873 [ci skip] 2016-10-05 11:40:06 -07:00
jekyllbot
3de78877c0 Merge pull request #4873 from mlocher/bug-post-url
Merge pull request 4873
2016-10-05 11:40:04 -07:00
jekyllbot
38f9e93a10 Update history to reflect merge of #5212 [ci skip] 2016-10-05 11:34:53 -07:00
jekyllbot
22a7714bba Merge pull request #5212 from eloyesp/fix-excerpt-link-finder
Merge pull request 5212
2016-10-05 11:34:52 -07:00
jekyllbot
55257d2a14 Update history to reflect merge of #5256 [ci skip] 2016-10-05 11:34:07 -07:00
jekyllbot
275f5a6209 Merge pull request #5256 from kwokfu/patch-1
Merge pull request 5256
2016-10-05 11:34:06 -07:00
jekyllbot
7ea610f8c0 Update history to reflect merge of #5431 [ci skip] 2016-10-05 09:59:02 -07:00
jekyllbot
d879840cc5 Merge pull request #5431 from Crunch09/update_url_in_dev_environment
Merge pull request 5431
2016-10-05 09:59:01 -07:00
Florian Thomas
a945a65818 refactor to use server_address 2016-10-04 20:47:36 +02:00
Anatoliy Yastreb
e27a65d9e3 Sanitize directory name as a key 2016-10-04 19:39:41 +01:00
Florian Thomas
01c33907a3 default site.url in dev environment to http://localhost:4000
take `host`, `port` and `ssl` options into account
2016-10-04 20:38:46 +02:00
Parker Moore
a138b02b10 Update links in 3.3 release post 2016-10-04 11:35:42 -07:00
Parker Moore
761ddcae24 Add Jekyll 3.3 release post 2016-10-03 17:44:47 -07:00
jekyllbot
274d350d61 Update history to reflect merge of #5441 [ci skip] 2016-10-03 15:13:02 -07:00
jekyllbot
80ae013541 Merge pull request #5441 from mhw/patch-1
Merge pull request 5441
2016-10-03 15:13:01 -07:00
Mark H. Wilkinson
a0a351aa7a Remove autoload of Draft which no longer exists. 2016-10-03 22:21:35 +01:00
Anatoliy Yastreb
cff8f2994c Fix loading data from subdir with a period in name #5429 2016-10-01 13:09:50 +01:00
jekyllbot
aa901cdaba Update history to reflect merge of #5264 [ci skip] 2016-09-29 14:13:32 -07:00
jekyllbot
ef3f9d0e7a Merge pull request #5264 from DirtyF/static-file-name
Merge pull request 5264
2016-09-29 14:13:31 -07:00
jekyllbot
d716d9b7be Update history to reflect merge of #5411 [ci skip] 2016-09-29 14:02:09 -07:00
jekyllbot
5a31aacfbe Merge pull request #5411 from zdroid/patch-1
Merge pull request 5411
2016-09-29 14:02:08 -07:00
jekyllbot
7118999958 Update history to reflect merge of #5410 [ci skip] 2016-09-29 13:27:12 -07:00
jekyllbot
553fae8f17 Merge pull request #5410 from jekyll/pr/i18n-url-filters
Merge pull request 5410
2016-09-29 13:27:11 -07:00
jekyllbot
459bc17019 Update history to reflect merge of #5427 [ci skip] 2016-09-29 13:26:24 -07:00
jekyllbot
f0574e047e Merge pull request #5427 from jekyll/don-t-utime-if-symlink
Merge pull request 5427
2016-09-29 13:26:24 -07:00
jekyllbot
b38ac5d938 Update history to reflect merge of #5430 [ci skip] 2016-09-29 13:26:03 -07:00
jekyllbot
feddd7daec Merge pull request #5430 from Strangehill/patch-1
Merge pull request 5430
2016-09-29 13:26:02 -07:00
jekyllbot
1c7aa4729e Update history to reflect merge of #5412 [ci skip] 2016-09-29 13:25:30 -07:00
jekyllbot
54927d6522 Merge pull request #5412 from zdroid/editorconfig
Merge pull request 5412
2016-09-29 13:25:29 -07:00
Antonio
91ef3a7cc9 prepend 'jekyll serve' with 'bundle exec'
Best not to send mixed messages and jekyllrb's quickstart message is "bundle exec jekyll serve"
2016-09-30 02:17:08 +08:00
jekyllbot
69172bcc4a Update history to reflect merge of #5428 [ci skip] 2016-09-29 10:04:47 -07:00
jekyllbot
3d3f310a5e Merge pull request #5428 from ashmaroli/bundle2new
Merge pull request 5428
2016-09-29 10:04:47 -07:00
Jordon Bedwell
51695b2165 Travis is entirely broken.
I'm tired of getting emails from forks I don't even control or have commit to, it's not cool... at all.
2016-09-29 11:17:17 -05:00
Ashwin Maroli
5b4269eca5 document automatic bundle install 2016-09-29 08:47:26 +05:30
Parker Moore
8e91263031 StaticFile#copy_entry: don't mark modified time if path is a symlink 2016-09-28 16:55:57 -07:00
Parker Moore
fd5f2eb399 Add failing test for File.utime of a symlink in staticfile. 2016-09-28 16:54:58 -07:00
jekyllbot
682c0fc98f Update history to reflect merge of #5157 [ci skip] 2016-09-28 16:39:45 -07:00
jekyllbot
6847b604c8 Merge pull request #5157 from stevecheckoway/fix-hooks-priority-order
Merge pull request 5157
2016-09-28 16:39:44 -07:00
jekyllbot
b6d4ba56b7 Update history to reflect merge of #5210 [ci skip] 2016-09-28 16:38:00 -07:00
jekyllbot
9c197d9555 Merge pull request #5210 from jekyll/node-must-die
Merge pull request 5210
2016-09-28 16:38:00 -07:00
jekyllbot
79b0f27bf6 Update history to reflect merge of #5408 [ci skip] 2016-09-28 16:31:09 -07:00
jekyllbot
0f70bb1320 Merge pull request #5408 from ashmaroli/bundle2new
Merge pull request 5408
2016-09-28 16:31:08 -07:00
Parker Moore
d57b04782d Fix reference to #5413 2016-09-28 16:28:12 -07:00
jekyllbot
2f5b7dc1dc Update history to reflect merge of #5413 [ci skip] 2016-09-28 16:25:27 -07:00
jekyllbot
8138e67ffb Merge pull request #5413 from tf2manu994/patch-1
Merge pull request 5413
2016-09-28 16:25:26 -07:00
jekyllbot
719c0938a5 Update history to reflect merge of #5416 [ci skip] 2016-09-28 16:09:07 -07:00
jekyllbot
93c7cdf0d0 Merge pull request #5416 from ashmaroli/win-tz
Merge pull request 5416
2016-09-28 16:09:07 -07:00
Parker Moore
06651c960a Merge pull request #5325 from ashmaroli/gemspec-template-patch
update gemspec template to include only required theme files
2016-09-27 11:30:58 -07:00
jekyllbot
a920cf040b Update history to reflect merge of #5421 [ci skip] 2016-09-27 11:06:44 -07:00
jekyllbot
6c5a371b92 Merge pull request #5421 from crispgm/fix-logo
Merge pull request 5421
2016-09-27 11:06:43 -07:00
jekyllbot
157c8e888e Update history to reflect merge of #5420 [ci skip] 2016-09-27 11:06:17 -07:00
jekyllbot
a69919ecbe Merge pull request #5420 from DirtyF/site_template
Merge pull request 5420
2016-09-27 11:06:17 -07:00
Frank Taillandier
6dbb5e2df1 add contextual help for overriding theme's default 2016-09-27 11:27:29 +02:00
Frank Taillandier
c4ccfae3af rename index.html to index.md
fix https://github.com/jekyll/minima/issues/13
2016-09-27 11:12:29 +02:00
David Zhang
481901b413 Bugfix on logo in JSON-LD 2016-09-27 15:38:25 +08:00
Frank Taillandier
8321b14b29 Move contents of the index.html page to the 'home' layout 2016-09-27 08:24:58 +02:00
Manmeet Gill
81b16b24fc Change to 2.2.5 instead of 2.2.2
We don't need 2.2.2 exactly, switching to 2.2.5 shaves a solid 30 seconds off build time, as it is preinstalled on travis
2016-09-26 16:38:00 +10:00
Ashwin Maroli
6b6ce3cf18 use UTC format in timezone 2016-09-25 23:11:51 +05:30
Manmeet Gill
6366f56c21 Fix Travis.ci documentation 2016-09-25 16:26:43 +10:00
Zlatan Vasović
5df8ef5717 Add .editorconfig 2016-09-24 23:21:33 +02:00
jekyllbot
d79ca534e4 Update history to reflect merge of #5405 [ci skip] 2016-09-24 13:38:44 -07:00
jekyllbot
5c55d95446 Merge pull request #5405 from jekyll/relative_url_and_absolute_url
Merge pull request 5405
2016-09-24 13:38:43 -07:00
Pat Hawks
2b30c06140 Use Addressable to better deal with i18n URLs 2016-09-24 15:34:00 -05:00
Zlatan Vasović
fc6f7802a2 Replace classic box-sizing reset with inheritance reset
Reference: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
2016-09-24 22:14:49 +02:00
Pat Hawks
aebf711c61 Failing tests: URL filters choke on i18n 2016-09-24 15:11:04 -05:00
Heng Kwokfu
bacb300876 Skip Windows tests in non-Windows environment. 2016-09-24 21:55:02 +08:00
Ashwin Maroli
3966a37d71 swallow bundle output in CI 2016-09-24 13:48:22 +05:30
jekyllbot
93c5f71faf Update history to reflect merge of #5403 [ci skip] 2016-09-23 17:46:41 -07:00
jekyllbot
59fa8549f9 Merge pull request #5403 from chrisfinazzo/macOS
Merge pull request 5403
2016-09-23 17:46:41 -07:00
Heng Kwokfu
db53213d16 Merge remote-tracking branch 'jekyll/master' into patch-1 2016-09-24 08:46:24 +08:00
jekyllbot
9564782054 Update history to reflect merge of #5402 [ci skip] 2016-09-23 14:30:39 -07:00
jekyllbot
aaa062b047 Merge pull request #5402 from ashmaroli/jekyll-new-assets
Merge pull request 5402
2016-09-23 14:30:39 -07:00
Parker Moore
8e027fced9 Add documentation for relative_url and absolute_url 2016-09-23 14:27:40 -07:00
jekyllbot
f277baa975 Update history to reflect merge of #5399 [ci skip] 2016-09-23 14:18:02 -07:00
jekyllbot
8197e17495 Merge pull request #5399 from jekyll/relative_url_and_absolute_url
Merge pull request 5399
2016-09-23 14:18:01 -07:00
Chris Finazzo
69937373bd macOS and one grammar fix 2016-09-23 14:47:23 -04:00
Ashwin Maroli
0dc15dba88 remove css/ from new site scaffolding
css directory and its contents to be handled by theme's `assets/`
directory.
The directory removed here wil be added to minima gem.
2016-09-23 18:00:13 +05:30
Parker Moore
fa96843555 URLFilters: Simplify ensure_leading_slash calls. 2016-09-22 20:58:26 -07:00
jekyllbot
6571ea0c1a Update history to reflect merge of #5338 [ci skip] 2016-09-22 20:50:48 -07:00
jekyllbot
992be253a6 Merge pull request #5338 from ashmaroli/config-patch
Merge pull request 5338
2016-09-22 20:50:47 -07:00
jekyllbot
081d7c016a Update history to reflect merge of #5397 [ci skip] 2016-09-22 16:56:05 -07:00
jekyllbot
2a02c798ac Merge pull request #5397 from jekyll/add-jekyll-menus
Merge pull request 5397
2016-09-22 16:56:04 -07:00
Parker Moore
eab6752f52 Consolidate ensure_leading_slash to 2 lines. 2016-09-22 14:40:20 -07:00
Parker Moore
aa86651650 Add absolute_url and relative_url filters. 2016-09-22 14:16:00 -07:00
Jordon Bedwell
ae27db62eb Add jekyll-menus to the list of plugins. 2016-09-22 09:51:37 -05:00
jekyllbot
87c745573f Update history to reflect merge of #5389 [ci skip] 2016-09-21 13:29:38 -07:00
jekyllbot
25d4291d62 Merge pull request #5389 from ashmaroli/cucumber-with-access
Merge pull request 5389
2016-09-21 13:29:38 -07:00
Ashwin Maroli
588b3a6649 remove features dirs on windows with proper access 2016-09-21 22:42:01 +05:30
Ashwin Maroli
99fc60e28c update template to include theme files 2016-09-21 06:29:34 +05:30
jekyllbot
846ab94f43 Update history to reflect merge of #5375 [ci skip] 2016-09-20 17:05:49 -07:00
jekyllbot
3a7cbadd82 Merge pull request #5375 from Nicop06/underscore_highlight
Merge pull request 5375
2016-09-20 17:05:49 -07:00
jekyllbot
f3859384c0 Update history to reflect merge of #5376 [ci skip] 2016-09-20 17:04:58 -07:00
jekyllbot
ee84a95a38 Merge pull request #5376 from jonblatho/master
Merge pull request 5376
2016-09-20 17:04:57 -07:00
Parker Moore
9ae0a7023b Move reference to #5380. 2016-09-20 17:04:26 -07:00
jekyllbot
1ac87eaae2 Update history to reflect merge of #5380 [ci skip] 2016-09-20 16:39:33 -07:00
jekyllbot
cfe61771e0 Merge pull request #5380 from ethomson/coderay_deprecation
Merge pull request 5380
2016-09-20 16:39:33 -07:00
jekyllbot
262be85c49 Update history to reflect merge of #5237 [ci skip] 2016-09-20 15:32:26 -07:00
jekyllbot
504411e476 Merge pull request #5237 from ashmaroli/bundle2new
Merge pull request 5237
2016-09-20 15:32:25 -07:00
Parker Moore
650a3c7932 Update history to reflect merge of #5369 2016-09-20 13:48:40 -07:00
jekyllbot
ad0f329d1c Merge pull request #5369 from MertcanGokgoz/patch-1
Merge pull request 5369
2016-09-20 13:44:51 -07:00
jekyllbot
152fa877f6 Update history to reflect merge of #5364 [ci skip] 2016-09-20 13:40:11 -07:00
jekyllbot
3a45bf7d26 Merge pull request #5364 from jekyll/themes-asset-folder
Merge pull request 5364
2016-09-20 13:40:11 -07:00
Parker Moore
279f1516d2 Merge branch 'master' into themes-asset-folder
* master:
  Update history to reflect merge of #5381 [ci skip]
  Update history to reflect merge of #5383 [ci skip]
  run features on windows
  Appease Rubocop
  Update history to reflect merge of #5372 [ci skip]
  Add missing period to sentence in first paragraph.
2016-09-20 13:13:01 -07:00
Parker Moore
29d8fee4ce Add test to ensure that the /assets theme reader doesn't clobber preexisting site files. 2016-09-20 13:12:34 -07:00
jekyllbot
950a37395f Update history to reflect merge of #5381 [ci skip] 2016-09-20 13:10:49 -07:00
jekyllbot
d8d42f6abc Merge pull request #5381 from pathawks/pr/rubocop
Merge pull request 5381
2016-09-20 13:10:48 -07:00
jekyllbot
92dbe313e9 Update history to reflect merge of #5383 [ci skip] 2016-09-20 09:26:40 -07:00
jekyllbot
2eedf7d79c Merge pull request #5383 from ashmaroli/ruby-cucumber
Merge pull request 5383
2016-09-20 09:26:39 -07:00
Ashwin Maroli
75d59911ae run features on windows 2016-09-20 10:28:54 +05:30
Parker Moore
b78827cecb Add documentation for assets. 2016-09-19 13:57:36 -07:00
Parker Moore
7309ecf8e1 Theme: for various path helpers, use strings. Symbols confuse people. 2016-09-19 13:47:51 -07:00
Pat Hawks
3bfdc00d14 Appease Rubocop 2016-09-19 13:15:02 -05:00
Jonathan Thornton
f2bfc832a0 Marking filename with backticks as suggested 2016-09-19 12:08:20 -05:00
Edward Thomson
054b23f69a Only complain about coderay if it is actually in the config
Don't complain about the deprecated `kramdown.coderay` key when
`highlighter == "coderay"`, since that could have been set with the
legitimate `syntax_highlighter: coderay` setting.  Instead, complain
only if the `kramdown.coderay` configuration setting is actually
present.
2016-09-19 11:38:05 -05:00
Nicolas Porcel
0b94cf3fa1 Allow underscore in highlighter language 2016-09-19 13:10:29 +02:00
Jonathan Thornton
1a11536a2c Clarify documentation in README
This change is subtle, but may prove greatly useful to Jekyll newbies
2016-09-18 17:38:28 -05:00
Parker Moore
74baeb889a ThemeAssetsReader: fix tests so everything passes. 2016-09-18 15:04:15 -04:00
jekyllbot
7a9427ccec Update history to reflect merge of #5372 [ci skip] 2016-09-18 10:54:26 -07:00
jekyllbot
5a1c5311f3 Merge pull request #5372 from kyleobrien/patch-1
Merge pull request 5372
2016-09-18 10:54:26 -07:00
Kyle O'Brien
9aea71137e Add missing period to sentence in first paragraph.
Added a period to the end of the last sentence in the first paragraph, which was missing.
2016-09-18 09:51:33 -04:00
Mertcan GÖKGÖZ
5a932c90b5 added jekyll-spotify plugin 2016-09-18 10:50:21 +03:00
Parker Moore
6d7f305e7c Add tests for assets directory support. 2016-09-16 16:04:35 -07:00
Parker Moore
cf26bf5db0 TestTheme: update tests for 'path_for' now that it's no longer prepending the underscore 2016-09-16 15:36:33 -07:00
Parker Moore
87b9cfe2b5 ThemeBuilder: add 'assets' to list of scaffold directories 2016-09-16 14:57:58 -07:00
Parker Moore
13aec48137 Add ThemeAssetsReader which reads assets from a theme
If the theme includes the 'assets' directory, it will be walked and items will be added to the site based
on the normal rules of Jekyll: if there is YAML front matter, it will be added as a (convertible) Page,
otherwise it will be added as a StaticFile.
2016-09-16 14:41:36 -07:00
Parker Moore
b8f17b9034 Exclude node_modules by default
If no 'exclude' directive is specified, exclude node_modules by default.

https://twitter.com/mxstbr/status/761856359579185153
2016-09-16 13:09:10 -07:00
jekyllbot
562ffe7a3f Update history to reflect merge of #5361 [ci skip] 2016-09-16 12:58:42 -07:00
jekyllbot
c877d6f75c Merge pull request #5361 from DirtyF/patch-1
Merge pull request 5361
2016-09-16 12:58:42 -07:00
Frank Taillandier
0233d93352 vendor is now excluded by default [ci-skip] 2016-09-16 18:25:06 +02:00
Frank Taillandier
59b61c3f9f Exclude vendor by default 2016-09-16 07:56:37 +02:00
jekyllbot
57fd5f887d Update history to reflect merge of #5199 [ci skip] 2016-09-13 07:11:51 -07:00
jekyllbot
4888b84b44 Merge pull request #5199 from jeffkole/adds-linking-to-all-files
Merge pull request 5199
2016-09-13 07:11:50 -07:00
Ashwin Maroli
345f043cc4 test bundle install and skipping it. 2016-09-13 08:52:54 +05:30
Ashwin Maroli
566b42b8b3 add bundle install to jekyll new
- automatically run `bundle install` from within the newly generated blog
   directory by default.
 - add a new switch to skip this default behaviour.
2016-09-13 08:43:13 +05:30
jekyllbot
55de780520 Update history to reflect merge of #5347 [ci skip] 2016-09-12 00:26:00 -07:00
jekyllbot
42725b1325 Merge pull request #5347 from vohedge/patch-1
Merge pull request 5347
2016-09-12 00:26:00 -07:00
vohedge
d86a293d78 Fix typo 2016-09-11 00:18:02 +09:00
jekyllbot
a2e911c1b5 Update history to reflect merge of #5326 [ci skip] 2016-09-09 13:53:28 -07:00
jekyllbot
3e0363be4a Merge pull request #5326 from ashmaroli/gitignore-gem
Merge pull request 5326
2016-09-09 13:53:28 -07:00
jekyllbot
aa2cfc81b7 Update history to reflect merge of #5337 [ci skip] 2016-09-08 11:27:36 -07:00
jekyllbot
a70abbeab5 Merge pull request #5337 from jekyll/fix-convertible-5308
Merge pull request 5337
2016-09-08 11:27:35 -07:00
Ashwin Maroli
8813173ba7 set empty url in config file by default 2016-09-08 15:47:28 +05:30
jekyllbot
6ebdcdb198 Update history to reflect merge of #5316 [ci skip] 2016-09-08 02:55:30 -07:00
jekyllbot
9fd7e2c063 Merge pull request #5316 from DirtyF/markdown--default-extension
Merge pull request 5316
2016-09-08 02:55:30 -07:00
jekyllbot
eefcbf5dde Update history to reflect merge of #5335 [ci skip] 2016-09-08 02:54:03 -07:00
jekyllbot
19f7a0b8fc Merge pull request #5335 from DirtyF/copy-theme-files
Merge pull request 5335
2016-09-08 02:54:02 -07:00
Parker Moore
c1e6f1fb94 Fix rubocop errors & add one more test for slugify 'ascii' mode (#4680) 2016-09-07 17:50:14 -07:00
Parker Moore
9164973a6c Merge branch 'jussikinnula-master'
* jussikinnula-master:
  Fix slugify test
  One final "urlsafe" replaced with "ascii"
  Change urlsafe to ascii also when actually slugifying
  Add tests for ascii slugify mode
  Rename urlsafe to ascii, and document it (on utils.rb)
  Add urlsafe to accepted slugify modes
  Add urlsafe method for slugify
2016-09-07 16:50:32 -07:00
jekyllbot
f53a3b6272 Update history to reflect merge of #5235 [ci skip] 2016-09-07 16:34:37 -07:00
jekyllbot
dddafccb36 Merge pull request #5235 from jekyll/update-windows-detection-to-check-proc-version
Merge pull request 5235
2016-09-07 16:34:37 -07:00
jekyllbot
8c979ec565 Update history to reflect merge of #5318 [ci skip] 2016-09-07 16:28:01 -07:00
jekyllbot
3d38e8510c Merge pull request #5318 from ashmaroli/docs-themes-update
Merge pull request 5318
2016-09-07 16:28:01 -07:00
Parker Moore
3840a38081 Convertible: set self.output in #render_all_layouts and #do_layout 2016-09-07 15:59:43 -07:00
jekyllbot
d632cdda68 Update history to reflect merge of #5334 [ci skip] 2016-09-07 15:04:17 -07:00
jekyllbot
57ab7c5f98 Merge pull request #5334 from Crunch09/issue-5144
Merge pull request 5334
2016-09-07 15:04:17 -07:00
Florian Thomas
f0293def80 [docs] add help for missing static_file e.g. on heroku
fixes #5144
2016-09-07 09:07:35 +02:00
Frank Taillandier
42b85bb82f explain how to copy theme's file 2016-09-07 02:00:51 +02:00
Ashwin Maroli
b47db14f86 add future gems to gitignore 2016-09-05 15:14:59 +05:30
Ashwin Maroli
a666e6faee update line about semver to be less authoritative 2016-09-04 13:04:24 +05:30
Ashwin Maroli
57b86ee77e add a line about updating theme-gems in the docs 2016-09-03 18:09:06 +05:30
Eloy Espinaco
9b09d8a8e8 Add support for indented link references on excerpt
Excerpt link reference extraction is missing all the indented references
at the bottom of the page. Markdown specify that those can be indented up
to three spaces.
2016-09-02 17:21:10 -03:00
Frank Taillandier
63595f388d promote .md extensions 2016-09-02 11:17:23 +02:00
Frank Taillandier
a9da814f17 add basename and name variables for static files 2016-08-27 11:22:24 +02:00
Frank Taillandier
349569592e [docs] add examples for static files liquid metadata 2016-08-27 10:06:29 +02:00
Heng, K. (Stephen)
23d7929948 Test case for issue #5192, where Jekyll.sanitized_path strips drive name on Windows incorrectly 2016-08-26 11:43:32 +08:00
Heng, K. (Stephen)
0d8796fbe6 Test case for issue #5276, where Jekyll.sanitized_path strips base path incorrectly if file path has matching prefix 2016-08-26 11:20:03 +08:00
Heng, K. (Stephen)
7892c5e1f3 Fix issue #5276, where path strips root destination dir if filename matches 2016-08-25 18:35:09 +08:00
Frank Taillandier
326332a5d5 Rename filename to name 2016-08-21 21:32:26 +02:00
Frank Taillandier
87c00b2756 Get static filename 2016-08-20 17:42:05 +02:00
Heng, K. (Stephen)
596f5d1af3 Proposed fix for #5192
Strip drive name only when necessary.
2016-08-18 12:02:00 +08:00
Jordon Bedwell
f1f8319566 Fix #5233: Increase our ability to detect Windows.
This increases our ability to detect Windows, and to detect Windows+Bash.  It also adds a message to Windows for users who try to "--watch", also noting to to them to check out the Windows ticket so eventually somebody pings us if this issue is fixed. /cc @TAGraves
2016-08-16 03:46:03 -05:00
Stephen Checkoway
6167c09569 Run hooks in priority order.
Low priority hooks are being run before higher priority hooks. This is easy to
demonstrate with the following plugin:

    1.upto(10).each do |n|
      Jekyll::Hooks.register :site, :after_reset, priority: Jekyll::Hooks::PRIORITY_MAP[:low] do
        puts "Low #{n}"
      end
      Jekyll::Hooks.register :site, :after_reset, priority: Jekyll::Hooks::PRIORITY_MAP[:normal] do
        puts "Normal #{n}"
      end
      Jekyll::Hooks.register :site, :after_reset, priority: Jekyll::Hooks::PRIORITY_MAP[:high] do
        puts "High #{n}"
      end
    end

Sorting by the negative of the priority and then by the order the hook was
added does the right thing.
2016-08-06 20:56:34 -05:00
Jeff Kolesky
e0ce4a00f8 Fixes link tag to work with static files 2016-08-04 20:03:01 -07:00
Jeff Kolesky
05445b81c7 Fixes tests to account for new info.md file 2016-08-04 19:40:14 -07:00
Jeff Kolesky
82d6657ae8 Adds ability to link to all files
Fixes request made in #4624 and bug found in #5182
2016-08-03 15:08:26 -07:00
Marko Locher
73223f3a5a Fix Rubocop warnings 2016-07-14 12:15:00 +02:00
Marko Locher
49e97ef9b0 Add test case for deprecated post comparison
Checks that `post_url` works for nested posts even if the path isn't specified. Also checks that a deprecation message is shown in the build log.
2016-07-14 11:53:58 +02:00
Marko Locher
0e8f204011 Fix #3926 post_url helper with sub-directories
Instead of matching the the value provided to `post_url` against
the basename, test against the relative path.

Updated the regexp to match both
  * _posts/category
  * category/_posts
2016-07-14 11:53:58 +02:00
Jussi Kinnula
4effe25cc1 Fix slugify test 2016-03-29 10:11:47 +03:00
Jussi Kinnula
4c65772c44 One final "urlsafe" replaced with "ascii" 2016-03-29 10:01:08 +03:00
Jussi Kinnula
764a2c1b39 Change urlsafe to ascii also when actually slugifying 2016-03-29 09:46:42 +03:00
Jussi Kinnula
487631e935 Add tests for ascii slugify mode 2016-03-29 09:07:30 +03:00
Jussi Kinnula
e823ac5180 Rename urlsafe to ascii, and document it (on utils.rb) 2016-03-29 09:07:12 +03:00
Jussi Kinnula
c0dec091a2 Add urlsafe to accepted slugify modes 2016-03-18 17:14:54 +02:00
Jussi Kinnula
36dc8c2169 Add urlsafe method for slugify 2016-03-18 11:13:06 +02:00
93 changed files with 1295 additions and 224 deletions

14
.editorconfig Normal file
View File

@@ -0,0 +1,14 @@
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

View File

@@ -6,6 +6,7 @@ AllCops:
Exclude:
- lib/jekyll/renderer.rb
- bin/**/*
- exe/**/*
- benchmark/**/*
- script/**/*
- vendor/**/*
@@ -16,14 +17,18 @@ Lint/UnreachableCode:
Lint/UselessAccessModifier:
Enabled: false
Metrics/AbcSize:
Max: 20
Max: 21
Metrics/BlockLength:
Exclude:
- test/**/*.rb
- lib/jekyll/configuration.rb
Metrics/ClassLength:
Exclude:
- !ruby/regexp /features\/.*.rb$/
- !ruby/regexp /test\/.*.rb$/
Max: 300
Metrics/CyclomaticComplexity:
Max: 8
Max: 9
Metrics/LineLength:
Exclude:
- !ruby/regexp /features\/.*.rb/
@@ -34,6 +39,8 @@ Metrics/MethodLength:
Max: 20
Severity: error
Metrics/ModuleLength:
Exclude:
- lib/jekyll/filters.rb
Max: 240
Metrics/ParameterLists:
Max: 4

View File

@@ -30,10 +30,6 @@ branches:
- themes
notifications:
email:
recipients:
- jordon@envygeeks.io
slack:
secure: "\
dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4Y\

View File

@@ -18,7 +18,7 @@ end
#
group :test do
gem "rubocop"
gem "rubocop", "~> 0.44.1"
gem "cucumber", "~> 2.1"
gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious"

View File

@@ -1,14 +1,69 @@
## HEAD
### Site Enhancements
* Documentation: {% link %} tag (#5449)
* Updating install instruction link for Jekyll 3 on Windows (#5475)
* Update normalize.css to v5.0.0 (#5471)
* Add jekyll-data to the list of plugins (#5491)
* Add info about checking version + updating (#5497)
* Add jekyll-include-absolute-plugin to list of third-party plugins (#5492)
* Remove jekyll-hook from deployment methods (#5502)
* Update deployment-methods.md (#5504)
### Bug Fixes
* Fix typo in theme_template README (#5472)
* Do not swallow all exceptions on render (#5495)
### Development Fixes
* fix rubocop errors on testing with Rubocop 0.44 (#5489)
* script/test: add missing whitespace (#5479)
* Restrict Rubocop version (#5496)
### Minor Enhancements
* Collapse `gsub` (#5494)
## 3.3.0 / 2016-10-06
### Minor Enhancements
* Colorize interpolated output in logger.info (#5239)
* Site template: exclude Gemfile and Gemfile.lock in site config (#5293)
* Fix #5233: Increase our ability to detect Windows. (#5235)
* update gitignore template to ignore theme gems built by user (#5326)
* Adds ability to link to all files (#5199)
* Exclude vendor by default (#5361)
* Add ThemeAssetsReader which reads assets from a theme (#5364)
* Add bundle install to jekyll new command (#5237)
* Add absolute_url and relative_url filters. (#5399)
* Site template: remove `css/` from new site scaffolding (#5402)
* Site template: Move contents of the index.html page to the 'home' layout (#5420)
* Exclude node_modules by default (#5210)
* Run hooks in priority order. (#5157)
* Add `static_file.name` and `.basename` Liquid attributes (#5264)
* set site.url in dev environment to `http://localhost:4000` (#5431)
* Add support for indented link references on excerpt (#5212)
### Bug Fixes
* Use jekyll-feed to generate the default site's RSS feed (#5196)
* Site#configure_theme: do not set theme unless it's a string (#5189)
* Convertible: set self.output in #render_all_layouts and #do_layout (#5337)
* Only complain about `kramdown.coderay` if it is actually in the config (#5380)
* Clarify documentation in theme gem's README template (#5376)
* Allow underscore in highlighter language (#5375)
* Site template: set empty url in config file by default (#5338)
* Site template config: prepend 'jekyll serve' with 'bundle exec' (#5430)
* Don't call `File.utime` for StaticFiles if it's a symlink (#5427)
* Fix handling of non-ASCII characters in new `*_url` filters (#5410)
* Remove autoload of Draft which no longer exists. (#5441)
* Fix issue where Windows drive name is stripped from Jekyll.sanitized_path incorrectly (#5256)
* Fix bug where `post_url` tag matched incorrect post with subdirectory (#4873)
* Fix loading data from subdir with a period in name (#5433)
* Revert Commands::Serve#server_address signature change. (#5456)
### Site Enhancements
@@ -37,6 +92,22 @@
* Site: exclude README.md and .gitignore (#5304)
* Add link to Staticman (#5224)
* Update url for OpenShift (#5320)
* [docs] add help for missing static_file e.g. on heroku (#5334)
* Add a line about updating theme-gems in the docs (#5318)
* Explain how to copy a theme's files (#5335)
* [docs] .md as default extension in examples (#5316)
* Fix small typo in docs (#5347)
* Add missing period to sentence in first paragraph. (#5372)
* added jekyll-spotify plugin (#5369)
* Add jekyll-menus to the list of plugins. (#5397)
* macOS and one grammar fix (#5403)
* Add documentation for `relative_url` and `absolute_url` (#5405)
* Bugfix on logo in JSON-LD (#5421)
* Fix Travis.ci documentation (#5413)
* [docs] Update documentation regarding `bundle install` after `jekyll new` (#5428)
* Replace classic box-sizing reset with inheritance reset (#5411)
* Update Wikipedia YAML list link (#5452)
* Add Jekyll 3.3 release post (#5442)
### Development Fixes
@@ -50,6 +121,12 @@
* Execute jekyll from clone instead of defined binary when running 'script/default-site' (#5295)
* rubocop: lib/jekyll/document.rb complexity fixes (#5045)
* Proxy a number of Convertible methods to Renderer (#5308)
* Run executable for Cucumber via Ruby instead of Shell (#5383)
* Appease Rubocop (#5381)
* remove features' directories on windows with proper access (#5389)
* `site_configuration.feature`: use UTC format in timezone (#5416)
* swallow bundle output from `jekyll new` while in CI (#5408)
* Add .editorconfig (#5412)
## 3.2.1 / 2016-08-02

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
STDOUT.sync = true
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w(.. lib)))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "jekyll"
require "mercenary"

View File

@@ -63,6 +63,18 @@ Feature: Embed filters
And the _site directory should exist
And I should see "By <p><em>Obi-wan</em></p>" in "_site/2009/03/27/star-wars.html"
Scenario: Markdownify a given inline string
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 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "By {{ '_Obi-wan_' | markdownify:'inline' }}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "By <em>Obi-wan</em>" in "_site/2009/03/27/star-wars.html"
Scenario: Sort by an arbitrary variable
Given I have a _layouts directory
And I have the following page:

View File

@@ -235,7 +235,7 @@ Feature: Hooks
owner.output = "1 #{owner.output.chomp}"
end
Jekyll::Hooks.register :pages, :post_render, priority: :high do |owner|
# high runs last
# high runs first
owner.output = "2 #{owner.output.chomp}"
end
Jekyll::Hooks.register :pages, :post_render do |owner|
@@ -243,13 +243,13 @@ Feature: Hooks
owner.output = "3 #{owner.output.chomp}"
end
Jekyll::Hooks.register :pages, :post_render, priority: :low do |owner|
# low runs first
# low runs last
owner.output = "4 #{owner.output.chomp}"
end
"""
And I have a "index.html" page that contains "WRAP ME"
When I run jekyll build
Then I should see "2 3 1 4 WRAP ME" in "_site/index.html"
Then I should see "4 3 1 2 WRAP ME" in "_site/index.html"
Scenario: Alter a document right after it is initialized
Given I have a _plugins directory

View File

@@ -161,8 +161,8 @@ Feature: Site configuration
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 | America/New_York |
| key | value |
| timezone | UTC+04:00 |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
@@ -181,8 +181,8 @@ Feature: Site configuration
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 | Pacific/Honolulu |
| key | value |
| timezone | UTC+10:00 |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |

View File

@@ -1,4 +1,5 @@
Before do
FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist?
FileUtils.mkdir_p(Paths.test_dir) unless Paths.test_dir.directory?
Dir.chdir(Paths.test_dir)
end
@@ -6,7 +7,7 @@ end
#
After do
Paths.test_dir.rmtree if Paths.test_dir.exist?
FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist?
Paths.output_file.delete if Paths.output_file.exist?
Paths.status_file.delete if Paths.status_file.exist?
Dir.chdir(Paths.test_dir.parent)

View File

@@ -90,7 +90,7 @@ end
def run_jekyll(args)
args = args.strip.split(" ") # Shellwords?
process = run_in_shell(Paths.jekyll_bin.to_s, *args, "--trace")
process = run_in_shell("ruby", Paths.jekyll_bin.to_s, *args, "--trace")
process.exitstatus.zero?
end

View File

@@ -17,7 +17,7 @@ Feature: Writing themes
Scenario: A theme with SCSS
Given I have a configuration file with "theme" set to "test-theme"
And I have a css directory
And I have a "css/main.scss" page that contains "@import 'style';"
And I have a "css/main.scss" page that contains "@import 'test-theme-black';"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist

View File

@@ -38,4 +38,5 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
s.add_runtime_dependency('jekyll-watch', '~> 1.1')
s.add_runtime_dependency("pathutil", "~> 0.9")
s.add_runtime_dependency('addressable', '~> 2.4')
end

View File

@@ -41,7 +41,6 @@ module Jekyll
autoload :Convertible, "jekyll/convertible"
autoload :Deprecator, "jekyll/deprecator"
autoload :Document, "jekyll/document"
autoload :Draft, "jekyll/draft"
autoload :EntryFilter, "jekyll/entry_filter"
autoload :Errors, "jekyll/errors"
autoload :Excerpt, "jekyll/excerpt"
@@ -55,6 +54,7 @@ module Jekyll
autoload :PostReader, "jekyll/readers/post_reader"
autoload :PageReader, "jekyll/readers/page_reader"
autoload :StaticFileReader, "jekyll/readers/static_file_reader"
autoload :ThemeAssetsReader, "jekyll/readers/theme_assets_reader"
autoload :LogAdapter, "jekyll/log_adapter"
autoload :Page, "jekyll/page"
autoload :PluginManager, "jekyll/plugin_manager"
@@ -160,11 +160,13 @@ module Jekyll
questionable_path.insert(0, "/") if questionable_path.start_with?("~")
clean_path = File.expand_path(questionable_path, "/")
clean_path.sub!(%r!\A\w:/!, "/")
if clean_path.start_with?(base_directory.sub(%r!\A\w:/!, "/"))
return clean_path if clean_path.eql?(base_directory)
if clean_path.start_with?(base_directory.sub(%r!\z!, "/"))
clean_path
else
clean_path.sub!(%r!\A\w:/!, "/")
File.join(base_directory, clean_path)
end
end

View File

@@ -71,12 +71,23 @@ module Jekyll
#
# Returns nothing.
def watch(site, options)
External.require_with_graceful_fail "jekyll-watch"
watch_method = Jekyll::Watcher.method(:watch)
if watch_method.parameters.size == 1
watch_method.call(options)
if Utils::Platforms.windows?
Jekyll.logger.warn "", "--watch arg is unsupported on Windows. "
Jekyll.logger.warn "", "If you are on Windows Bash, please see: " \
"https://github.com/Microsoft/BashOnWindows/issues/216"
else
watch_method.call(options, site)
External.require_with_graceful_fail "jekyll-watch"
watch_method = Jekyll::Watcher.method(:watch)
if watch_method.parameters.size == 1
watch_method.call(
options
)
else
watch_method.call(
options, site
)
end
end
end
end # end of class << self

View File

@@ -11,6 +11,7 @@ module Jekyll
c.option "force", "--force", "Force creation even if PATH already exists"
c.option "blank", "--blank", "Creates scaffolding but with empty files"
c.option "skip-bundle", "--skip-bundle", "Skip 'bundle install'"
c.action do |args, options|
Jekyll::Commands::New.process(args, options)
@@ -34,7 +35,7 @@ module Jekyll
create_site new_blog_path
end
Jekyll.logger.info "New jekyll site installed in #{new_blog_path.cyan}."
after_install(new_blog_path, options)
end
def create_blank_site(path)
@@ -73,7 +74,7 @@ ruby RUBY_VERSION
gem "jekyll", "#{Jekyll::VERSION}"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima"
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
@@ -114,6 +115,31 @@ RUBY
def scaffold_path
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
end
# After a new blog has been created, print a success notification and
# then automatically execute bundle install from within the new blog dir
# unless the user opts to generate a blank blog or skip 'bundle install'.
def after_install(path, options = {})
Jekyll.logger.info "New jekyll site installed in #{path.cyan}."
Jekyll.logger.info "Bundle install skipped." if options["skip-bundle"]
unless options["blank"] || options["skip-bundle"]
bundle_install path
end
end
def bundle_install(path)
Jekyll::External.require_with_graceful_fail "bundler"
Jekyll.logger.info "Running bundle install in #{path.cyan}..."
Dir.chdir(path) do
if ENV["CI"]
system("bundle", "install", "--quiet")
else
system("bundle", "install")
end
end
end
end
end
end

View File

@@ -33,6 +33,7 @@ module Jekyll
opts["serving"] = true
opts["watch" ] = true unless opts.key?("watch")
config = opts["config"]
opts["url"] = default_url(opts) if Jekyll.env == "development"
Build.process(opts)
opts["config"] = config
Serve.process(opts)
@@ -47,11 +48,7 @@ module Jekyll
destination = opts["destination"]
setup(destination)
server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") }
server.mount(opts["baseurl"], Servlet, destination, file_handler_opts)
Jekyll.logger.info "Server address:", server_address(server, opts)
launch_browser server, opts if opts["open_url"]
boot_or_detach server, opts
start_up_webrick(opts, destination)
end
# Do a base pre-setup of WEBRick so that everything is in place
@@ -101,6 +98,17 @@ module Jekyll
opts
end
#
private
def start_up_webrick(opts, destination)
server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") }
server.mount(opts["baseurl"], Servlet, destination, file_handler_opts)
Jekyll.logger.info "Server address:", server_address(server, opts)
launch_browser server, opts if opts["open_url"]
boot_or_detach server, opts
end
# Recreate NondisclosureName under utf-8 circumstance
private
@@ -116,17 +124,39 @@ module Jekyll
#
private
def server_address(server, opts)
def server_address(server, options = {})
format_url(
server.config[:SSLEnable],
server.config[:BindAddress],
server.config[:Port],
options["baseurl"]
)
end
private
def format_url(ssl_enabled, address, port, baseurl = nil)
format("%{prefix}://%{address}:%{port}%{baseurl}", {
:prefix => server.config[:SSLEnable] ? "https" : "http",
:baseurl => opts["baseurl"] ? "#{opts["baseurl"]}/" : "",
:address => server.config[:BindAddress],
:port => server.config[:Port]
:prefix => ssl_enabled ? "https" : "http",
:address => address,
:port => port,
:baseurl => baseurl ? "#{baseurl}/" : ""
})
end
#
private
def default_url(opts)
config = configuration_from_options(opts)
format_url(
config["ssl_cert"] && config["ssl_key"],
config["host"] == "127.0.0.1" ? "localhost" : config["host"],
config["port"]
)
end
#
private
def launch_browser(server, opts)
address = server_address(server, opts)

View File

@@ -17,7 +17,7 @@ module Jekyll
# Handling Reading
"safe" => false,
"include" => [".htaccess"],
"exclude" => [],
"exclude" => %w(node_modules vendor),
"keep_files" => [".git", ".svn"],
"encoding" => "utf-8",
"markdown_ext" => "markdown,mkdown,mkdn,mkd,md",

View File

@@ -0,0 +1,35 @@
class Kramdown::Parser::Inline < Kramdown::Parser::Kramdown
def initialize(source, options)
super
@block_parsers = [:block_html].freeze
end
end
module Jekyll
module Converters
class Markdown
class Inline < Converter
safe true
priority :low
def initialize(config)
Jekyll::External.require_with_graceful_fail "kramdown"
@config = config["kramdown"].dup || {}
@config[:input] = :Inline
end
def matches(_)
false
end
def output_ext(_)
nil
end
def convert(content)
Kramdown::Document.new(content, @config).to_html.chomp
end
end
end
end
end

View File

@@ -104,7 +104,7 @@ module Jekyll
private
def modernize_coderay_config
if highlighter == "coderay"
unless @config["coderay"].empty?
Jekyll::Deprecator.deprecation_message(
"You are using 'kramdown.coderay' in your configuration, " \
"please use 'syntax_highlighter_opts' instead."

View File

@@ -193,7 +193,7 @@ module Jekyll
# Returns nothing
def render_all_layouts(layouts, payload, info)
_renderer.layouts = layouts
_renderer.place_in_layouts(output, payload, info)
self.output = _renderer.place_in_layouts(output, payload, info)
ensure
@_renderer = nil # this will allow the modifications above to disappear
end
@@ -205,11 +205,10 @@ module Jekyll
#
# Returns nothing.
def do_layout(payload, layouts)
_renderer.tap do |renderer|
self.output = _renderer.tap do |renderer|
renderer.layouts = layouts
renderer.payload = payload
renderer.run
end
end.run
Jekyll.logger.debug "Post-Render Hooks:", self.relative_path
Jekyll::Hooks.trigger hook_owner, :post_render, self

View File

@@ -118,7 +118,7 @@ module Jekyll
if tail.empty?
head
else
"" << head << "\n\n" << tail.scan(%r!^\[[^\]]+\]:.+$!).join("\n")
"" << head << "\n\n" << tail.scan(%r!^ {0,3}\[[^\]]+\]:.+$!).join("\n")
end
end
end

View File

@@ -3,16 +3,23 @@ require "json"
require "date"
require "liquid"
require_all "jekyll/filters"
module Jekyll
module Filters
include URLFilters
# Convert a Markdown string into HTML output.
#
# input - The Markdown String to convert.
#
# Returns the HTML formatted String.
def markdownify(input)
def markdownify(input, mode = nil)
site = @context.registers[:site]
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
if mode.to_s == "inline"
converter = site.find_converter_instance(Jekyll::Converters::Markdown::Inline)
else
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
end
converter.convert(input.to_s)
end

View File

@@ -0,0 +1,40 @@
require "addressable/uri"
module Jekyll
module Filters
module URLFilters
# Produces an absolute URL based on site.url and site.baseurl.
#
# input - the URL to make absolute.
#
# Returns the absolute URL as a String.
def absolute_url(input)
return if input.nil?
site = @context.registers[:site]
return relative_url(input).to_s if site.config["url"].nil?
Addressable::URI.parse(site.config["url"] + relative_url(input)).normalize.to_s
end
# Produces a URL relative to the domain root based on site.baseurl.
#
# input - the URL to make relative to the domain root
#
# Returns a URL relative to the domain root as a String.
def relative_url(input)
return if input.nil?
site = @context.registers[:site]
return ensure_leading_slash(input.to_s) if site.config["baseurl"].nil?
Addressable::URI.parse(
ensure_leading_slash(site.config["baseurl"]) + ensure_leading_slash(input.to_s)
).normalize.to_s
end
private
def ensure_leading_slash(input)
return input if input.nil? || input.empty? || input.start_with?("/")
"/#{input}"
end
end
end
end

View File

@@ -188,7 +188,7 @@ module Jekyll
if path.nil? || path.empty?
""
else
path.gsub(%r!\A/!, "").gsub(%r!([^/])\z!, '\1')
path.gsub(%r!\A/|(?<=[^/])\z!, "".freeze)
end
end
end

View File

@@ -54,7 +54,7 @@ module Jekyll
# Ensure the priority is a Fixnum
def self.priority_value(priority)
return priority if priority.is_a?(Fixnum)
return priority if priority.is_a?(Integer)
PRIORITY_MAP[priority] || DEFAULT_PRIORITY
end
@@ -80,7 +80,7 @@ module Jekyll
end
def self.insert_hook(owner, event, priority, &block)
@hook_priority[block] = "#{priority}.#{@hook_priority.size}".to_f
@hook_priority[block] = [-priority, @hook_priority.size]
@registry[owner][event] << block
end

View File

@@ -40,7 +40,11 @@ module Jekyll
@base = base
@dir = dir
@name = name
@path = site.in_source_dir(base, dir, name)
@path = if site.in_theme_dir(base) == base # we're in a theme
site.in_theme_dir(base, dir, name)
else
site.in_source_dir(base, dir, name)
end
process(name)
read_yaml(File.join(base, dir), name)

View File

@@ -18,6 +18,7 @@ module Jekyll
sort_files!
@site.data = DataReader.new(site).read(site.config["data_dir"])
CollectionReader.new(site).read
ThemeAssetsReader.new(site).read
end
# Sorts posts, pages, and static files.

View File

@@ -37,10 +37,10 @@ module Jekyll
path = @site.in_source_dir(dir, entry)
next if @entry_filter.symlink?(path)
key = sanitize_filename(File.basename(entry, ".*"))
if File.directory?(path)
read_data_to(path, data[key] = {})
read_data_to(path, data[sanitize_filename(entry)] = {})
else
key = sanitize_filename(File.basename(entry, ".*"))
data[key] = read_data_file(path)
end
end
@@ -62,8 +62,7 @@ module Jekyll
end
def sanitize_filename(name)
name.gsub!(%r![^\w\s-]+!, "")
name.gsub!(%r!(^|\b\s)\s+($|\s?\b)!, '\\1\\2')
name.gsub!(%r![^\w\s-]+|(?<=^|\b\s)\s+(?=$|\s?\b)!, "".freeze)
name.gsub(%r!\s+!, "_")
end
end

View File

@@ -0,0 +1,47 @@
module Jekyll
class ThemeAssetsReader
attr_reader :site
def initialize(site)
@site = site
end
def read
return unless site.theme && site.theme.assets_path
Find.find(site.theme.assets_path) do |path|
next if File.directory?(path)
if File.symlink?(path)
Jekyll.logger.warn "Theme reader:", "Ignored symlinked asset: #{path}"
else
read_theme_asset(path)
end
end
end
private
def read_theme_asset(path)
base = site.theme.root
dir = File.dirname(path.sub("#{site.theme.root}/", ""))
name = File.basename(path)
if Utils.has_yaml_header?(path)
append_unless_exists site.pages,
Jekyll::Page.new(site, base, dir, name)
else
append_unless_exists site.static_files,
Jekyll::StaticFile.new(site, base, dir, name)
end
end
def append_unless_exists(haystack, new_item)
if haystack.any? { |file| file.relative_path == new_item.relative_path }
Jekyll.logger.debug "Theme:",
"Ignoring #{new_item.relative_path} in theme due to existing file " \
"with that path in site."
return
end
haystack << new_item
end
end
end

View File

@@ -191,11 +191,7 @@ module Jekyll
render_pages(payload)
Jekyll::Hooks.trigger :site, :post_render, self, payload
# rubocop: disable HandleExceptions
rescue Errno::ENOENT
# ignore missing layout dir
end
# rubocop: enable HandleExceptions
# Remove orphaned files and empty directories in destination.
#

View File

@@ -1,6 +1,6 @@
module Jekyll
class StaticFile
attr_reader :relative_path, :extname
attr_reader :relative_path, :extname, :name
class << self
# The cache of last modification times [path] -> mtime.
@@ -97,6 +97,8 @@ module Jekyll
def to_liquid
{
"basename" => File.basename(name, extname),
"name" => name,
"extname" => extname,
"modified_time" => modified_time,
"path" => File.join("", relative_path)
@@ -146,7 +148,10 @@ module Jekyll
else
FileUtils.copy_entry(path, dest_path)
end
File.utime(self.class.mtimes[path], self.class.mtimes[path], dest_path)
unless File.symlink?(dest_path)
File.utime(self.class.mtimes[path], self.class.mtimes[path], dest_path)
end
end
end
end

View File

@@ -8,7 +8,7 @@ module Jekyll
# forms: name, name=value, or name="<quoted list>"
#
# <quoted list> is a space-separated list of numbers
SYNTAX = %r!^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$!
SYNTAX = %r!^([a-zA-Z0-9.+#_-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$!
def initialize(tag_name, markup, tokens)
super

View File

@@ -16,8 +16,10 @@ module Jekyll
def render(context)
site = context.registers[:site]
site.docs_to_write.each do |document|
return document.url if document.relative_path == @relative_path
site.each_site_file do |item|
return item.url if item.relative_path == @relative_path
# This takes care of the case for static files that have a leading /
return item.url if item.relative_path == "/#{@relative_path}"
end
raise ArgumentError, <<eos

View File

@@ -14,7 +14,8 @@ module Jekyll
"'#{name}' does not contain valid date and/or title."
end
@name_regex = %r!^#{path}#{date}-#{slug}\.[^.]+!
@name_regex = %r!^_posts/#{path}#{date}-#{slug}\.[^.]+|
^#{path}_posts/?#{date}-#{slug}\.[^.]+!x
end
def post_date
@@ -23,7 +24,7 @@ module Jekyll
end
def ==(other)
other.basename.match(@name_regex)
other.relative_path.match(@name_regex)
end
def deprecated_equality(other)

View File

@@ -18,15 +18,19 @@ module Jekyll
end
def includes_path
path_for :includes
path_for "_includes".freeze
end
def layouts_path
path_for :layouts
path_for "_layouts".freeze
end
def sass_path
path_for :sass
path_for "_sass".freeze
end
def assets_path
path_for "assets".freeze
end
def configure_sass
@@ -43,7 +47,7 @@ module Jekyll
end
def realpath_for(folder)
File.realpath(Jekyll.sanitized_path(root, "_#{folder}"))
File.realpath(Jekyll.sanitized_path(root, folder.to_s))
rescue Errno::ENOENT, Errno::EACCES, Errno::ELOOP
nil
end

View File

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

View File

@@ -6,10 +6,11 @@ module Jekyll
autoload :Ansi, "jekyll/utils/ansi"
# Constants for use in #slugify
SLUGIFY_MODES = %w(raw default pretty).freeze
SLUGIFY_MODES = %w(raw default pretty ascii).freeze
SLUGIFY_RAW_REGEXP = Regexp.new('\\s+').freeze
SLUGIFY_DEFAULT_REGEXP = Regexp.new("[^[:alnum:]]+").freeze
SLUGIFY_PRETTY_REGEXP = Regexp.new("[^[:alnum:]._~!$&'()+,;=@]+").freeze
SLUGIFY_ASCII_REGEXP = Regexp.new("[^[A-Za-z0-9]]+").freeze
# Takes an indented string and removes the preceding spaces on each line
@@ -160,6 +161,9 @@ module Jekyll
# When mode is "pretty", some non-alphabetic characters (._~!$&'()+,;=@)
# are not replaced with hyphen.
#
# When mode is "ascii", some everything else except ASCII characters
# a-z (lowercase), A-Z (uppercase) and 0-9 (numbers) are not replaced with hyphen.
#
# If cased is true, all uppercase letters in the result string are
# replaced with their lowercase counterparts.
#
@@ -173,6 +177,9 @@ module Jekyll
# slugify("The _config.yml file", "pretty", true)
# # => "The-_config.yml file"
#
# slugify("The _config.yml file", "ascii")
# # => "the-config.yml-file"
#
# Returns the slugified string.
def slugify(string, mode: nil, cased: false)
mode ||= "default"
@@ -193,6 +200,11 @@ module Jekyll
# "._~!$&'()+,;=@" is human readable (not URI-escaped) in URL
# and is allowed in both extN and NTFS.
SLUGIFY_PRETTY_REGEXP
when "ascii"
# For web servers not being able to handle Unicode, the safe
# method is to ditch anything else but latin letters and numeric
# digits.
SLUGIFY_ASCII_REGEXP
end
# Strip according to the mode

View File

@@ -13,18 +13,55 @@ module Jekyll
end
end
# --
# Allows you to detect "real" Windows, or what we would consider
# "real" Windows. That is, that we can pass the basic test and the
# /proc/version returns nothing to us.
# --
def really_windows?
RbConfig::CONFIG["host_os"] =~ %r!mswin|mingw|cygwin!i && \
!proc_version
end
#
def windows?
RbConfig::CONFIG["host_os"] =~ %r!mswin|mingw|cygwin!i || \
proc_version =~ %r!microsoft!i
end
#
def linux?
RbConfig::CONFIG["host_os"] =~ %r!linux! && \
proc_version !~ %r!microsoft!i
end
# Provides windows?, linux?, osx?, unix? so that we can detect
# platforms. This is mostly useful for `jekyll doctor` and for testing
# where we kick off certain tests based on the platform.
{ :windows? => %r!mswin|mingw|cygwin!, :linux? => %r!linux!, \
:osx? => %r!darwin|mac os!, :unix? => %r!solaris|bsd! }.each do |k, v|
{ :osx? => %r!darwin|mac os!, :unix? => %r!solaris|bsd! }.each do |k, v|
define_method k do
!!(
RbConfig::CONFIG["host_os"] =~ v
)
end
end
#
private
def proc_version
@cached_proc_version ||= begin
Pathutil.new(
"/proc/version"
).read
rescue Errno::ENOENT
nil
end
end
end
end
end

View File

@@ -1,3 +1,3 @@
module Jekyll
VERSION = "3.2.1".freeze
VERSION = "3.3.0".freeze
end

View File

@@ -6,7 +6,7 @@
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
@@ -20,7 +20,7 @@ description: > # this means to ignore newlines until "baseurl:"
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://example.com" # the base hostname & protocol for your site
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username: jekyll

View File

@@ -1,39 +0,0 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
// Our variables
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$spacing-unit: 30px;
$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);
// Width of the content area
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
// Minima also includes a mixin for defining media queries.
// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
// Import partials from the `minima` theme.
@import "minima";

View File

@@ -1,23 +0,0 @@
---
layout: default
---
<div class="home">
<h1 class="page-heading">Posts</h1>
<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title | escape }}</a>
</h2>
</li>
{% endfor %}
</ul>
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
</div>

View File

@@ -0,0 +1,6 @@
---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home
---

View File

@@ -12,7 +12,7 @@ Add this line to your Jekyll site's Gemfile:
gem <%= theme_name.inspect %>
```
And add this line to your Jekyll site:
And add this line to your Jekyll site's `_config.yml`:
```yaml
theme: <%= theme_name %>
@@ -38,7 +38,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
To set up your environment to develop this theme, run `bundle install`.
You theme is setup just like a normal Jelyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.

View File

@@ -1,3 +1,4 @@
*.gem
.bundle
.sass-cache
_site

View File

@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>|LICENSE|README)/i}) }
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>|LICENSE|README)}i) }
spec.add_development_dependency "jekyll", "~> <%= jekyll_version_with_minor %>"
spec.add_development_dependency "bundler", "~> 1.12"

View File

@@ -50,7 +50,7 @@ for ruby in $rubies; do
rake TESTOPTS=$testopts test
else
set -x
time $ruby -S bundle exec ruby -Itest \
time $ruby -S bundle exec ruby -I test \
"$@" $testops
fi
done

View File

@@ -22,7 +22,7 @@ url: https://jekyllrb.com
twitter:
username: jekyllrb
logo: img/logo-2x.png
logo: /img/logo-2x.png
gems:
- jekyll-feed

View File

@@ -594,7 +594,7 @@ collections:
# Handling Reading
safe: false
include: [".htaccess"]
exclude: []
exclude: ["node_modules", "vendor"]
keep_files: [".git", ".svn"]
encoding: "utf-8"
markdown_ext: "markdown,mkdown,mkdn,mkd,md"

View File

@@ -94,7 +94,7 @@ Your `.travis.yml` file should look like this:
```yaml
language: ruby
rvm:
- 2.1
- 2.2.5
before_script:
- chmod +x ./script/cibuild # or do this locally and commit
@@ -127,7 +127,7 @@ access to Bundler, RubyGems, and a Ruby runtime.
```yaml
rvm:
- 2.1
- 2.2.5
```
RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This

View File

@@ -72,19 +72,6 @@ Deploying is now as easy as telling nginx or Apache to look at
laptops$ git push deploy master
```
### Jekyll-hook
You can also use jekyll-hook, a server that listens for webhook posts from
GitHub, generates a website with Jekyll, and moves it somewhere to be
published. Use this to run your own GitHub Pages-style web server.
This method is useful if you need to serve your websites behind a firewall,
need extra server-level features like HTTP basic authentication or want to
host your site directly on a CDN or file host like S3.
Setup steps are fully documented
[in the `jekyll-hook` repo](https://github.com/developmentseed/jekyll-hook).
### Static Publisher
[Static Publisher](https://github.com/static-publisher/static-publisher) is another automated deployment option with a server listening for webhook posts, though it's not tied to GitHub specifically. It has a one-click deploy to Heroku, it can watch multiple projects from one server, it has an easy to user admin interface and can publish to either S3 or to a git repository (e.g. gh-pages).
@@ -102,7 +89,7 @@ Once youve generated the `_site` directory, you can easily scp it using a
need to change the values to reflect your sites details. There is even [a
matching TextMate command][] that will help you run this script.
[this deploy script here]: https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy
[this deploy script]: https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy
[a matching TextMate command]: https://gist.github.com/henrik/214959

View File

@@ -156,7 +156,7 @@ These are available out-of-the-box to be used in the front matter for a post.
more categories that the post belongs to. When the site is generated
the post will act as though it had been set with these categories
normally. Categories (plural key) can be specified as a <a
href="https://en.wikipedia.org/wiki/YAML#Lists">YAML list</a> or a
href="https://en.wikipedia.org/wiki/YAML#Basic_components">YAML list</a> or a
comma-separated string.
</p>
@@ -170,7 +170,8 @@ These are available out-of-the-box to be used in the front matter for a post.
<p>
Similar to categories, one or multiple tags can be added to a post.
Also like categories, tags can be specified as a YAML list or a
Also like categories, tags can be specified as a <a
href="https://en.wikipedia.org/wiki/YAML#Basic_components">YAML list</a> or a
comma-separated string.
</p>

View File

@@ -5,6 +5,114 @@ permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 3.3.0 / 2016-10-06
{: #v3-3-0}
### Minor Enhancements
{: #minor-enhancements-v3-3-0}
- Colorize interpolated output in logger.info ([#5239]({{ site.repository }}/issues/5239))
- Site template: exclude Gemfile and Gemfile.lock in site config ([#5293]({{ site.repository }}/issues/5293))
- Fix [#5233]({{ site.repository }}/issues/5233): Increase our ability to detect Windows. ([#5235]({{ site.repository }}/issues/5235))
- update gitignore template to ignore theme gems built by user ([#5326]({{ site.repository }}/issues/5326))
- Adds ability to link to all files ([#5199]({{ site.repository }}/issues/5199))
- Exclude vendor by default ([#5361]({{ site.repository }}/issues/5361))
- Add ThemeAssetsReader which reads assets from a theme ([#5364]({{ site.repository }}/issues/5364))
- Add bundle install to jekyll new command ([#5237]({{ site.repository }}/issues/5237))
- Add absolute_url and relative_url filters. ([#5399]({{ site.repository }}/issues/5399))
- Site template: remove `css/` from new site scaffolding ([#5402]({{ site.repository }}/issues/5402))
- Site template: Move contents of the index.html page to the 'home' layout ([#5420]({{ site.repository }}/issues/5420))
- Exclude node_modules by default ([#5210]({{ site.repository }}/issues/5210))
- Run hooks in priority order. ([#5157]({{ site.repository }}/issues/5157))
- Add `static_file.name` and `.basename` Liquid attributes ([#5264]({{ site.repository }}/issues/5264))
- set site.url in dev environment to `http://localhost:4000` ([#5431]({{ site.repository }}/issues/5431))
- Add support for indented link references on excerpt ([#5212]({{ site.repository }}/issues/5212))
### Bug Fixes
{: #bug-fixes-v3-3-0}
- Use jekyll-feed to generate the default site's RSS feed ([#5196]({{ site.repository }}/issues/5196))
- Site#configure_theme: do not set theme unless it's a string ([#5189]({{ site.repository }}/issues/5189))
- Convertible: set self.output in #render_all_layouts and #do_layout ([#5337]({{ site.repository }}/issues/5337))
- Only complain about `kramdown.coderay` if it is actually in the config ([#5380]({{ site.repository }}/issues/5380))
- Clarify documentation in theme gem's README template ([#5376]({{ site.repository }}/issues/5376))
- Allow underscore in highlighter language ([#5375]({{ site.repository }}/issues/5375))
- Site template: set empty url in config file by default ([#5338]({{ site.repository }}/issues/5338))
- Site template config: prepend 'jekyll serve' with 'bundle exec' ([#5430]({{ site.repository }}/issues/5430))
- Don't call `File.utime` for StaticFiles if it's a symlink ([#5427]({{ site.repository }}/issues/5427))
- Fix handling of non-ASCII characters in new `*_url` filters ([#5410]({{ site.repository }}/issues/5410))
- Remove autoload of Draft which no longer exists. ([#5441]({{ site.repository }}/issues/5441))
- Fix issue where Windows drive name is stripped from Jekyll.sanitized_path incorrectly ([#5256]({{ site.repository }}/issues/5256))
- Fix bug where `post_url` tag matched incorrect post with subdirectory ([#4873]({{ site.repository }}/issues/4873))
- Fix loading data from subdir with a period in name ([#5433]({{ site.repository }}/issues/5433))
- Revert Commands::Serve#server_address signature change. ([#5456]({{ site.repository }}/issues/5456))
### Site Enhancements
{: #site-enhancements-v3-3-0}
- Document `to_integer` and `inspect` filters ([#5185]({{ site.repository }}/issues/5185))
- Fix path in the prompt ([#5194]({{ site.repository }}/issues/5194))
- need subcommand build ([#5190]({{ site.repository }}/issues/5190))
- Add the Jekyll Cloudinary plugin ([#5183]({{ site.repository }}/issues/5183))
- Documentation : `new-theme` command ([#5205]({{ site.repository }}/issues/5205))
- Document `link` Liquid tag ([#5182]({{ site.repository }}/issues/5182))
- Remove mention of page for link tag in release post ([#5214]({{ site.repository }}/issues/5214))
- fixed typo ([#5226]({{ site.repository }}/issues/5226))
- Add missing comma ([#5222]({{ site.repository }}/issues/5222))
- Maintain aspect ratio with `height: auto;` ([#5254]({{ site.repository }}/issues/5254))
- Fix a link in deployment-methods.md ([#5244]({{ site.repository }}/issues/5244))
- Documentation: improve highlight in `Creating a theme` ([#5249]({{ site.repository }}/issues/5249))
- Bundler isn't installed by default ([#5258]({{ site.repository }}/issues/5258))
- Update troubleshooting documentation to include fix for issue with vendored gems ([#5271]({{ site.repository }}/issues/5271))
- Link `--lsi` option's description to Wikipedia docs on LSI ([#5274]({{ site.repository }}/issues/5274))
- Document `--profile` option on the configuration page ([#5279]({{ site.repository }}/issues/5279))
- Update homepage to sync with merge of [#5258]({{ site.repository }}/issues/5258) ([#5287]({{ site.repository }}/issues/5287))
- Add post about Jekyll Admin initial release ([#5291]({{ site.repository }}/issues/5291))
- Replace liquid highlight tag with backticks ([#5262]({{ site.repository }}/issues/5262))
- Word update ([#5294]({{ site.repository }}/issues/5294))
- Site documentation section links always point to https://jekyllrb.com ([#5281]({{ site.repository }}/issues/5281))
- Missing `:site, :post_render` payload documentation on site ([#5280]({{ site.repository }}/issues/5280))
- Site: exclude README.md and .gitignore ([#5304]({{ site.repository }}/issues/5304))
- Add link to Staticman ([#5224]({{ site.repository }}/issues/5224))
- Update url for OpenShift ([#5320]({{ site.repository }}/issues/5320))
- [docs] add help for missing static_file e.g. on heroku ([#5334]({{ site.repository }}/issues/5334))
- Add a line about updating theme-gems in the docs ([#5318]({{ site.repository }}/issues/5318))
- Explain how to copy a theme's files ([#5335]({{ site.repository }}/issues/5335))
- [docs] .md as default extension in examples ([#5316]({{ site.repository }}/issues/5316))
- Fix small typo in docs ([#5347]({{ site.repository }}/issues/5347))
- Add missing period to sentence in first paragraph. ([#5372]({{ site.repository }}/issues/5372))
- added jekyll-spotify plugin ([#5369]({{ site.repository }}/issues/5369))
- Add jekyll-menus to the list of plugins. ([#5397]({{ site.repository }}/issues/5397))
- macOS and one grammar fix ([#5403]({{ site.repository }}/issues/5403))
- Add documentation for `relative_url` and `absolute_url` ([#5405]({{ site.repository }}/issues/5405))
- Bugfix on logo in JSON-LD ([#5421]({{ site.repository }}/issues/5421))
- Fix Travis.ci documentation ([#5413]({{ site.repository }}/issues/5413))
- [docs] Update documentation regarding `bundle install` after `jekyll new` ([#5428]({{ site.repository }}/issues/5428))
- Replace classic box-sizing reset with inheritance reset ([#5411]({{ site.repository }}/issues/5411))
- Update Wikipedia YAML list link ([#5452]({{ site.repository }}/issues/5452))
- Add Jekyll 3.3 release post ([#5442]({{ site.repository }}/issues/5442))
### Development Fixes
{: #development-fixes-v3-3-0}
- Update appveyor.yml and fix optional deps for Ruby x64 ([#5180]({{ site.repository }}/issues/5180))
- Improve tests for Jekyll::PluginManager ([#5167]({{ site.repository }}/issues/5167))
- Update Ruby versions in travis.yml ([#5221]({{ site.repository }}/issues/5221))
- Avoid installing unecessary gems for site testing ([#5272]({{ site.repository }}/issues/5272))
- Proposal: Affinity teams and their captains ([#5273]({{ site.repository }}/issues/5273))
- Replace duplicate with postive local test in issue template ([#5286]({{ site.repository }}/issues/5286))
- Update AppVeyor config. ([#5240]({{ site.repository }}/issues/5240))
- Execute jekyll from clone instead of defined binary when running 'script/default-site' ([#5295]({{ site.repository }}/issues/5295))
- rubocop: lib/jekyll/document.rb complexity fixes ([#5045]({{ site.repository }}/issues/5045))
- Proxy a number of Convertible methods to Renderer ([#5308]({{ site.repository }}/issues/5308))
- Run executable for Cucumber via Ruby instead of Shell ([#5383]({{ site.repository }}/issues/5383))
- Appease Rubocop ([#5381]({{ site.repository }}/issues/5381))
- remove features' directories on windows with proper access ([#5389]({{ site.repository }}/issues/5389))
- `site_configuration.feature`: use UTC format in timezone ([#5416]({{ site.repository }}/issues/5416))
- swallow bundle output from `jekyll new` while in CI ([#5408]({{ site.repository }}/issues/5408))
- Add .editorconfig ([#5412]({{ site.repository }}/issues/5412))
## 3.2.1 / 2016-08-02
{: #v3-2-1}

View File

@@ -7,7 +7,7 @@ permalink: /docs/installation/
Getting Jekyll installed and ready-to-go should only take a few minutes.
If it ever becomes a pain, please [file an issue]({{ site.repository }}/issues/new)
(or submit a pull request) describing the issue you
encountered and how we might make the process easier
encountered and how we might make the process easier.
### Requirements
@@ -17,7 +17,7 @@ requirements youll need to make sure your system has before you start.
- [Ruby](https://www.ruby-lang.org/en/downloads/) (including development
headers, v1.9.3 or above for Jekyll 2 and v2 or above for Jekyll 3)
- [RubyGems](https://rubygems.org/pages/download)
- Linux, Unix, or Mac OS X
- Linux, Unix, or macOS
- [NodeJS](https://nodejs.org/), or another JavaScript runtime (Jekyll 2 and
earlier, for CoffeeScript support).
- [Python 2.7](https://www.python.org/downloads/) (for Jekyll 2 and earlier)
@@ -51,8 +51,8 @@ community can improve the experience for everyone.
<h5>Installing Xcode Command-Line Tools</h5>
<p>
If you run into issues installing Jekyll's dependencies which make use of
native extensions and are using Mac OS X, you will need to install Xcode
and the Command-Line Tools it ships with. Download in
native extensions and are using macOS, you will need to install Xcode
and the Command-Line Tools it ships with. Download them in
<code>Preferences &#8594; Downloads &#8594; Components</code>.
</p>
</div>
@@ -103,4 +103,25 @@ Check out [the extras page](../extras/) for more information.
</p>
</div>
Now that youve got everything installed, lets get to work!
## Already Have Jekyll?
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find your version of Jekyll, run one of these commands:
```sh
$ jekyll --version
$ gem list jekyll
```
You can also use [RubyGems](https://rubygems.org/gems/jekyll) to find the current versioning of any gem. But you can also use the `gem` command line tool:
```sh
$ gem search jekyll --remote
```
and you'll search for just the name `jekyll`, and in brackets will be latest version. Another way to check if you have the latest version is to run the command `gem outdated`. This will provide a list of all the gems on your system that need to be updated. If you aren't running the latest version, run this command:
```sh
$ gem update jekyll
```
Now that youve got everything up-to-date and installed, lets get to work!

View File

@@ -866,6 +866,7 @@ LESS.js files during generation.
- [Jekyll Tags List Plugin](https://github.com/crispgm/jekyll-tags-list-plugin): A Liquid tag plugin that creates tags list in specific order.
- [Jekyll Maps](https://github.com/ayastreb/jekyll-maps) by [Anatoliy Yastreb](https://github.com/ayastreb): A Jekyll plugin to easily embed maps with filterable locations.
- [Jekyll Cloudinary](https://nhoizey.github.io/jekyll-cloudinary/) by [Nicolas Hoizey](https://nicolas-hoizey.com/): a Jekyll plugin adding a Liquid tag to ease the use of Cloudinary for responsive images in your Markdown/Kramdown posts.
- [jekyll-include-absolute-plugin](https://github.com/tnhu/jekyll-include-absolute-plugin) by [Tan Nhu](https://github.com/tnhu): A Jekyll plugin to include a file from its path relative to Jekyll's source folder.
#### Collections
@@ -910,6 +911,9 @@ LESS.js files during generation.
- [Jekyll Autoprefixer](https://github.com/vwochnik/jekyll-autoprefixer): Autoprefixer integration for Jekyll
- [Jekyll-breadcrumbs](https://github.com/git-no/jekyll-breadcrumbs): Creates breadcrumbs for Jekyll 3.x, includes features like SEO optimization, optional breadcrumb item translation and more.
- [generator-jekyllized](https://github.com/sondr3/generator-jekyllized): A Yeoman generator for rapidly developing sites with Gulp. Live reload your site, automatically minify and optimize your assets and much more.
- [Jekyll-Spotify](https://github.com/MertcanGokgoz/Jekyll-Spotify): Easily output Spotify Embed Player for jekyll
- [jekyll-menus](https://github.com/forestryio/jekyll-menus): Hugo style menus for your Jekyll site... recursive menus included.
- [jekyll-data](https://github.com/ashmaroli/jekyll-data): Read data files within Jekyll Theme Gems.
#### Editors

View File

@@ -37,7 +37,7 @@ file. For example, the following are examples of valid post filenames:
```sh
2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.textile
2012-09-12-how-to-write-a-blog.md
```
<div class="note">

View File

@@ -10,11 +10,12 @@ For the impatient, here's how to get a boilerplate Jekyll site up and running.
~ $ gem install jekyll bundler
~ $ jekyll new myblog
~ $ cd myblog
~/myblog $ bundle install
~/myblog $ bundle exec jekyll serve
# => Now browse to http://localhost:4000
```
The `jekyll new` command now automatically initiates `bundle install` and installs the dependencies required. To skip this, pass `--skip-bundle` option like so `jekyll new myblog --skip-bundle`.
If you wish to install jekyll into an existing directory, you can do so by running `jekyll new .` from within the directory instead of creating a new one. If the existing directory isn't empty, you'll also have to pass the `--force` option like so `jekyll new . --force`.
That's nothing, though. The real magic happens when you start creating blog

View File

@@ -26,7 +26,7 @@ following metadata:
<td><p><code>file.path</code></p></td>
<td><p>
The relative path to the file.
The relative path to the file, e.g <code>/assets/img/image.jpg</code>
</p></td>
</tr>
@@ -34,7 +34,23 @@ following metadata:
<td><p><code>file.modified_time</code></p></td>
<td><p>
The `Time` the file was last modified.
The `Time` the file was last modified, e.g <code>2016-04-01 16:35:26 +0200</code>
</p></td>
</tr>
<tr>
<td><p><code>file.name</code></p></td>
<td><p>
The string name of the file e.g. <code>image.jpg</code> for <code>image.jpg</code>
</p></td>
</tr>
<tr>
<td><p><code>file.basename</code></p></td>
<td><p>
The string basename of the file e.g. <code>image</code> for <code>image.jpg</code>
</p></td>
</tr>

View File

@@ -18,8 +18,8 @@ A basic Jekyll site usually looks something like this:
.
├── _config.yml
├── _drafts
| ├── begin-with-the-crazy-ideas.textile
| └── on-simplicity-in-technology.markdown
| ├── begin-with-the-crazy-ideas.md
| └── on-simplicity-in-technology.md
├── _includes
| ├── footer.html
| └── header.html
@@ -27,8 +27,8 @@ A basic Jekyll site usually looks something like this:
| ├── default.html
| └── post.html
├── _posts
| ├── 2007-10-29-why-every-programmer-should-play-nethack.textile
| └── 2009-04-26-barcamp-boston-4-roundup.textile
| ├── 2007-10-29-why-every-programmer-should-play-nethack.md
| └── 2009-04-26-barcamp-boston-4-roundup.md
├── _data
| └── members.yml
├── _site

View File

@@ -21,6 +21,34 @@ common tasks easier.
</tr>
</thead>
<tbody>
<tr>
<td>
<p class="name"><strong>Relative URL</strong></p>
<p>Prepend the <code>baseurl</code> value to the input. Useful if your site is hosted at a subpath rather than the root of the domain.</p>
</td>
<td class="align-center">
<p>
<code class="filter">{% raw %}{{ "/assets/style.css" | relative_url }}{% endraw %}</code>
</p>
<p>
<code class="output">/my-baseurl/assets/style.css</code>
</p>
</td>
</tr>
<tr>
<td>
<p class="name"><strong>Absolute URL</strong></p>
<p>Prepend the <code>url</code> and <code>baseurl</code> value to the input.</p>
</td>
<td class="align-center">
<p>
<code class="filter">{% raw %}{{ "/assets/style.css" | absolute_url }}{% endraw %}</code>
</p>
<p>
<code class="output">http://example.com/my-baseurl/assets/style.css</code>
</p>
</td>
</tr>
<tr>
<td>
<p class="name"><strong>Date to XML Schema</strong></p>
@@ -263,7 +291,7 @@ common tasks easier.
</td>
<td class="align-center">
<p>
<code class="filter">{% raw %}{{ "a \n b" | normalize_whitepace }}{% endraw %}</code>
<code class="filter">{% raw %}{{ "a \n b" | normalize_whitespace }}{% endraw %}</code>
</p>
</td>
</tr>
@@ -482,9 +510,9 @@ numbers from the highlighted code.
### Link
If you would like to include a link to a collection's document, or a post
the `link` tag will generate the correct permalink URL for the path you
specify.
If you want to include a link to a collection's document, a post, a page
or a file the `link` tag will generate the correct permalink URL for the path
you specify.
You must include the file extension when using the `link` tag.
@@ -492,6 +520,8 @@ You must include the file extension when using the `link` tag.
{% raw %}
{% link _collection/name-of-document.md %}
{% link _posts/2016-07-26-name-of-post.md %}
{% link news/index.html %}
{% link /assets/files/doc.pdf %}
{% endraw %}
```
@@ -501,12 +531,11 @@ You can also use this tag to create a link in Markdown as follows:
{% raw %}
[Link to a document]({% link _collection/name-of-document.md %})
[Link to a post]({% link _posts/2016-07-26-name-of-post.md %})
[Link to a page]({% link news/index.html %})
[Link to a file]({% link /assets/files/doc.pdf %})
{% endraw %}
```
Support for static files and pages is coming in a later release but is
**not** released as of v3.2.1.
### Post URL
If you would like to include a link to a post on your site, the `post_url` tag

View File

@@ -27,6 +27,7 @@ Jekyll themes set default layouts, includes, and stylesheets, that can be overri
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`
* `/_layouts`
* `/_includes`
* `/_sass`
@@ -34,6 +35,10 @@ Jekyll will look first to your site's content, before looking to the theme's def
Refer to your selected theme's documentation and source repository for more information on what files you can override.
{: .note .info}
To locate theme's files on your computer, run `bundle show` followed by
the name of the theme's gem, e.g. `bundle show minima` for default Jekyll's
theme. Then copy the files you want to override, from the returned path to your root folder.
## Creating a theme
Jekyll themes are distributed as Ruby gems. Don't worry, Jekyll will help you scaffold a new theme with the `new-theme` command. Just run `jekyll new-theme` with the theme name as an argument:
@@ -64,6 +69,12 @@ Theme layouts and includes work just like they work in any Jekyll site. Place la
For example, if your theme has a `/_layouts/page.html` file, and a page has `layout: page` in its YAML front matter, Jekyll will first look to the site's `_layouts` folder for a the `page` layout, and if none exists, will use your theme's `page` layout.
### Assets
Any file in `/assets` will be copied over to the user's site upon build unless they have a file with the same relative path. You may ship any kind of asset here: SCSS, an image, a webfont, etc. These files behave just like pages and static files in Jekyll: if the file has [YAML front matter]({{ site.baseurl }}/docs/frontmatter/) at the top, then it will be rendered. If it does not have YAML front matter, it will simply be copied over into the resulting site. This allows theme creators to ship a default `/assets/styles.scss` file which their layouts can depend on as `/assets/styles.css`.
All files in `/assets` will be output into the compiled site in the `/assets` folder just as you'd expect from using Jekyll on your sites.
### Stylesheets
Your theme's stylesheets should be placed in your theme's `/_sass` folder, again, just as you would when authoring a Jekyll site. Your theme's styles can be included in the user's stylesheet using the `@import` directive.
@@ -94,3 +105,6 @@ Themes are published via [RubyGems.org](https://rubygems.org). You'll need a Rub
2. Next, push your packaged theme up to the RubyGems service, by running the following command, again replacing `my-awesome-jekyll-theme` with the name of your theme:
gem push my-awesome-jekyll-theme-*.gem
3. To release a new version of your theme, simply update the version number in the gemspec file, ( `my-awesome-jekyll-theme.gemspec` in this example ), and then repeat Steps 1 & 2 above.
We recommend that you follow [Semantic Versioning](http://semver.org/) while bumping your theme-version.

View File

@@ -13,6 +13,7 @@ that might be of help. If the problem youre experiencing isnt covered belo
- [Base-URL Problems](#base-url-problems)
- [Configuration problems](#configuration-problems)
- [Markup Problems](#markup-problems)
- [Production Problems](#production-problems)
## Installation Problems
@@ -56,14 +57,14 @@ sudo emerge -av dev-ruby/rubygems
On Windows, you may need to install [RubyInstaller
DevKit](https://wiki.github.com/oneclick/rubyinstaller/development-kit).
On Mac OS X, you may need to update RubyGems (using `sudo` only if necessary):
On macOS, you may need to update RubyGems (using `sudo` only if necessary):
```sh
sudo gem update --system
```
If you still have issues, you can download and install new Command Line
Tools (such as `gcc`) using the command
Tools (such as `gcc`) using the following command:
```sh
xcode-select --install
@@ -76,7 +77,7 @@ which may allow you to install native gems using this command (again using
sudo gem install jekyll
```
Note that upgrading Mac OS X does not automatically upgrade Xcode itself
Note that upgrading macOS does not automatically upgrade Xcode itself
(that can be done separately via the App Store), and having an out-of-date
Xcode.app can interfere with the command line tools downloaded above. If
you run into this issue, upgrade Xcode and install the upgraded Command
@@ -209,6 +210,13 @@ strange errors where references don't exist or a tag hasn't been closed. If you
run into these errors, try setting `excerpt_separator: ""` in your
`_config.yml`, or set it to some nonsense string.
## Production Problems
If you run into an issue that a static file can't be found in your
production environment during build since v3.2.0 you should set your
[environment to `production`](../configuration/#specifying-a-jekyll-environment-at-build-time).
The issue is caused by trying to copy a non-existing symlink.
<div class="note">
<h5>Please report issues you encounter!</h5>
<p>

View File

@@ -0,0 +1,110 @@
---
layout: news_item
title: 'Jekyll 3.3 is here with better theme support, new URL filters, and tons more'
date: 2016-10-06 11:10:38 -0700
author: parkr
version: 3.3.0
categories: [release]
---
There are tons of great new quality-of-life features you can use in 3.3.
Three key things you might want to try:
### 1. Themes can now ship static & dynamic assets in an `/assets` directory
In Jekyll 3.2, we shipped the ability to use a theme that was packaged as a
[gem](http://guides.rubygems.org/). 3.2 included support for includes,
layouts, and sass partials. In 3.3, we're adding assets to that list.
In an effort to make theme management a bit easier, any files you put into
`/assets` in your theme will be read in as though they were part of the
user's site. This means you can ship SCSS and CoffeeScript, images and
webfonts, and so on -- anything you'd consider a part of the
*presentation*. Same rules apply here as in a Jekyll site: if it has YAML
front matter, it will be converted and rendered. No YAML front matter, and
it will simply be copied over like a static asset.
Note that if a user has a file of the same path, the theme content will not
be included in the site, i.e. a user's `/assets/main.scss` will be read and
processed if present instead of a theme's `/assets/main.scss`.
See our [documentation on the subject]({{ "/docs/themes/#assets" | relative_url }})
for more info.
### 2. `relative_url` and `absolute_url` filters
Want a clean way to prepend the `baseurl` or `url` in your config? These
new filters have you covered. When working locally, if you set your
`baseurl` to match your deployment environment, say `baseurl: "/myproject"`,
then `relative_url` will ensure that this baseurl is prepended to anything
you pass it:
{% highlight liquid %}
{% raw %}
{{ "/docs/assets/" | relative_url }} => /myproject/docs/assets
{% endraw %}
{% endhighlight %}
By default, `baseurl` is set to `""` and therefore yields (never set to
`"/"`):
{% highlight liquid %}
{% raw %}
{{ "/docs/assets/" | relative_url }} => /docs/assets
{% endraw %}
{% endhighlight %}
A result of `relative_url` will safely always produce a URL which is
relative to the domain root. A similar principle applies to `absolute_url`.
It prepends your `baseurl` and `url` values, making absolute URL's all the
easier to make:
{% highlight liquid %}
{% raw %}
{{ "/docs/assets/" | absolute_url }} => http://jekyllrb.com/myproject/docs/assets
{% endraw %}
{% endhighlight %}
### 3. `site.url` is set by the development server
When you run `jekyll serve` locally, it starts a web server, usually at
`http://localhost:4000`, that you use to preview your site during
development. If you are using the new `absolute_url` filter, or using
`site.url` anywhere, you have probably had to create a development config
which resets the `url` value to point to `http://localhost:4000`.
No longer! When you run `jekyll serve`, Jekyll will build your site with
the value of the `host`, `port`, and SSL-related options. This defaults to
`url: http://localhost:4000`. When you are developing locally, `site.url`
will yield `http://localhost:4000`.
This happens by default when running Jekyll locally. It will not be set if
you set `JEKYLL_ENV=production` and run `jekyll serve`. If `JEKYLL_ENV` is
any value except `development` (its default value), Jekyll will not
overwrite the value of `url` in your config. And again, this only applies
to serving, not to building.
## A *lot* more!
There are dozens of bug fixes and minor improvements to make your Jekyll
experience better than ever. With every Jekyll release, we strive to bring
greater stability and reliability to your everyday development workflow.
As always, thanks to our many contributors who contributed countless hours
of their free time to making this release happen:
Anatoliy Yastreb, Anthony Gaudino, Antonio, Ashwin Maroli, Ben Balter,
Charles Horn, Chris Finazzo, Daniel Chapman, David Zhang, Eduardo
Bouças, Edward Thomson, Eloy Espinaco, Florian Thomas, Frank Taillandier,
Gerardo, Heng Kwokfu, Heng, K. (Stephen), Jeff Kolesky, Jonathan Thornton,
Jordon Bedwell, Jussi Kinnula, Júnior Messias, Kyle O'Brien, Manmeet Gill,
Mark H. Wilkinson, Marko Locher, Mertcan GÖKGÖZ, Michal Švácha, Mike
Kasberg, Nadjib Amar, Nicolas Hoizey, Nicolas Porcel, Parker Moore, Pat
Hawks, Patrick Marsceill, Stephen Checkoway, Stuart Kent, XhmikosR, Zlatan
Vasović, mertkahyaoglu, shingo-nakanishi, and vohedge.
[Full release notes]({{ "/docs/history/#v3-3-0" | relative_url }}) are available
for your perusal. If you notice any issues, please don't hesitate to file a
bug report.
Happy Jekylling!

View File

@@ -1 +1 @@
/*! normalize.css v4.2.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}

View File

@@ -1,10 +1,14 @@
/* Base */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
font: 300 21px Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif;

View File

@@ -57,11 +57,6 @@ overview: true
<span class="prompt">$</span>
<span class="command">cd my-awesome-site</span>
</p>
<p class="line">
<span class="path">~/my-awesome-site</span>
<span class="prompt">$</span>
<span class="command">bundle install</span>
</p>
<p class="line">
<span class="path">~/my-awesome-site</span>
<span class="prompt">$</span>

View File

@@ -1 +1 @@
3.2.1
3.3.0

View File

@@ -0,0 +1,3 @@
.sample {
color: red;
}

View File

@@ -0,0 +1,3 @@
---
---
alert "From your theme."

View File

@@ -0,0 +1 @@
logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,3 @@
---
---
@import "test-theme-{{ site.theme-color | default: "red" }}";

View File

@@ -120,12 +120,9 @@ class JekyllUnitTest < Minitest::Test
"destination" => dest_dir,
"incremental" => false
}))
build_configs({
Configuration.from(full_overrides.merge({
"source" => source_dir
}, full_overrides)
.fix_common_issues
.backwards_compatibilize
.add_default_collections
}))
end
def clear_dest

View File

@@ -0,0 +1,6 @@
name: Dairy
products:
- name: cheese
price: 5.5
- name: milk
price: 2.75

View File

@@ -0,0 +1,16 @@
---
---
This is the first paragraph. It [has][link_0] [lots][link_1] [of][link_2]
[links][link_3].
This is the second paragraph. It has sample code that should not be extracted:
[fakelink]: www.invalid.com
And here are the real links:
[link_0]: www.example.com/0
[link_1]: www.example.com/1
[link_2]: www.example.com/2
[link_3]: www.example.com/3

View File

@@ -0,0 +1,3 @@
---
---
alert "From your site."

7
test/source/info.md Normal file
View File

@@ -0,0 +1,7 @@
---
title: Information
---
# Information
Very important information is here

View File

@@ -19,6 +19,12 @@ class TestCommandsServe < JekyllUnitTest
p
)
end
Jekyll.sites.clear
allow(SafeYAML).to receive(:load_file).and_return({})
allow(Jekyll::Commands::Build).to receive(:build).and_return("")
end
teardown do
Jekyll.sites.clear
end
should "label itself" do
@@ -79,16 +85,53 @@ class TestCommandsServe < JekyllUnitTest
custom_options = {
"config" => %w(_config.yml _development.yml),
"serving" => true,
"watch" => false # for not having guard output when running the tests
"watch" => false, # for not having guard output when running the tests
"url" => "http://localhost:4000"
}
allow(SafeYAML).to receive(:load_file).and_return({})
allow(Jekyll::Commands::Build).to receive(:build).and_return("")
expect(Jekyll::Commands::Serve).to receive(:process).with(custom_options)
@merc.execute(:serve, { "config" => %w(_config.yml _development.yml),
"watch" => false })
end
context "in development environment" do
setup do
expect(Jekyll).to receive(:env).and_return("development")
expect(Jekyll::Commands::Serve).to receive(:start_up_webrick)
end
should "set the site url by default to `http://localhost:4000`" do
@merc.execute(:serve, { "watch" => false, "url" => "https://jekyllrb.com/" })
assert_equal 1, Jekyll.sites.count
assert_equal "http://localhost:4000", Jekyll.sites.first.config["url"]
end
should "take `host`, `port` and `ssl` into consideration if set" do
@merc.execute(:serve, {
"watch" => false,
"host" => "example.com",
"port" => "9999",
"url" => "https://jekyllrb.com/",
"ssl_cert" => "foo",
"ssl_key" => "bar"
})
assert_equal 1, Jekyll.sites.count
assert_equal "https://example.com:9999", Jekyll.sites.first.config["url"]
end
end
context "not in development environment" do
should "not update the site url" do
expect(Jekyll).to receive(:env).and_return("production")
expect(Jekyll::Commands::Serve).to receive(:start_up_webrick)
@merc.execute(:serve, { "watch" => false, "url" => "https://jekyllrb.com/" })
assert_equal 1, Jekyll.sites.count
assert_equal "https://jekyllrb.com/", Jekyll.sites.first.config["url"]
end
end
context "verbose" do
should "debug when verbose" do
assert_equal custom_opts({ "verbose" => true })[:Logger].level, 5

View File

@@ -48,6 +48,12 @@ class TestConfiguration < JekyllUnitTest
end
end
context "the defaults" do
should "exclude node_modules" do
assert_includes Configuration.from({})["exclude"], "node_modules"
end
end
context "#add_default_collections" do
should "no-op if collections is nil" do
result = Configuration[{ "collections" => nil }].add_default_collections

View File

@@ -119,6 +119,32 @@ class TestExcerpt < JekyllUnitTest
assert @extracted_excerpt.content.include?("http://www.jekyllrb.com/")
end
end
context "with indented link references" do
setup do
@post = setup_post("2016-08-16-indented-link-references.markdown")
@excerpt = @post.excerpt
end
should "contain all refs at the bottom of the page" do
(0..3).each do |i|
assert_match "[link_#{i}]: www.example.com/#{i}", @excerpt.content
end
end
should "ignore indented code" do
refute_match "[fakelink]:", @excerpt.content
end
should "render links properly" do
@rendered_post = @post.dup
do_render(@rendered_post)
output = @rendered_post.data["excerpt"].output
(0..3).each do |i|
assert_includes output, "<a href=\"www.example.com/#{i}\">"
end
end
end
end
end

View File

@@ -8,23 +8,28 @@ class TestFilters < JekyllUnitTest
attr_accessor :site, :context
def initialize(opts = {})
@site = Jekyll::Site.new(
Jekyll.configuration(opts.merge("skip_config_files" => true))
)
@site = Jekyll::Site.new(opts.merge("skip_config_files" => true))
@context = Liquid::Context.new({}, {}, { :site => @site })
end
end
def make_filter_mock(opts = {})
JekyllFilter.new(site_configuration(opts)).tap do |f|
tz = f.site.config["timezone"]
Jekyll.set_timezone(tz) if tz
end
end
class SelectDummy
def select; end
end
context "filters" do
setup do
@filter = JekyllFilter.new({
"source" => source_dir,
"destination" => dest_dir,
"timezone" => "UTC"
@filter = make_filter_mock({
"timezone" => "UTC",
"url" => "http://example.com",
"baseurl" => "/base"
})
@sample_time = Time.utc(2013, 3, 27, 11, 22, 33)
@sample_date = Date.parse("2013-03-27")
@@ -52,6 +57,20 @@ class TestFilters < JekyllUnitTest
)
end
should "markdownify with simple string in inline mode" do
assert_equal(
"one <em>simple</em> string",
@filter.markdownify("one _simple_ string", :inline)
)
end
should "markdownify with multi-line string in inline mode" do
assert_equal(
"first line\nsecond line",
@filter.markdownify("first line\n\nsecond line", :inline)
)
end
context "smartify filter" do
should "convert quotes and typographic characters" do
assert_equal(
@@ -65,7 +84,7 @@ class TestFilters < JekyllUnitTest
end
should "escapes special characters when configured to do so" do
kramdown = JekyllFilter.new({ :kramdown => { :entity_output => :symbolic } })
kramdown = make_filter_mock({ :kramdown => { :entity_output => :symbolic } })
assert_equal(
"&ldquo;This filter&rsquo;s test&hellip;&rdquo;",
kramdown.smartify(%q{"This filter's test..."})
@@ -307,6 +326,113 @@ class TestFilters < JekyllUnitTest
assert_equal "my%20things", @filter.uri_escape("my things")
end
context "absolute_url filter" do
should "produce an absolute URL from a page URL" do
page_url = "/about/my_favorite_page/"
assert_equal "http://example.com/base#{page_url}", @filter.absolute_url(page_url)
end
should "ensure the leading slash" do
page_url = "about/my_favorite_page/"
assert_equal "http://example.com/base/#{page_url}", @filter.absolute_url(page_url)
end
should "ensure the leading slash for the baseurl" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({
"url" => "http://example.com",
"baseurl" => "base"
})
assert_equal "http://example.com/base/#{page_url}", filter.absolute_url(page_url)
end
should "be ok with a blank but present 'url'" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({
"url" => "",
"baseurl" => "base"
})
assert_equal "/base/#{page_url}", filter.absolute_url(page_url)
end
should "be ok with a nil 'url'" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({
"url" => nil,
"baseurl" => "base"
})
assert_equal "/base/#{page_url}", filter.absolute_url(page_url)
end
should "be ok with a nil 'baseurl'" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({
"url" => "http://example.com",
"baseurl" => nil
})
assert_equal "http://example.com/#{page_url}", filter.absolute_url(page_url)
end
should "not prepend a forward slash if input is empty" do
page_url = ""
filter = make_filter_mock({
"url" => "http://example.com",
"baseurl" => "/base"
})
assert_equal "http://example.com/base", filter.absolute_url(page_url)
end
should "normalize international URLs" do
page_url = ""
filter = make_filter_mock({
"url" => "http://ümlaut.example.org/",
"baseurl" => nil
})
assert_equal "http://xn--mlaut-jva.example.org/", filter.absolute_url(page_url)
end
end
context "relative_url filter" do
should "produce a relative URL from a page URL" do
page_url = "/about/my_favorite_page/"
assert_equal "/base#{page_url}", @filter.relative_url(page_url)
end
should "ensure the leading slash between baseurl and input" do
page_url = "about/my_favorite_page/"
assert_equal "/base/#{page_url}", @filter.relative_url(page_url)
end
should "ensure the leading slash for the baseurl" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({ "baseurl" => "base" })
assert_equal "/base/#{page_url}", filter.relative_url(page_url)
end
should "normalize international URLs" do
page_url = "错误.html"
assert_equal "/base/%E9%94%99%E8%AF%AF.html", @filter.relative_url(page_url)
end
should "be ok with a nil 'baseurl'" do
page_url = "about/my_favorite_page/"
filter = make_filter_mock({
"url" => "http://example.com",
"baseurl" => nil
})
assert_equal "/#{page_url}", filter.relative_url(page_url)
end
should "not prepend a forward slash if input is empty" do
page_url = ""
filter = make_filter_mock({
"url" => "http://example.com",
"baseurl" => "/base"
})
assert_equal "/base", filter.relative_url(page_url)
end
end
context "jsonify filter" do
should "convert hash to json" do
assert_equal "{\"age\":18}", @filter.jsonify({ :age => 18 })
@@ -475,7 +601,7 @@ class TestFilters < JekyllUnitTest
g["items"].is_a?(Array),
"The list of grouped items for '' is not an Array."
)
assert_equal 13, g["items"].size
assert_equal 15, g["items"].size
end
end
end

View File

@@ -11,7 +11,7 @@ class TestGeneratedSite < JekyllUnitTest
end
should "ensure post count is as expected" do
assert_equal 49, @site.posts.size
assert_equal 50, @site.posts.size
end
should "insert site.posts into the index" do

View File

@@ -40,9 +40,12 @@ class TestNewCommand < JekyllUnitTest
should "display a success message" do
Jekyll::Commands::New.process(@args)
output = Jekyll.logger.messages.last
output = Jekyll.logger.messages[-3]
output_last = Jekyll.logger.messages.last
success_message = "New jekyll site installed in #{@full_path.cyan}."
bundle_message = "Running bundle install in #{@full_path.cyan}..."
assert_includes output, success_message
assert_includes output_last, bundle_message
end
should "copy the static files in site template to the new directory" do
@@ -85,7 +88,10 @@ class TestNewCommand < JekyllUnitTest
should "create blank project" do
blank_contents = %w(/_drafts /_layouts /_posts /index.html)
capture_stdout { Jekyll::Commands::New.process(@args, "--blank") }
output = Jekyll.logger.messages.last
bundle_message = "Running bundle install in #{@full_path.cyan}..."
assert_same_elements blank_contents, dir_contents(@full_path)
refute_includes output, bundle_message
end
should "force created folder" do
@@ -93,6 +99,13 @@ class TestNewCommand < JekyllUnitTest
output = capture_stdout { Jekyll::Commands::New.process(@args, "--force") }
assert_match(%r!New jekyll site installed in!, output)
end
should "skip bundle install when opted to" do
capture_stdout { Jekyll::Commands::New.process(@args, "--skip-bundle") }
output = Jekyll.logger.messages.last
bundle_message = "Bundle install skipped."
assert_includes output, bundle_message
end
end
context "when multiple args are given" do

View File

@@ -28,4 +28,37 @@ class TestPathSanitization < JekyllUnitTest
assert_equal source_dir("files", "hi.txt"),
Jekyll.sanitized_path(source_dir, "f./../../../../../../files/hi.txt")
end
if Jekyll::Utils::Platforms.really_windows?
context "on Windows with absolute path" do
setup do
@base_path = "D:/demo"
@file_path = "D:/demo/_site"
allow(Dir).to receive(:pwd).and_return("D:/")
end
should "strip just the clean path drive name" do
assert_equal "D:/demo/_site",
Jekyll.sanitized_path(@base_path, @file_path)
end
end
context "on Windows with file path has matching prefix" do
setup do
@base_path = "D:/site"
@file_path = "D:/sitemap.xml"
allow(Dir).to receive(:pwd).and_return("D:/")
end
should "not strip base path" do
assert_equal "D:/site/sitemap.xml",
Jekyll.sanitized_path(@base_path, @file_path)
end
end
end
should "not strip base path if file path has matching prefix" do
assert_equal "/site/sitemap.xml",
Jekyll.sanitized_path("/site", "sitemap.xml")
end
end

View File

@@ -13,8 +13,8 @@ class TestRelatedPosts < JekyllUnitTest
last_post = @site.posts.last
related_posts = Jekyll::RelatedPosts.new(last_post).build
last_10_recent_posts = (@site.posts.docs.reverse - [last_post]).first(10)
assert_equal last_10_recent_posts, related_posts
last_ten_recent_posts = (@site.posts.docs.reverse - [last_post]).first(10)
assert_equal last_ten_recent_posts, related_posts
end
end

View File

@@ -180,6 +180,7 @@ class TestSite < JekyllUnitTest
%#\ +.md
.htaccess
about.html
application.coffee
bar.html
coffeescript.coffee
contacts.html
@@ -191,6 +192,7 @@ class TestSite < JekyllUnitTest
humans.txt
index.html
index.html
info.md
main.scss
main.scss
properties.html
@@ -436,6 +438,21 @@ class TestSite < JekyllUnitTest
)
end
should "auto load yaml files in subdirectory with a period in the name" do
site = Site.new(site_configuration)
site.process
file_content = SafeYAML.load_file(File.join(
source_dir, "_data", "categories.01", "dairy.yaml"
))
assert_equal site.data["categories01"]["dairy"], file_content
assert_equal(
site.site_payload["site"]["data"]["categories01"]["dairy"],
file_content
)
end
should "load symlink files in unsafe mode" do
site = Site.new(site_configuration("safe" => false))
site.process

View File

@@ -112,6 +112,14 @@ class TestStaticFile < JekyllUnitTest
assert_equal Time.new.to_i, @static_file.mtime
end
should "only set modified time if not a symlink" do
expect(File).to receive(:symlink?).and_return(true)
expect(File).not_to receive(:utime)
@static_file.write(dest_dir)
allow(File).to receive(:symlink?).and_call_original
end
should "known if the source path is modified, when it is" do
sleep 1
modify_dummy_file(@filename)
@@ -134,6 +142,8 @@ class TestStaticFile < JekyllUnitTest
should "be able to convert to liquid" do
expected = {
"basename" => "static_file",
"name" => "static_file.txt",
"extname" => ".txt",
"modified_time" => @static_file.modified_time,
"path" => "/static_file.txt"

View File

@@ -12,6 +12,7 @@ class TestTags < JekyllUnitTest
site.posts.docs.concat(PostReader.new(site).read_posts("")) if override["read_posts"]
CollectionReader.new(site).read if override["read_collections"]
site.read if override["read_all"]
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
@converter = site.converters.find { |c| c.class == converter_class }
@@ -58,6 +59,7 @@ CONTENT
assert_match r, "xml+cheetah"
assert_match r, "x.y"
assert_match r, "coffee-script"
assert_match r, "shell_session"
refute_match r, "blah^"
@@ -587,6 +589,40 @@ CONTENT
end
end
context "simple page with nested post linking and path not used in `post_url`" do
setup do
content = <<CONTENT
---
title: Deprecated Post linking
---
- 1 {% post_url 2008-11-21-nested %}
CONTENT
create_post(content, {
"permalink" => "pretty",
"source" => source_dir,
"destination" => dest_dir,
"read_posts" => true
})
end
should "not cause an error" do
refute_match(%r!markdown\-html\-error!, @result)
end
should "have the url to the \"nested\" post from 2008-11-21" do
assert_match %r!1\s/2008/11/21/nested/!, @result
end
should "throw a deprecation warning" do
deprecation_warning = " Deprecation: A call to "\
"'{{ post_url 2008-11-21-nested }}' did not match a post using the new matching "\
"method of checking name (path-date-slug) equality. Please make sure that you "\
"change this tag to match the post's name exactly."
assert_includes Jekyll.logger.messages, deprecation_warning
end
end
context "simple page with invalid post name linking" do
should "cause an error" do
content = <<CONTENT
@@ -627,6 +663,41 @@ CONTENT
end
end
context "simple page with linking to a page" do
setup do
content = <<CONTENT
---
title: linking
---
{% link contacts.html %}
{% link info.md %}
{% link /css/screen.css %}
CONTENT
create_post(content, {
"source" => source_dir,
"destination" => dest_dir,
"read_all" => true
})
end
should "not cause an error" do
refute_match(%r!markdown\-html\-error!, @result)
end
should "have the URL to the \"contacts\" item" do
assert_match(%r!/contacts\.html!, @result)
end
should "have the URL to the \"info\" item" do
assert_match(%r!/info\.html!, @result)
end
should "have the URL to the \"screen.css\" item" do
assert_match(%r!/css/screen\.css!, @result)
end
end
context "simple page with linking" do
setup do
content = <<CONTENT

View File

@@ -34,16 +34,16 @@ class TestTheme < JekyllUnitTest
end
context "path generation" do
[:layouts, :includes, :sass].each do |folder|
[:assets, :_layouts, :_includes, :_sass].each do |folder|
should "know the #{folder} path" do
expected = File.expand_path("_#{folder}", @expected_root)
assert_equal expected, @theme.public_send("#{folder}_path")
expected = File.expand_path(folder.to_s, @expected_root)
assert_equal expected, @theme.public_send("#{folder.to_s.tr("_", "")}_path")
end
end
should "generate folder paths" do
expected = File.expand_path("./_sass", @expected_root)
assert_equal expected, @theme.send(:path_for, :sass)
assert_equal expected, @theme.send(:path_for, :_sass)
end
should "not allow paths outside of the theme root" do
@@ -56,7 +56,7 @@ class TestTheme < JekyllUnitTest
should "return the resolved path when a symlink & resolved path exists" do
expected = File.expand_path("./_layouts", @expected_root)
assert_equal expected, @theme.send(:path_for, :symlink)
assert_equal expected, @theme.send(:path_for, :_symlink)
end
end

View File

@@ -0,0 +1,71 @@
require "helper"
class TestThemeAssetsReader < JekyllUnitTest
def setup
@site = fixture_site(
"theme" => "test-theme",
"theme-color" => "black"
)
assert @site.theme
end
def assert_file_with_relative_path(haystack, relative_path)
assert haystack.any? { |f|
f.relative_path == relative_path
}, "Site should read in the #{relative_path} file, " \
"but it was not found in #{haystack.inspect}"
end
def refute_file_with_relative_path(haystack, relative_path)
refute haystack.any? { |f|
f.relative_path == relative_path
}, "Site should not have read in the #{relative_path} file, " \
"but it was found in #{haystack.inspect}"
end
context "with a valid theme" do
should "read all assets" do
@site.reset
ThemeAssetsReader.new(@site).read
assert_file_with_relative_path @site.static_files, "assets/img/logo.png"
assert_file_with_relative_path @site.pages, "assets/style.scss"
end
should "convert pages" do
@site.process
file = @site.pages.find { |f| f.relative_path == "assets/style.scss" }
refute_nil file
assert_equal @site.in_dest_dir("assets/style.css"), file.destination(@site.dest)
assert_includes file.output, ".sample {\n color: black; }"
end
should "not overwrite site content with the same relative path" do
@site.reset
@site.read
file = @site.pages.find { |f| f.relative_path == "assets/application.coffee" }
refute_nil file
assert_includes file.content, "alert \"From your site.\""
end
end
context "with a valid theme without an assets dir" do
should "not read any assets" do
site = fixture_site("theme" => "test-theme")
allow(site.theme).to receive(:assets_path).and_return(nil)
ThemeAssetsReader.new(site).read
refute_file_with_relative_path site.static_files, "assets/img/logo.png"
refute_file_with_relative_path site.pages, "assets/style.scss"
end
end
context "with no theme" do
should "not read any assets" do
site = fixture_site("theme" => nil)
ThemeAssetsReader.new(site).read
refute_file_with_relative_path site.static_files, "assets/img/logo.png"
refute_file_with_relative_path site.pages, "assets/style.scss"
end
end
end

View File

@@ -198,6 +198,13 @@ class TestUtils < JekyllUnitTest
)
end
should "replace everything else but ASCII characters" do
assert_equal "the-config-yml-file",
Utils.slugify("The _config.yml file?", :mode => "ascii")
assert_equal "f-rtive-glance",
Utils.slugify("fürtive glance!!!!", :mode => "ascii")
end
should "only replace whitespace if mode is raw" do
assert_equal(
"the-_config.yml-file?",