diff --git a/config/postcss.config.js b/config/postcss.config.js index 878d3869..88fc7e4e 100644 --- a/config/postcss.config.js +++ b/config/postcss.config.js @@ -64,7 +64,14 @@ const purgecss = purgeCSSPlugin({ 'search-input', // Bootstrap utilities used by SimpleDatatables 'float-right', - 'float-left' + 'float-left', + // mod-simple-datatables hides the search input's label, which would otherwise repeat + // the input's own placeholder, by passing a `visually-hidden` span as the label text. + // That class therefore only ever appears inside the module's JavaScript, never in a + // layout, so hugo_stats.json cannot record it. Core layouts happen to emit it too, but + // only on pages that render a button, spinner or carousel - a site with none of those + // would purge the class and put the duplicated label back on screen. + 'visually-hidden' ], // Classes with these patterns will be preserved along with their children deep: [ diff --git a/go.mod b/go.mod index f43e821d..b5333592 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/gethinode/mod-leaflet/v3 v3.1.3 // indirect github.com/gethinode/mod-lottie/v3 v3.0.4 // indirect github.com/gethinode/mod-mermaid/v5 v5.0.4 // indirect - github.com/gethinode/mod-simple-datatables/v4 v4.2.0 // indirect + github.com/gethinode/mod-simple-datatables/v4 v4.2.1 // indirect github.com/gethinode/mod-utils/v6 v6.11.0 // indirect github.com/nextapps-de/flexsearch v0.0.0-20260529083235-f7ed963096a0 // indirect github.com/twbs/bootstrap v5.3.8+incompatible // indirect diff --git a/go.sum b/go.sum index ba0a77ca..1b43b435 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,8 @@ github.com/gethinode/mod-simple-datatables/v4 v4.1.1 h1:Bidf8FA9SxBBb163D0yteTya github.com/gethinode/mod-simple-datatables/v4 v4.1.1/go.mod h1:irmXKx2jeppfpGRsCC91vN8dA4U2nQfy2eW8bajUeJo= github.com/gethinode/mod-simple-datatables/v4 v4.2.0 h1:n1GyPqVQ6o44awWIAiAwg/xZ6LYYQZuTQk6CuagboeI= github.com/gethinode/mod-simple-datatables/v4 v4.2.0/go.mod h1:bIYh9MBNdBe5vzSfmymqVzdVh+RSA7yPbMfnIayg8eo= +github.com/gethinode/mod-simple-datatables/v4 v4.2.1 h1:Se1TIpqzOGcQVLZ2K8Ud7GuoEuVj/gk1zRqZ0jOR0UA= +github.com/gethinode/mod-simple-datatables/v4 v4.2.1/go.mod h1:X9j8YEPhKWhcPCdylQHwfNkAqLH8L9878XcHQLyGEc8= github.com/gethinode/mod-utils/v6 v6.7.0 h1:DxqKUb13/6ydcntGIrUj1YD892VwarB8zGj+77CeUwM= github.com/gethinode/mod-utils/v6 v6.7.0/go.mod h1:E5tO9w3VKaidJpu1nI8zAKmh0bddFHOIIQnudAaXQTs= github.com/gethinode/mod-utils/v6 v6.8.0 h1:Rz/6DlPKVW0791jSsobxx4I4pKQ38H4JOEeOV+GeRzU= diff --git a/package.json b/package.json index fe58cdaa..69a53ebe 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "mod:vendor": "node scripts/mod-vendor.cjs", "mod:vendor:force": "rimraf _vendor && hugo mod vendor", "test": "npm-run-all lint test:templates", + "pretest:templates": "pnpm mod:vendor", "test:templates": "hugo -s tests/templates --logLevel error", "env": "hugo env", "precheck": "npm version",