diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 1e05511..affd492 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -5,7 +5,7 @@ jobs: commitlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v4 + - uses: wagoid/commitlint-github-action@v5 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 72% rename from _data/assets/cross_origin.yml rename to _data/origin/cors.yml index 594e9dc..cf8f0ec 100644 --- a/_data/assets/cross_origin.yml +++ b/_data/origin/cors.yml @@ -16,31 +16,31 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:w # Libraries jquery: - js: https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.min.js + js: https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js bootstrap: css: https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css js: https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js toc: - css: https://cdn.jsdelivr.net/npm/tocbot@4.20.1/dist/tocbot.min.css - js: https://cdn.jsdelivr.net/npm/tocbot@4.20.1/dist/tocbot.min.js + css: https://cdn.jsdelivr.net/npm/tocbot@4.21.0/dist/tocbot.min.css + js: https://cdn.jsdelivr.net/npm/tocbot@4.21.0/dist/tocbot.min.js fontawesome: - css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.1/css/all.min.css + css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css search: js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js mermaid: - js: https://cdn.jsdelivr.net/npm/mermaid@9.2.2/dist/mermaid.min.js + js: https://cdn.jsdelivr.net/npm/mermaid@9.4.3/dist/mermaid.min.js dayjs: js: - common: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/dayjs.min.js - locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/locale/:LOCALE.min.js - relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/relativeTime.min.js - localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/localizedFormat.min.js + common: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/dayjs.min.js + locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/locale/:LOCALE.min.js + relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/plugin/relativeTime.min.js + localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.7/plugin/localizedFormat.min.js countup: js: https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js diff --git a/_includes/comments/giscus.html b/_includes/comments/giscus.html index 29b848f..ed918a9 100644 --- a/_includes/comments/giscus.html +++ b/_includes/comments/giscus.html @@ -1,44 +1,54 @@ diff --git a/_includes/head.html b/_includes/head.html index 6407c9c..0c85fe1 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,30 +90,27 @@ {% endif %} - + - + {% if site.toc and page.toc %} - + {% endif %} {% if page.layout == 'page' or page.layout == 'post' %} - + {% endif %} - - {% unless site.theme_mode %} {% include mode-toggle.html %} {% endunless %} {% include metadata-hook.html %} - diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 7d2224c..177aaf2 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -1,27 +1,35 @@ + + +{% assign urls = site.data.origin[type].jquery.js + | append: ',' + | append: site.data.origin[type].bootstrap.js + | append: ',' + | append: site.data.origin[type].search.js +%} + {% 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.origin[type].countup.js %} {% endif %} {% endif %} {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %} - {% assign _urls = site.data.assets[origin].lazysizes.js %} + {% assign urls = urls | append: ',' | append: site.data.origin[type].lazysizes.js %} {% unless page.layout == 'home' %} - {% assign _urls = _urls + + {% 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 %} - - {% include jsdelivr-combine.html urls=_urls %} {% endif %} {% if page.layout == 'home' @@ -32,29 +40,39 @@ %} {% assign locale = site.lang | split: '-' | first %} - {% assign _urls = site.data.assets[origin].dayjs.js.common + {% assign urls = urls | append: ',' - | append: site.data.assets[origin].dayjs.js.locale + | append: site.data.origin[type].dayjs.js.common + | append: ',' + | 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 %} - - {% include jsdelivr-combine.html urls=_urls %} {% endif %} +{% if page.content contains '