Sha256: d96e377bdcfe3e6b82b70f41f079432c743be7bc24335cfaafddef1aab8115f9
Contents?: true
Size: 726 Bytes
Versions: 57
Compression:
Stored size: 726 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
57 entries across 57 versions & 6 rubygems