Use relative_url and absolute_url where possible (#2387)
* 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
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
<figure class="{{ include.class }}">
|
||||
<img src=
|
||||
{% if include.image_path contains "://" %}
|
||||
"{{ include.image_path }}"
|
||||
{% else %}
|
||||
"{{ include.image_path | relative_url }}"
|
||||
{% endif %}
|
||||
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
|
||||
<img src="{{ include.image_path | relative_url }}"
|
||||
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
|
||||
{% if include.caption %}
|
||||
<figcaption>
|
||||
{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}
|
||||
</figcaption>{% endif %}</figure>
|
||||
</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
|
Reference in New Issue
Block a user