Sha256: ce3135ea0fb10492ff413a6009ca71d31a8bd3979d89df93d9748ec07e5a5d7a

Contents?: true

Size: 732 Bytes

Versions: 19

Compression:

Stored size: 732 Bytes

Contents

{% assign urls = include.urls | split: ',' %}

{% assign combined_urls = nil %}

{% assign domain = 'https://cdn.jsdelivr.net/' %}

{% for url in urls %}

  {% if url contains domain %}
    {% assign url_snippet = url | slice: domain.size, url.size %}

    {% if combined_urls %}
      {% assign combined_urls = combined_urls | append: ',' | append: url_snippet %}
    {% else %}
      {% assign combined_urls = domain | append: 'combine/' | append: url_snippet %}
    {% endif %}

  {% elsif url contains '//' %}

    <script src="{{ url }}"></script>

  {% else %}

    <script src="{{ url | relative_url }}"></script>

  {% endif %}

{% endfor %}

{% if combined_urls %}
  <script src="{{ combined_urls }}"></script>
{% endif %}

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
jekyll-theme-chirpy-5.6.1 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.6.0 _includes/jsdelivr-combine.html
custom-chirpy-5.5.2 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.5.2 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.5.1 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.5.0 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-customized-by-alazaroc-5.4.0 _includes/jsdelivr-combine.html
dev-jekyll-theme-1.0.0 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.4.0 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.3.2 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.3.1 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-clarkezone-5.3.2 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.3.0 _includes/jsdelivr-combine.html
jekyll-theme-abd3lraouf-5.2.9 _includes/jsdelivr-combine.html
jekyll-theme-abd3lraouf-5.2.8 _includes/jsdelivr-combine.html
jekyll-theme-abd3lraouf-5.2.7 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.2.1 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.2.0 _includes/jsdelivr-combine.html
jekyll-theme-chirpy-5.1.0 _includes/jsdelivr-combine.html