mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Make the source of the static assets configurable
- Easy to switch between different CDN - Allow self-host static assets
This commit is contained in:
12
_includes/assets-origin.html
Normal file
12
_includes/assets-origin.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% comment %} Site static assets origin {% endcomment %}
|
||||
{% assign origin = 'cross_origin' %}
|
||||
|
||||
{% if site.assets.self_host.enabled %}
|
||||
{% if site.assets.self_host.env %}
|
||||
{% if site.assets.self_host.env == jekyll.environment %}
|
||||
{% assign origin = 'self_host' %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% assign origin = 'self_host' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user