Merge branch 'master' into production
This commit is contained in:
commit
fbcdf8ce85
7 changed files with 25 additions and 23 deletions
|
@ -14,7 +14,7 @@ tabs:
|
||||||
categories: Catégories
|
categories: Catégories
|
||||||
tags: Tags
|
tags: Tags
|
||||||
archives: Archives
|
archives: Archives
|
||||||
about: A propos de
|
about: À propos
|
||||||
|
|
||||||
# the text displayed in the search bar & search results
|
# the text displayed in the search bar & search results
|
||||||
search:
|
search:
|
||||||
|
@ -32,12 +32,12 @@ copyright:
|
||||||
license:
|
license:
|
||||||
template: Cet article est sous licence :LICENSE_NAME par l'auteur.
|
template: Cet article est sous licence :LICENSE_NAME par l'auteur.
|
||||||
name: CC BY 4.0
|
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
|
# Displayed in the footer
|
||||||
brief: Certains droits réservés.
|
brief: Certains droits réservés.
|
||||||
verbose: >-
|
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.
|
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
|
meta: Propulsé par :PLATFORM avec le thème :THEME
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
|
|
|
@ -92,7 +92,10 @@
|
||||||
{% if jekyll.environment == 'production' %}
|
{% if jekyll.environment == 'production' %}
|
||||||
<!-- PWA -->
|
<!-- PWA -->
|
||||||
{% if site.pwa.enabled %}
|
{% if site.pwa.enabled %}
|
||||||
<script defer src="{{ 'app.min.js' | relative_url }}"></script>
|
<script
|
||||||
|
defer
|
||||||
|
src="{{ 'app.min.js' | relative_url }}?baseurl={{ site.baseurl | default: '' }}®ister={{ site.pwa.cache.enabled }}"
|
||||||
|
></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Web Analytics -->
|
<!-- Web Analytics -->
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
import { pwa, baseurl } from '../../_config.yml';
|
|
||||||
import Toast from 'bootstrap/js/src/toast';
|
import Toast from 'bootstrap/js/src/toast';
|
||||||
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
if (pwa.enabled) {
|
// Get Jekyll config from URL parameters
|
||||||
const swUrl = `${baseurl}/sw.min.js`;
|
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 notification = document.getElementById('notification');
|
||||||
const btnRefresh = notification.querySelector('.toast-body>button');
|
const btnRefresh = notification.querySelector('.toast-body>button');
|
||||||
const popupWindow = Toast.getOrCreateInstance(notification);
|
const popupWindow = Toast.getOrCreateInstance(notification);
|
||||||
|
|
||||||
navigator.serviceWorker.register(swUrl).then((registration) => {
|
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) {
|
if (registration.waiting) {
|
||||||
popupWindow.show();
|
popupWindow.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import { baseurl } from '../../_config.yml';
|
importScripts('./assets/js/data/swconf.js');
|
||||||
|
|
||||||
importScripts(`${baseurl}/assets/js/data/swconf.js`);
|
|
||||||
|
|
||||||
const purge = swconf.purge;
|
const purge = swconf.purge;
|
||||||
const interceptor = swconf.interceptor;
|
const interceptor = swconf.interceptor;
|
||||||
|
|
15
package.json
15
package.json
|
@ -31,22 +31,21 @@
|
||||||
"@babel/core": "^7.25.2",
|
"@babel/core": "^7.25.2",
|
||||||
"@babel/plugin-transform-class-properties": "^7.25.4",
|
"@babel/plugin-transform-class-properties": "^7.25.4",
|
||||||
"@babel/preset-env": "^7.25.4",
|
"@babel/preset-env": "^7.25.4",
|
||||||
"@commitlint/cli": "^19.4.0",
|
"@commitlint/cli": "^19.5.0",
|
||||||
"@commitlint/config-conventional": "^19.2.2",
|
"@commitlint/config-conventional": "^19.5.0",
|
||||||
"@rollup/plugin-babel": "^6.0.4",
|
"@rollup/plugin-babel": "^6.0.4",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-terser": "^0.4.4",
|
||||||
"@rollup/plugin-yaml": "^4.1.2",
|
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/exec": "^6.0.3",
|
"@semantic-release/exec": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^9.0.1",
|
||||||
"conventional-changelog-conventionalcommits": "^8.0.0",
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
||||||
"husky": "^9.1.5",
|
"husky": "^9.1.6",
|
||||||
"purgecss": "^6.0.0",
|
"purgecss": "^6.0.0",
|
||||||
"rollup": "^4.21.0",
|
"rollup": "^4.21.3",
|
||||||
"semantic-release": "^24.1.0",
|
"semantic-release": "^24.1.1",
|
||||||
"stylelint": "^16.8.2",
|
"stylelint": "^16.9.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0"
|
"stylelint-config-standard-scss": "^13.1.0"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import babel from '@rollup/plugin-babel';
|
import babel from '@rollup/plugin-babel';
|
||||||
import terser from '@rollup/plugin-terser';
|
import terser from '@rollup/plugin-terser';
|
||||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||||
import yaml from '@rollup/plugin-yaml';
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import pkg from './package.json';
|
import pkg from './package.json';
|
||||||
|
|
||||||
|
@ -43,7 +42,7 @@ function build(filename, { src = SRC_DEFAULT, jekyll = false } = {}) {
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
name: 'Chirpy',
|
name: 'Chirpy',
|
||||||
banner,
|
banner,
|
||||||
sourcemap: !isProd
|
sourcemap: !isProd && !jekyll
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
include: `${src}/**`
|
include: `${src}/**`
|
||||||
|
@ -55,7 +54,6 @@ function build(filename, { src = SRC_DEFAULT, jekyll = false } = {}) {
|
||||||
plugins: ['@babel/plugin-transform-class-properties']
|
plugins: ['@babel/plugin-transform-class-properties']
|
||||||
}),
|
}),
|
||||||
nodeResolve(),
|
nodeResolve(),
|
||||||
yaml(),
|
|
||||||
isProd && terser(),
|
isProd && terser(),
|
||||||
jekyll && insertFrontmatter()
|
jekyll && insertFrontmatter()
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue