Skip to content

Commit d23e847

Browse files
committed
refactor: avoid converting media‘s relative paths to absolute paths
1 parent ee68395 commit d23e847

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_includes/media-url.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
{%- if url -%}
1616
{% unless url contains ':' %}
1717
{%- comment -%} Add media resources subpath prefix {%- endcomment -%}
18-
{% assign url = include.subpath | default: '' | append: '/' | append: url %}
18+
{% if include.subpath %}
19+
{% assign url = include.subpath | append: '/' | append: url %}
20+
{% endif %}
1921

2022
{%- comment -%} Prepend CND URL {%- endcomment -%}
2123
{% if site.cdn %}

0 commit comments

Comments
 (0)