{% assign urls = site.data.origin[type].search.js %} {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %} {% assign urls = urls | append: ',' | append: site.data.origin[type]['lazy-polyfill'].js %} {% unless page.layout == 'home' %} {% assign urls = urls | append: ',' | append: site.data.origin[type].glightbox.js | append: ',' | append: site.data.origin[type].clipboard.js %} {% endunless %} {% endif %} {% if page.layout == 'home' or page.layout == 'post' or page.layout == 'archives' or page.layout == 'category' or page.layout == 'tag' %} {% assign locale = include.lang | split: '-' | first %} {% assign urls = urls | append: ',' | append: site.data.origin[type].dayjs.js.common | append: ',' | append: site.data.origin[type].dayjs.js.locale | replace: ':LOCALE', locale | append: ',' | append: site.data.origin[type].dayjs.js.relativeTime | append: ',' | append: site.data.origin[type].dayjs.js.localizedFormat %} {% endif %} {% if page.content contains ' {% if page.math %} {% endif %} {% if page.layout == 'post' %} {% assign provider = site.pageviews.provider %} {% if provider and provider != empty %} {% case provider %} {% when 'goatcounter' %} {% if site.analytics[provider].id != empty and site.analytics[provider].id %} {% include pageviews/{{ provider }}.html %} {% endif %} {% endcase %} {% endif %} {% endif %} {% if page.mermaid %} {% include mermaid.html %} {% endif %} {% if jekyll.environment == 'production' %} {% if site.pwa.enabled %} {% endif %} {% for analytics in site.analytics %} {% capture str %}{{ analytics }}{% endcapture %} {% assign type = str | split: '{' | first %} {% if site.analytics[type].id and site.analytics[type].id != empty %} {% include analytics/{{ type }}.html %} {% endif %} {% endfor %} {% endif %}