* 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
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
Occasionally, extra spaces at the end of the YAML front matter prologue are
saved to a file and it goes missing without telling the user why. This
should simply accept those changes without any detriment to the user,
allowing anyone to add as many spaces as they like to the end of their
front matter prologues.
which works the same way as Dir.glob but seperating the input
into two parts ('dir' + '/' + 'pattern') to make sure
the first part('dir') does not act as a pattern.
This updates the default permalink style for pages and collections to
match the site-wide 'permalink' setting. If the permalink setting
contains a trailing slash, either explicitly or by being set to
':pretty', then pages and collections permalinks will contain trailing
slashes by default as well. Similarly, if the permalink setting
contains a trailing ':output_ext', so will pages and collections. If
the permalink setting contains neither a trailing slash or extension,
neither will pages or collections.
This impacts only the default permalink structure for pages and
collections. Permalinks set in the frontmatter of an individual page
take precedence, as does the permalink setting for a specific
collection.
Fixes#2691
* nitoyon-slugify-new-param:
Remove superfluous Sass declarations.
Move the slugify options out to their own section so as to fix the formatting.
Document the mode parameter of slugify Liquid filter
Add tests for mode parameters of slugify Liquid filter
Add mode parameter to slugify Liquid filter
Conflicts:
lib/jekyll/utils.rb
---> Hadn't added UTF-8 support in nitoyon's PR.
To use, just include `Jekyll::LiquidExtensions` as you please:
```ruby
class SayHi < Liquid::Tag
include Jekyll::LiquidExtensions
def initialize(tag_name, markup, tokens)
@markup = markup.strip
end
def render(context)
"hi #{lookup_variable(context, @markup)}"
end
end
```
Fixes#2071.