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
This makes sure that overrides for Jekyll.configuration
all have string keys before their first use, particularly
also the "config" and "skip_config_files" options.
* master: (22 commits)
Update history to reflect merge of #4980 [ci skip]
werdz
Use jekyll-mentions and restructure
Add post about GSoC project.
Update history to reflect merge of #4976 [ci skip]
Amend WEBrick default headers documentation
Update history to reflect merge of #4966 [ci skip]
.rubocop.yml - remove lib/jekyll.rb
lib/jekyll.rb - fix offenses reported by rubocop method set_timezone is ignored using rubocop:disable Style/AccessorMethodName
Update history to reflect merge of #4977 [ci skip]
Update history to reflect merge of #4962 [ci skip]
Update history to reflect merge of #4959 [ci skip]
Fixed typo
Changed github-gem to github-pages
Included installation instructions
Installation instructions for github-pages gem
Added link to windows doc page
Fix inaccurate HTTP response header field name
Minor tweak to fix missing apostrophne
Feedback for flubbed regex and prefer File's directory check
...
* pathawks-readers:
I will chain blocks if I want to chain blocks.
Rubocop: Readers
Rubocop: lib/jekyll/readers/static_file_reader.rb
Rubocop: lib/jekyll/readers/post_reader.rb
Rubocop: lib/jekyll/readers/page_reader.rb
Rubocop: lib/jekyll/readers/layout_reader.rb
Rubocop: lib/jekyll/reader.rb
* pathawks-rubocop/misc:
Fix Page#relative_path so that it consistently does NOT have the prepending slash (previously inconsistent)
Rubocop cleanup for lib/jekyll/layout.rb
Rubocop cleanup for lib/jekyll/plugin_manager.rb
Rubocop cleanup for lib/jekyll/page.rb
* master: (38 commits)
Mention where it came from. [ci skip]
Update history to reflect merge of #4944 [ci skip]
Update history to reflect merge of #4943 [ci skip]
Mention where it came from. [ci skip]
Update history to reflect merge of #4942 [ci skip]
Update history to reflect merge of #4941
External: remove &block arg, use block_given?
Update history to reflect merge of #4936 [ci skip]
lib/jekyll.rb: require document_drop to ease our pain
Sort the results of the require_all glob.
Rubocop fixes
Reset {{ layout }} between each render & merge layout data properly
Add failing test for layout data inheritance bug (#4433)
Add failing test for layout bug (#4897)
Fix tests for plugins in configuration.
Define Drop#each so we can use the new frozen/duping behavior
Don't default 'include' and 'exclude' to an empty array
Fix some minor things in the tests
Freeze configuration defaults & duplicate in deep_merge_hashes if need be.
Remove merge conflicts I forgot to fix.
...
* pathawks-fp/ExcerptDrop:
Rubocop fixes
excerpt drop should give access to document's layout
look up the content methods for drops in a smarter way
Use require_relative
Add ExcerptDrop and remove excerpt's ability to refer to itself in Liquid
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.
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
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)
* Allow users to filter directories by ending their path with "/"
* Allow users to filter with a Regexp, some scenariors can really require it.
* Use Pathutil#in_path? for Symlink verification, it real/expand.
This also requires some downstream work in "jekyll-watch" which at this time is
not very robust, it doesn't recognize the difference either, and should probably
start doing so (what I mean is detecting "/" and using the full path.)
When it comes to bundler it's smart enough to know what to require, and in casees it's not, it's smart enough to accept :require. In most cases when bundler has a LoadError (or otherwise) it's because there is a problem inside of the Gem itself and when this happens, Jekyll will happily let that error slip when it shouldn't, resulting in a badly placed error that is actually wrong. This corrects that so errors can surface properly.
* master: (58 commits)
Update history to reflect merge of #4792 [ci skip]
Update history to reflect merge of #4793 [ci skip]
Update history to reflect merge of #4804 [ci skip]
Update history to reflect merge of #4754 [ci skip]
Update history to reflect merge of #4813 [ci skip]
Added missing single quote on rsync client side command
Add v3.0.4 and v3.1.3 to the history.
Fixed typo
Add jekyll-autoprefixer plugin
Explicitly require Filters rather than implicitly.
Update history to reflect merge of #4786 [ci skip]
Update history to reflect merge of #4789 [ci skip]
updates example domain in config template
Globalize Jekyll's Filters.
Update JRuby to 9.0.5.0; Drop the double digit test.
Update Rack-Jekyll Heroku deployment blog post url
convertible: use Document::YAML_FRONT_MATTER_REGEXP to parse transformable files
Update history to reflect merge of #4734 [ci skip]
Update history to reflect merge of #4478 [ci skip]
Fix rubocop warning.
...
As it stands Jekyll does not globalize it's filters. So anybody wishing to go
into Jekyll's context to process their own Liquid (say in a plugin) may be taken
aback when they find out that Jekyll's filters are not available.
See: jekyll/jekyll-assets#252.
This commit introduces a where_exp filter, which can be used as follows:
`{{ array | where_exp: "item", "item == 10" }}`
`{{ array | where_exp: "item", "item.field > 10" }}`
`{{ site.posts | where_exp: "post", "post contains 'field'" }}`
`{{ site.posts | where_exp: "post", "post.array contains 'giraffes'" }}`
This permits a variety of use cases, such as reported in: jekyll#4467,
jekyll#4385, jekyll#2787.
As it was we assumed that any system that wasn't Windows or OS X must be Linux
but the reality of that can be very unlikely. BSD is popular in some places and
it's not Linux and this would cause an error there. If we do not know the
launcher for a platform we should ship an error and have the user file
a bug if they feel it necessary and skip the launch otherwise.
* origin/master: (65 commits)
Update history to reflect merge of #4703 [ci skip]
Update history to reflect merge of #4712 [ci skip]
Highlight the test code
Update history to reflect merge of #4640 [ci skip]
readded "env=prod"-condition
Update history to reflect merge of #3849 [ci skip]
Update history to reflect merge of #4624 [ci skip]
Update history to reflect merge of #4704 [ci skip]
Update history to reflect merge of #4706 [ci skip]
Checks for link file extension in tests
Updating assets documentation
Fix test teardown for cleaner.
Update history to reflect merge of #4542 [ci skip]
Add explanation of site variables in the example _config.yml
Use double quotes in the gemfile
Add test for creation of Gemfile by 'jekyll new'
Add comment about github-pages
Update history to reflect merge of #4533 [ci skip]
Ensure Rouge closes its div/figure properly after highlighting ends.
Add Site#config= which can be used to set the config
...
This removes the following warnings:
- /lib/jekyll/configuration.rb:151: warning: instance variable @default_config_file not initialized
- /lib/jekyll/converter.rb:12: warning: instance variable @highlighter_prefix not initialized
- /lib/jekyll/converter.rb:24: warning: instance variable @highlighter_suffix not initialized
- /lib/jekyll/converters/markdown.rb:9: warning: instance variable @setup not initialized
- /lib/jekyll/converters/markdown/kramdown_parser.rb:60: warning: instance variable @highlighter not initialized
- /lib/jekyll/frontmatter_defaults.rb:97: warning: shadowing outer local variable - path
- /lib/jekyll/plugin.rb:66: warning: instance variable @safe not initialized
- /lib/jekyll/regenerator.rb:147: warning: instance variable @disabled not initialized
- /test/test_convertible.rb:40: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_filters.rb:154: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_new_command.rb:84: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_site.rb:234: warning: assigned but unused variable - site
- /test/test_site.rb:240: warning: assigned but unused variable - site
- /test/test_site.rb:522: warning: assigned but unused variable - source
- /test/test_tags.rb:153: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_tags.rb:425: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_tags.rb:449: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_tags.rb:496: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_tags.rb:496: warning: instance variable @result not initialized
- /test/test_tags.rb:511: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_tags.rb:773: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_tags.rb:773: warning: instance variable @result not initialized
- /test/test_tags.rb:788: warning: ambiguous first argument; put parentheses or a space even after `/' operator
- /test/test_url.rb:66: warning: shadowing outer local variable - doc
- /lib/jekyll/url.rb:119:in `escape_path': warning: URI.escape is obsolete
Prior to this change, the related posts for the most recently rendered post
stayed set on the `site` object. This could result in pages that showed related
posts even when the page represented an entire collection of posts, such as on
an index page. This change restores the functionality from Jekyll V2.
Previously `titleize` used `capitalize!` which has the side effect of
returning `nil` for anything already starting with a capital letter. This
commit changes it to just `capitalize`.
Example, before:
A file "2016-01-01-This-is-a-title-with-Capitals.markdown" would return "Is A
Title With" for `post.title`
Example, after:
A file "2016-01-01-This-is-a-title-with-Capitals.markdown" will return "This Is A
Title With Capitals" for `post.title`
Tests added for `titleize_slug` in test_utils.rb
Fix problem introduced in 67f842546e
References #4525