diff --git a/_data/assets/self_host.yml b/_data/origin/basic.yml similarity index 100% rename from _data/assets/self_host.yml rename to _data/origin/basic.yml diff --git a/_data/assets/cross_origin.yml b/_data/origin/cors.yml similarity index 100% rename from _data/assets/cross_origin.yml rename to _data/origin/cors.yml diff --git a/_includes/head.html b/_includes/head.html index f767edbf1bf..0c85fe13ca4 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -58,15 +58,15 @@ {% include favicons.html %} {% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %} - + {% else %} - {% for cdn in site.data.assets[origin].cdns %} + {% for cdn in site.data.origin[type].cdns %} {% endfor %} - + {% endif %} @@ -90,20 +90,20 @@ {% endif %} - + - + {% if site.toc and page.toc %} - + {% endif %} {% if page.layout == 'page' or page.layout == 'post' %} - + {% endif %} @@ -113,5 +113,4 @@ {% endunless %} {% include metadata-hook.html %} - diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 895ccefcf04..177aaf22783 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -2,11 +2,11 @@ -{% assign urls = site.data.assets[origin].jquery.js +{% assign urls = site.data.origin[type].jquery.js | append: ',' - | append: site.data.assets[origin].bootstrap.js + | append: site.data.origin[type].bootstrap.js | append: ',' - | append: site.data.assets[origin].search.js + | append: site.data.origin[type].search.js %} @@ -14,20 +14,20 @@ {% if page.layout == 'post' %} {% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %} - {% assign urls = urls | append: ',' | append: site.data.assets[origin].countup.js %} + {% assign urls = urls | append: ',' | append: site.data.origin[type].countup.js %} {% endif %} {% endif %} {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %} - {% assign urls = urls | append: ',' | append: site.data.assets[origin].lazysizes.js %} + {% assign urls = urls | append: ',' | append: site.data.origin[type].lazysizes.js %} {% unless page.layout == 'home' %} {% assign urls = urls | append: ',' - | append: site.data.assets[origin]['magnific-popup'].js + | append: site.data.origin[type]['magnific-popup'].js | append: ',' - | append: site.data.assets[origin].clipboard.js + | append: site.data.origin[type].clipboard.js %} {% endunless %} {% endif %} @@ -42,37 +42,37 @@ {% assign urls = urls | append: ',' - | append: site.data.assets[origin].dayjs.js.common + | append: site.data.origin[type].dayjs.js.common | append: ',' - | append: site.data.assets[origin].dayjs.js.locale + | append: site.data.origin[type].dayjs.js.locale | replace: ':LOCALE', locale | append: ',' - | append: site.data.assets[origin].dayjs.js.relativeTime + | append: site.data.origin[type].dayjs.js.relativeTime | append: ',' - | append: site.data.assets[origin].dayjs.js.localizedFormat + | append: site.data.origin[type].dayjs.js.localizedFormat %} {% endif %} {% if page.content contains '