When the figure helper is used in a list, which can be either ordered or
unordered, and no caption is specified, a line with text "</figure>"
will be shown below the figure on the rendered page.
This is because, if the '{% if include.caption %}' evaluates to false,
the lines between that 'if' statement and '{% endif %}' will be emptied,
not removed, so the block will be filled by empty lines.
HTML ignores redundant empty lines, but Markdown takes them seriously.
In addition, Markdown expects proper indentation of lines inside lists,
and the closing '</figure>' tag is not indented. When combined, the
empty space and absence of indentation cause Markdown to process the
'</figure>' tag as a separate paragraph instead of an HTML tag, thus the
text for the tag is directly rendered on the page.
The fix for this issue is very simple: remove the empty space when
'include.caption' is false. As described in
<https://shopify.github.io/liquid/basics/whitespace/>, this can be done
by adding hyphens to the 'if' and 'endif' tags.
* Use relative_url and absolute_url where possible
Drops the `contains "://"` check, adopt Jekyll 3.7
Ref: https://github.com/mmistakes/minimal-mistakes/pull/2385#issuecomment-579882236
* One more unneeded {% assign %}
* Remove one more assign as noted by mmistakes
* Consolidate 4 more captures
* Consolidate an extra assign on "active" class
Where it makes sense replace asset paths and navigation related paths with `relative_url` filter.
Leave SEO related `<head>` elements and social sharing links as `absolute_url`.
Fixes#1588