{% if page.layout == 'post' %}
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
{% endif %}
{% endif %}
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
{% assign _urls = site.data.assets[origin].lazysizes.js %}
{% unless page.layout == 'home' %}
{% assign _urls = _urls
| append: ','
| append: site.data.assets[origin]['magnific-popup'].js
| append: ','
| append: site.data.assets[origin].clipboard.js
%}
{% endunless %}
{% include jsdelivr-combine.html urls=_urls %}
{% endif %}
{% if page.layout == 'home'
or page.layout == 'post'
or page.layout == 'archives'
or page.layout == 'category'
or page.layout == 'tag'
%}
{% assign locale = site.lang | split: '-' | first %}
{% assign _urls = site.data.assets[origin].dayjs.js.common
| append: ','
| append: site.data.assets[origin].dayjs.js.locale
| replace: ':LOCALE', locale
| append: ','
| append: site.data.assets[origin].dayjs.js.relativeTime
| append: ','
| append: site.data.assets[origin].dayjs.js.localizedFormat
%}
{% include jsdelivr-combine.html urls=_urls %}
{% endif %}
{% case page.layout %}
{% when 'home', 'categories', 'post', 'page' %}
{% assign type = page.layout %}
{% when 'archives', 'category', 'tag' %}
{% assign type = 'misc' %}
{% else %}
{% assign type = 'commons' %}
{% endcase %}
{% capture script %}/assets/js/dist/{{ type }}.min.js{% endcapture %}
{% if page.math %}
{% endif %}
{% if jekyll.environment == 'production' %}
{% if site.pwa.enabled %}
{% else %}
{% endif %}
{% if site.google_analytics.id != empty and site.google_analytics.id %}
{% include google-analytics.html %}
{% endif %}
{% endif %}