From 8a9c0239b65be52f064526b273968c4e2969b758 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 2 Oct 2021 17:33:43 +0300 Subject: custom_{css,js}: support absolute URLs --- _includes/common/header.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '_includes/common/header.html') diff --git a/_includes/common/header.html b/_includes/common/header.html index 464e42a..f905e37 100644 --- a/_includes/common/header.html +++ b/_includes/common/header.html @@ -23,7 +23,13 @@ {% if page.custom_css %} {% for css in page.custom_css %} - + {% assign abs_check = css | downcase | split: '//' %} + {% if abs_check[0] == 'http:' or abs_check[0] == 'https:' or abs_check[0] == blank %} + {% assign url = css %} + {% else %} + {% assign url = '/assets/css/' | relative_url | append: css %} + {% endif %} + {% endfor %} {% endif %} -- cgit v1.2.3