diff --git a/config/postcss.config.js b/config/postcss.config.js index 86f0142b2..f795f2ee3 100644 --- a/config/postcss.config.js +++ b/config/postcss.config.js @@ -9,7 +9,7 @@ const purgecss = require('@fullhuman/postcss-purgecss')({ const els = JSON.parse(content).htmlElements return [...(els.tags || []), ...(els.classes || []), ...(els.ids || [])] }, - dynamicAttributes: ['data-bs-theme'], + dynamicAttributes: ['data-bs-theme', 'data-bs-theme-animate'], safelist: ['was-validated', ...whitelister([ './assets/scss/components/_clipboard.scss', diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 627d78860..290b443e7 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -158,7 +158,7 @@ # themeFontPath = "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" # external path themeFontPath = "/fonts" # local path themeFontPreload = "/fonts/inter-v12-latin-regular.woff2" - purge = false # TODO: fix purge setting of example site + purge = true # toml-docs-end theme-colors [schema] diff --git a/exampleSite/config/postcss.config.js b/exampleSite/config/postcss.config.js index 18b9d2172..5ed4986a1 100644 --- a/exampleSite/config/postcss.config.js +++ b/exampleSite/config/postcss.config.js @@ -4,30 +4,31 @@ const cssnano = require('cssnano')({ }) const whitelister = require('purgecss-whitelister') const purgecss = require('@fullhuman/postcss-purgecss')({ - content: ['./hugo_stats.json'], + content: ['./exampleSite/hugo_stats.json'], defaultExtractor: (content) => { const els = JSON.parse(content).htmlElements return [...(els.tags || []), ...(els.classes || []), ...(els.ids || [])] }, - dynamicAttributes: ['data-bs-theme'], + dynamicAttributes: ['data-bs-theme', 'data-bs-theme-animate'], safelist: ['was-validated', ...whitelister([ - './_vendor/github.com/gethinode/hinode/assets/scss/components/_clipboard.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_command.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_nav.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_navbar.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_search.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_syntax.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_syntax-dark.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_syntax-light.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_table.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/components/_video.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/theme/fonts.scss', - './_vendor/github.com/gethinode/hinode/assets/scss/theme/theme.scss', - './exampleSite/_vendor/github.com/gethinode/mod-cookieyes/v2/assets/scss/cookieyes.scss', + './assets/scss/components/_clipboard.scss', + './assets/scss/components/_command.scss', + './assets/scss/components/_nav.scss', + './assets/scss/components/_navbar.scss', + './assets/scss/components/_search.scss', + './assets/scss/components/_syntax.scss', + './assets/scss/components/_syntax-dark.scss', + './assets/scss/components/_syntax-light.scss', + './assets/scss/components/_table.scss', + './assets/scss/components/_video.scss', + './assets/scss/theme/fonts.scss', + './assets/scss/theme/theme.scss', + './_vendor/github.com/gethinode/mod-cookieyes/v2/assets/scss/cookieyes.scss', './_vendor/github.com/gethinode/mod-flexsearch/v2/assets/scss/modules/flexsearch/flexsearch.scss', './_vendor/github.com/gethinode/mod-katex/dist/katex.scss', './_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss', + './_vendor/github.com/gethinode/mod-simple-datatables/dist/simple-datatables.scss', './_vendor/github.com/twbs/bootstrap/scss/_carousel.scss', './_vendor/github.com/twbs/bootstrap/scss/_dropdown.scss', './_vendor/github.com/twbs/bootstrap/scss/_modal.scss', diff --git a/package-lock.json b/package-lock.json index 970296048..7161e5658 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@gethinode/hinode", - "version": "0.27.27", + "version": "0.27.28", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gethinode/hinode", - "version": "0.27.27", + "version": "0.27.28", "license": "MIT", "dependencies": { - "@fullhuman/postcss-purgecss": "^7.0.2", + "@fullhuman/postcss-purgecss": "~6.0.0", "autoprefixer": "^10.4.20", "cssnano": "^7.0.6", "cssnano-preset-advanced": "^7.0.6", @@ -405,11 +405,12 @@ } }, "node_modules/@fullhuman/postcss-purgecss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-7.0.2.tgz", - "integrity": "sha512-U4zAXNaVztbDxO9EdcLp51F3UxxYsb/7DN89rFxFJhfk2Wua2pvw2Kf3HdspbPhW/wpHjSjsxWYoIlbTgRSjbQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-6.0.0.tgz", + "integrity": "sha512-sUvk5PV7O5xvTJcxDYrQ00xlKtSxivvJdZrwgxE8F1GmNMs7w9U+dSbr83N/qEs9b+f+6QsZKXDs0k8nMjBIqA==", + "license": "MIT", "dependencies": { - "purgecss": "^7.0.2" + "purgecss": "^6.0.0" }, "peerDependencies": { "postcss": "^8.0.0" @@ -625,6 +626,16 @@ "node": ">=12.4.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@sindresorhus/is": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz", @@ -4744,6 +4755,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -5012,6 +5024,7 @@ "version": "11.0.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "dev": true, "engines": { "node": "20 || >=22" } @@ -6429,6 +6442,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" @@ -7216,14 +7230,15 @@ } }, "node_modules/purgecss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-7.0.2.tgz", - "integrity": "sha512-4Ku8KoxNhOWi9X1XJ73XY5fv+I+hhTRedKpGs/2gaBKU8ijUiIKF/uyyIyh7Wo713bELSICF5/NswjcuOqYouQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-6.0.0.tgz", + "integrity": "sha512-s3EBxg5RSWmpqd0KGzNqPiaBbWDz1/As+2MzoYVGMqgDqRTLBhJW6sywfTBek7OwNfoS/6pS0xdtvChNhFj2cw==", + "license": "MIT", "dependencies": { - "commander": "^12.1.0", - "glob": "^11.0.0", - "postcss": "^8.4.47", - "postcss-selector-parser": "^6.1.2" + "commander": "^12.0.0", + "glob": "^10.3.10", + "postcss": "^8.4.4", + "postcss-selector-parser": "^6.0.7" }, "bin": { "purgecss": "bin/purgecss.js" @@ -7243,6 +7258,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -7251,41 +7267,78 @@ "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/purgecss/node_modules/glob": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", - "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": "20 || >=22" + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/purgecss/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/purgecss/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, "node_modules/purgecss/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": "20 || >=22" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/purgecss/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/package.json b/package.json index 7b404489b..2d3d6871f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gethinode/hinode", - "version": "0.27.27", + "version": "0.27.28", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "keywords": [ "hugo", @@ -69,7 +69,7 @@ }, "homepage": "https://gethinode.com", "dependencies": { - "@fullhuman/postcss-purgecss": "^7.0.2", + "@fullhuman/postcss-purgecss": "~6.0.0", "autoprefixer": "^10.4.20", "cssnano": "^7.0.6", "cssnano-preset-advanced": "^7.0.6",