Parker Moore
17d8c96a63
Add ability to render drops as JSON
...
Previously you could do, e.g. {{ site | jsonify }}, but with the introduction of Liquid Drops, this didn't work anymore.
This PR adds the ability to render drops as JSON. You can safely run drop.to_json and it should Do the Right Thing.
2016-05-24 19:08:46 -05:00
Parker Moore
ad7bd84098
lib/jekyll.rb: require document_drop to ease our pain
2016-05-24 19:03:32 -05:00
Parker Moore
1a05483a63
Sort the results of the require_all glob.
...
Filesystems behave differently when performing glob listings.
In my environment, they are listed alphabetically. On my Mac, when asking for a list of files in a directory, those files are returned as a nicely sorted list. Alphabetized, like you'd want them to be. Like you'd expect them to be.
In some environments, quite different from my own, the return of a similar operation is quite random. Perhaps q comes before a, or e before d; the filesystem will choose its order of the day and you, the fare user, tired and weary from work, must bare the brunt of this.
And so, with this commit, I do hereby request that the noble makers of Dir[] provide for us, the downtrodden and ravaged users, some consistency. As a user of Ruby, I shouldn't have to know or consider the behaviour of an individual filesystem here; it should function the same for all filesystems.
Truly yours,
Parker
2016-05-24 19:03:32 -05:00
Pat Hawks
cc0c5ea19e
Rubocop fixes
2016-05-24 19:01:35 -05:00
Parker Moore
db7cd6f612
Reset {{ layout }} between each render & merge layout data properly
2016-05-24 18:57:54 -05:00
Parker Moore
8e939cd86e
Add failing test for layout data inheritance bug ( #4433 )
2016-05-24 18:57:54 -05:00
Parker Moore
a99adcafaa
Add failing test for layout bug ( #4897 )
2016-05-24 18:57:53 -05:00
Parker Moore
7641971d7e
Fix tests for plugins in configuration.
2016-05-24 18:49:06 -05:00
Parker Moore
48274244e3
Define Drop#each so we can use the new frozen/duping behavior
2016-05-24 18:49:06 -05:00
Parker Moore
d5c3785d29
Don't default 'include' and 'exclude' to an empty array
2016-05-24 18:49:06 -05:00
Parker Moore
de5970ae55
Fix some minor things in the tests
2016-05-24 18:49:05 -05:00
Parker Moore
d84844c223
Freeze configuration defaults & duplicate in deep_merge_hashes if need be.
2016-05-24 18:49:05 -05:00
Parker Moore
ad59b6e62a
Remove merge conflicts I forgot to fix.
2016-05-24 18:49:02 -05:00
Parker Moore
37b93f10dd
Add missing 'end' to test/helper.rb
2016-05-24 18:47:15 -05:00
Parker Moore
59346eb228
Remove call to #backwards_compatibilize in Configuration.from
2016-05-24 18:47:15 -05:00
Parker Moore
8af77643c5
Site#site_payload: sort collections by label
2016-05-24 18:47:15 -05:00
Parker Moore
f52a0e7200
Configuration#add_default_collections: fix bug where DEFAULTS['collections'] is modified
2016-05-24 18:47:15 -05:00
Parker Moore
d01f7943de
Add Configuration.from & use in Jekyll.configuration.
...
This process streamlines the creation of new configurations. Creating a new
site will choke if not all the correct options are given.
Configuration.from will ensure the overrides have all string keys and
ensures all the common issues & defaults are in place so a Site can be
created.
A common use:
config = Configuration.from({ 'permalink' => '/:title/' }) # etc
site = Jekyll::Site.new(config)
2016-05-24 18:47:15 -05:00
Parker Moore
fab092fcec
Remove use of Marshal in runtime code.
2016-05-24 18:47:15 -05:00
Parker Moore
4e06f07ad4
Add tests for Configuration#add_default_collections
2016-05-24 18:47:14 -05:00
Parker Moore
6eaa8e90f8
Don't read a config file if the filename is empty.
2016-05-24 18:47:14 -05:00
Parker Moore
04d4473119
Use Marshal to duplicate configuration defaults to prevent manipulation
2016-05-24 18:47:14 -05:00
Parker Moore
dbcbf809ff
Refactor some tests to prevent manipulation of Jekyll::Config::DEFAULTS
2016-05-24 18:47:04 -05:00
Parker Moore
f2263a11b7
Only write collections.posts.permalink if permalink is set.
2016-05-24 18:40:19 -05:00
Parker Moore
c69ca4c11e
Test#build_configs shouldn't overwrite default collections
2016-05-24 18:40:19 -05:00
Pat Hawks
48f16974ce
Rubocop fixes
2016-05-24 18:27:37 -05:00
Parker Moore
7d3f8ac75d
excerpt drop should give access to document's layout
2016-05-24 17:35:03 -05:00
Parker Moore
c0910f2bc5
look up the content methods for drops in a smarter way
2016-05-24 17:34:49 -05:00
Parker Moore
3896f6d5d8
Use require_relative
2016-05-24 17:32:33 -05:00
Parker Moore
b019234007
Add ExcerptDrop and remove excerpt's ability to refer to itself in Liquid
2016-05-24 17:30:03 -05:00
Pat Hawks
a8d27e5788
Rubocop: Low hanging fruit
2016-05-23 22:10:49 -05:00
Parker Moore
e02049727b
Update history to reflect merge of #4916
...
[ci skip]
2016-05-23 13:44:00 -07:00
jekyllbot
6eaf2634f2
Merge pull request #4916 from brint/rubocop_cleaning
...
Merge pull request 4916
2016-05-23 13:36:48 -07:00
Brint O'Hearn
dbda462c2f
Adding double quotes & freeze back to version after rebase
2016-05-20 21:51:16 -05:00
Brint O'Hearn
6db5272528
Splitting args onto own lines in test/test_static_file.rb
...
For functions where the character limit was exceeded
and line wrapping was needed, this commit just splits
each arg into it's own line.
2016-05-20 21:24:34 -05:00
Brint O'Hearn
281a873c71
lib/jekyll/utils/platforms.rb didn't have any rubocop errors
2016-05-20 21:24:34 -05:00
Brint O'Hearn
d743c80357
Rubocop fixes for lib/jekyll/utils/ansi.rb
2016-05-20 21:24:34 -05:00
Brint O'Hearn
e85f2a0ee9
Rubocop fixes for lib/jekyll/version.rb
2016-05-20 21:24:34 -05:00
Brint O'Hearn
8f07affe2a
Rubocop fixes for test/test_related_posts.rb
2016-05-20 21:23:29 -05:00
Brint O'Hearn
a9f110b861
Rubocop fixes for test/test_sass.rb
2016-05-20 21:23:29 -05:00
Brint O'Hearn
16c1146b4f
Rubocop fixes for test/test_static_file.rb
2016-05-20 21:23:29 -05:00
Brint O'Hearn
1380836a4b
Rubocop fixes for test/test_theme.rb
2016-05-20 21:23:29 -05:00
Brint O'Hearn
013e2f159d
Rubocop fixes for test/test_url.rb
2016-05-20 21:23:29 -05:00
Parker Moore
498324bbff
Release 💎 3.2.0.pre.beta1
2016-05-20 19:19:26 -07:00
Parker Moore
51c4152919
Release a beta.
2016-05-20 19:19:21 -07:00
jekyllbot
cd31761f9a
Update history to reflect merge of #4848 [ci skip]
2016-05-19 22:13:05 -07:00
jekyllbot
ee2c41ad6a
Merge pull request #4848 from jekyll/new-theme-command
...
Merge pull request 4848
2016-05-19 22:13:05 -07:00
Parker Moore
f3a29677f9
Fix rubocop issues.
2016-05-19 21:34:30 -07:00
Parker Moore
f2d08cf138
Correct variable reference.
2016-05-19 17:15:33 -07:00
Parker Moore
ca0b1f7ea6
Add note about {{ layout }} to site.
2016-05-19 14:44:00 -07:00