From 367262e74d1005bddf1328bb2b3a2b9e152c0086 Mon Sep 17 00:00:00 2001 From: denis-games <105583649+denis-games@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:38:46 +0200 Subject: [PATCH 1/4] fix(i18n): correct fr-FR translations (#1949) Co-authored-by: Denis Jean --- _data/locales/fr-FR.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_data/locales/fr-FR.yml b/_data/locales/fr-FR.yml index 3f3c9a0..dce83c9 100644 --- a/_data/locales/fr-FR.yml +++ b/_data/locales/fr-FR.yml @@ -14,7 +14,7 @@ tabs: categories: Catégories tags: Tags archives: Archives - about: A propos de + about: À propos # the text displayed in the search bar & search results search: @@ -32,12 +32,12 @@ copyright: license: template: Cet article est sous licence :LICENSE_NAME par l'auteur. name: CC BY 4.0 - link: https://creativecommons.org/licenses/by/4.0/ + link: https://creativecommons.org/licenses/by/4.0/deed.fr # Displayed in the footer brief: Certains droits réservés. verbose: >- - Sauf mention contraire, les articles de ce site sont publiés sous licence + Sauf mention contraire, les articles de ce site sont publiés sous la licence Creative Commons Attribution 4.0 International (CC BY 4.0) par l'auteur. meta: Propulsé par :PLATFORM avec le thème :THEME From 3ab3b844d2ac475c92d5f84afc0259abab9fcbcd Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 18 Sep 2024 21:41:08 +0800 Subject: [PATCH 2/4] refactor: replace deprecated meta element Replace `apple-mobile-web-app-capable` with `mobile-web-app-capable` --- _includes/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/head.html b/_includes/head.html index fd260c0..af3acdb 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -2,7 +2,7 @@ - + Date: Wed, 18 Sep 2024 22:32:26 +0800 Subject: [PATCH 3/4] fix(pwa): site baseurl not passed to `app.js` (#1955) --- _includes/js-selector.html | 5 ++++- _javascript/pwa/app.js | 12 ++++++++---- _javascript/pwa/sw.js | 4 +--- package.json | 1 - rollup.config.js | 4 +--- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/_includes/js-selector.html b/_includes/js-selector.html index 9965107..4d77d06 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -92,7 +92,10 @@ {% if jekyll.environment == 'production' %} {% if site.pwa.enabled %} - + {% endif %} diff --git a/_javascript/pwa/app.js b/_javascript/pwa/app.js index c71036a..3c0ded2 100644 --- a/_javascript/pwa/app.js +++ b/_javascript/pwa/app.js @@ -1,15 +1,19 @@ -import { pwa, baseurl } from '../../_config.yml'; import Toast from 'bootstrap/js/src/toast'; if ('serviceWorker' in navigator) { - if (pwa.enabled) { - const swUrl = `${baseurl}/sw.min.js`; + // Get Jekyll config from URL parameters + const src = new URL(document.currentScript.src); + const register = src.searchParams.get('register'); + const baseUrl = src.searchParams.get('baseurl'); + + if (register) { + const swUrl = `${baseUrl}/sw.min.js`; const notification = document.getElementById('notification'); const btnRefresh = notification.querySelector('.toast-body>button'); const popupWindow = Toast.getOrCreateInstance(notification); navigator.serviceWorker.register(swUrl).then((registration) => { - // In case the user ignores the notification + // Restore the update window that was last manually closed by the user if (registration.waiting) { popupWindow.show(); } diff --git a/_javascript/pwa/sw.js b/_javascript/pwa/sw.js index 94b64bf..ff9125d 100644 --- a/_javascript/pwa/sw.js +++ b/_javascript/pwa/sw.js @@ -1,6 +1,4 @@ -import { baseurl } from '../../_config.yml'; - -importScripts(`${baseurl}/assets/js/data/swconf.js`); +importScripts('./assets/js/data/swconf.js'); const purge = swconf.purge; const interceptor = swconf.interceptor; diff --git a/package.json b/package.json index 0dbc382..bab1a2f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-terser": "^0.4.4", - "@rollup/plugin-yaml": "^4.1.2", "@semantic-release/changelog": "^6.0.3", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", diff --git a/rollup.config.js b/rollup.config.js index 22016b0..19ba4da 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,6 @@ import babel from '@rollup/plugin-babel'; import terser from '@rollup/plugin-terser'; import { nodeResolve } from '@rollup/plugin-node-resolve'; -import yaml from '@rollup/plugin-yaml'; import fs from 'fs'; import pkg from './package.json'; @@ -43,7 +42,7 @@ function build(filename, { src = SRC_DEFAULT, jekyll = false } = {}) { format: 'iife', name: 'Chirpy', banner, - sourcemap: !isProd + sourcemap: !isProd && !jekyll }, watch: { include: `${src}/**` @@ -55,7 +54,6 @@ function build(filename, { src = SRC_DEFAULT, jekyll = false } = {}) { plugins: ['@babel/plugin-transform-class-properties'] }), nodeResolve(), - yaml(), isProd && terser(), jekyll && insertFrontmatter() ] From fac6116af1d9836df5220f63c09fdf3d36910795 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:41:28 +0800 Subject: [PATCH 4/4] build(dev-deps): bump 7 dependencies versions --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index bab1a2f..1871352 100644 --- a/package.json +++ b/package.json @@ -31,21 +31,21 @@ "@babel/core": "^7.25.2", "@babel/plugin-transform-class-properties": "^7.25.4", "@babel/preset-env": "^7.25.4", - "@commitlint/cli": "^19.4.0", - "@commitlint/config-conventional": "^19.2.2", + "@commitlint/cli": "^19.5.0", + "@commitlint/config-conventional": "^19.5.0", "@rollup/plugin-babel": "^6.0.4", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-terser": "^0.4.4", "@semantic-release/changelog": "^6.0.3", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", - "concurrently": "^8.2.2", + "concurrently": "^9.0.1", "conventional-changelog-conventionalcommits": "^8.0.0", - "husky": "^9.1.5", + "husky": "^9.1.6", "purgecss": "^6.0.0", - "rollup": "^4.21.0", - "semantic-release": "^24.1.0", - "stylelint": "^16.8.2", + "rollup": "^4.21.3", + "semantic-release": "^24.1.1", + "stylelint": "^16.9.0", "stylelint-config-standard-scss": "^13.1.0" }, "prettier": {