From b3d7db3cda006a63cdecd718f97d415eab709dc8 Mon Sep 17 00:00:00 2001 From: Cotes <11371340+cotes2020@users.noreply.github.com> Date: Fri, 17 Oct 2025 00:02:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20avoid=20converting=20media=E2=80=98?= =?UTF-8?q?s=20relative=20paths=20to=20absolute=20paths=20(#2552)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _includes/media-url.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/media-url.html b/_includes/media-url.html index ea4107502..407d42187 100644 --- a/_includes/media-url.html +++ b/_includes/media-url.html @@ -15,7 +15,9 @@ {%- if url -%} {% unless url contains ':' %} {%- comment -%} Add media resources subpath prefix {%- endcomment -%} - {% assign url = include.subpath | default: '' | append: '/' | append: url %} + {% if include.subpath %} + {% assign url = include.subpath | append: '/' | append: url %} + {% endif %} {%- comment -%} Prepend CND URL {%- endcomment -%} {% if site.cdn %}