aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/common/header.html
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-10-02 17:33:43 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-10-02 17:40:29 +0300
commit8a9c0239b65be52f064526b273968c4e2969b758 (patch)
tree6858169e8742277811a14786a9e18ee9733a5dc7 /_includes/common/header.html
parentREADME: update (diff)
downloadjekyll-theme-8a9c0239b65be52f064526b273968c4e2969b758.tar.gz
jekyll-theme-8a9c0239b65be52f064526b273968c4e2969b758.zip
custom_{css,js}: support absolute URLs
Diffstat (limited to '')
-rw-r--r--_includes/common/header.html8
1 files changed, 7 insertions, 1 deletions
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 %}
- <link rel="stylesheet" href="{{ '/assets/css/' | relative_url }}{{ 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 %}
+ <link rel="stylesheet" href="{{ url }}">
{% endfor %}
{% endif %}
</head>