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.
Previously, even if the document permalink was a folder, it would look for
an extension on that. For example, if I have:
permalink: "/new-version-jekyll-v3.0.0/"
the output_ext would be ".0". Now, the output_ext honors the trailing
slash and will report based on the converters instead.
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
This ensures that destination files for HTML posts, pages and
collections always include the proper file extension (as defined by
output_ext) regardless of permalink structure. This allows for URLs
that contain no extension or trailing slash to still result in proper
destination files with .html extensions.
Because this change relies so heavily on output_ext accurately
identifying the extension of the destination file, this change also
removes the feature test that tested support for permalinks with a .htm
extension. In order to support alternate file extensions, a future
patch or plugin will need to modify the output_ext value, at which point
everything else should work as expected.
* davidized-collection_yaml_dots:
Move YAML Front Matter regexp into a constant.
Add support for collections documents to have YAML front matter ending in dots.
Conflicts:
test/test_collections.rb
Document#destination wasn't unescaped properly.
For example, when we have a document named '_langs/c#.md',
we expect its url to be '/langs/c#.html',
but it was actually '/langs/c%23.html'.
We now unecape URL at Document#destination like Post#destination and
Page#destination.