{% 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' %}
{% assign _urls = site.data.assets[origin]['magnific-popup'].js
| append: ','
| append: site.data.assets[origin].lazysizes.js
| append: ','
| append: site.data.assets[origin].clipboard.js
%}
{% 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 'categories', 'post', 'page' %}
{% assign type = page.layout %}
{% when 'home', '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 %}