From afdd0674f2c6697eae1ef908034dd780334c80f9 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Fri, 17 Jul 2026 19:18:36 +0200 Subject: [PATCH 1/2] feat: adopt the purged-by-default styles pipeline (hinode v3.6.0) Bump hinode v3.0.0 -> v3.6.0 (S1-S3 styles pipeline) and align the starter: - Replace config/postcss.config.js with the current hinode baseline (purge-first order purgecss -> autoprefixer -> cssnano default; drop cssnano-preset-advanced). - Pin Bootstrap 5.3.8's browserslist in package.json for autoprefixer. - Drop the now-redundant explicit style.purge = true (v3.6.0 defaults it on). - Stop committing hugo_stats.json and gitignore it (build.buildStats regenerates it). Fresh-site build: green, purged CSS served (main.css 198 KB, autoprefixer prefixes present), no purge/postcss warnings, run-vs-run deterministic. --- .gitignore | 4 +- config/_default/params.toml | 1 - config/postcss.config.js | 48 +++++--- go.mod | 26 ++-- go.sum | 52 ++++---- hugo_stats.json | 228 ------------------------------------ package-lock.json | 80 ------------- package.json | 13 +- 8 files changed, 87 insertions(+), 365 deletions(-) delete mode 100644 hugo_stats.json diff --git a/.gitignore b/.gitignore index 3a1ed7d..b3bc5a0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ resources/ node_modules/ .DS_store -.hugo_build.lock \ No newline at end of file +.hugo_build.lock +# Generated by build.buildStats; regenerated each build, never committed +hugo_stats.json diff --git a/config/_default/params.toml b/config/_default/params.toml index 4189dcf..7085fa8 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -104,7 +104,6 @@ # themeFontPath = "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" # external path themeFontPath = "/fonts" # local path fontSizeBase = "1rem" - purge = true [schema] type = "Organization" diff --git a/config/postcss.config.js b/config/postcss.config.js index 80edf4c..48bbe62 100644 --- a/config/postcss.config.js +++ b/config/postcss.config.js @@ -1,11 +1,3 @@ -const autoprefixer = require('autoprefixer')({}) -const cssnano = require('cssnano')({ - preset: ['advanced', { - discardUnused: { - fontFace: false // Preserve all @font-face declarations - } - }] -}) const purgeImport = require('@fullhuman/postcss-purgecss') const purgeCSSPlugin = purgeImport.purgeCSSPlugin || purgeImport.default || purgeImport const purgecss = purgeCSSPlugin({ @@ -17,10 +9,17 @@ const purgecss = purgeCSSPlugin({ dynamicAttributes: ['aria-expanded', 'data-bs-theme', 'data-bs-main-theme', 'data-bs-theme-animate', 'data-transparent', 'role'], fontFace: false, safelist: { + // Every entry below is a class PurgeCSS cannot see in hugo_stats.json because it is + // added by JavaScript at runtime (or by a third-party library). Classes that Hugo DOES + // emit into the markup — and therefore into hugo_stats.json — are intentionally NOT + // listed: purge now always runs against complete, current stats (production + // post-process; dev does not purge), so they survive on their own. In particular the + // former `/^d-(sm|md|lg|xl|xxl)-table-cell$/` entry is gone — render-table.html emits + // the configured breakpoint's class into the markup, so it reaches the stats naturally. standard: [ - // Bootstrap form validation + // Bootstrap form validation — added by JS on submit, never in the source markup 'was-validated', - // Bootstrap dynamic states + // Bootstrap component state classes toggled by JS (modal/dropdown/collapse/etc.) 'show', 'showing', 'hiding', @@ -28,7 +27,7 @@ const purgecss = purgeCSSPlugin({ 'disabled', 'collapsed', 'collapsing', - // SimpleDatatables modifier classes + // SimpleDatatables modifier classes (set by the datatables JS) 'no-header', 'no-footer', // SimpleDatatables table rendering classes (added by JS) @@ -38,6 +37,15 @@ const purgecss = purgeCSSPlugin({ 'both', 'desc', 'asc', + // Hinode wrapped tables: on a DATA table, `table-wrap` / `table-border-bottom-wrap` + // are applied in the browser by SimpleDatatables' tableRender hook, so on a site whose + // only wrapped tables are data tables they never reach hugo_stats.json and would + // otherwise be purged. + 'table-wrap', + 'table-border-bottom-wrap', + // `d-none` is also applied by that hook; kept to record the wrap's dependency on it + // (a dozen core layouts emit it too, so in practice it is always in the stats). + 'd-none', // SimpleDatatables search component 'search-data-table', 'search-input', @@ -103,8 +111,9 @@ const purgecss = purgeCSSPlugin({ // Bootstrap responsive tables /table-responsive/, // All table-responsive-* variants and attribute selectors - // Color mode toggle - d-none-main-* classes plus [data-bs-main-theme="dark"] compound selectors - /d-none-main/, + // Color mode toggle - d-none-* and d-none-inline-* (logo modes, navbar mode switcher, + // [data-bs-main-theme="dark"] compound selectors) + /^d-none-/, // Bootstrap transitions and utilities that get added via JS /fade/, @@ -112,11 +121,20 @@ const purgecss = purgeCSSPlugin({ ] } }) +const autoprefixer = require('autoprefixer')({}) +const cssnano = require('cssnano')({ + // Default preset: structural minification (rule/declaration merging) that Hugo's own + // minify does not do. The `advanced` preset was measured to add < 0.2% over `default`, + // so it — and the cssnano-preset-advanced dependency — was dropped. + preset: 'default' +}) module.exports = { + // Order matters: purge first (drop unused rules) so autoprefixer and cssnano only work + // on what ships; cssnano last so it minifies the already-prefixed output. plugins: [ + purgecss, autoprefixer, - cssnano, - purgecss + cssnano ] } diff --git a/go.mod b/go.mod index 1803664..5be78a7 100644 --- a/go.mod +++ b/go.mod @@ -3,22 +3,22 @@ module github.com/gethinode/template go 1.20 require ( - github.com/FortAwesome/Font-Awesome v0.0.0-20260625220317-70fb2dd154b6 // indirect + github.com/FortAwesome/Font-Awesome v0.0.0-20260715180930-14c65a3747d0 // indirect github.com/airbnb/lottie-web v5.13.0+incompatible // indirect github.com/cloudcannon/bookshop/hugo/v3 v3.18.5 // indirect - github.com/gethinode/hinode/v3 v3.0.0 // indirect - github.com/gethinode/mod-blocks/v2 v2.0.1 // indirect + github.com/gethinode/hinode/v3 v3.6.0 // indirect + github.com/gethinode/mod-blocks/v2 v2.2.4 // indirect github.com/gethinode/mod-bootstrap v1.3.7 // indirect - github.com/gethinode/mod-csp v1.0.11 // indirect - github.com/gethinode/mod-flexsearch/v5 v5.0.0 // indirect - github.com/gethinode/mod-fontawesome/v6 v6.0.0 // indirect - github.com/gethinode/mod-google-analytics/v2 v2.0.3 // indirect - github.com/gethinode/mod-katex v1.1.5 // indirect - github.com/gethinode/mod-leaflet/v3 v3.0.0 // indirect - github.com/gethinode/mod-lottie/v3 v3.0.0 // indirect - github.com/gethinode/mod-mermaid/v5 v5.0.0 // indirect - github.com/gethinode/mod-simple-datatables/v4 v4.0.0 // indirect - github.com/gethinode/mod-utils/v6 v6.3.0 // indirect + github.com/gethinode/mod-csp v1.0.12 // indirect + github.com/gethinode/mod-flexsearch/v5 v5.1.0 // indirect + github.com/gethinode/mod-fontawesome/v6 v6.1.1 // indirect + github.com/gethinode/mod-google-analytics/v2 v2.0.4 // indirect + github.com/gethinode/mod-katex v1.1.6 // indirect + github.com/gethinode/mod-leaflet/v3 v3.1.2 // indirect + github.com/gethinode/mod-lottie/v3 v3.0.3 // indirect + github.com/gethinode/mod-mermaid/v5 v5.0.3 // indirect + github.com/gethinode/mod-simple-datatables/v4 v4.1.0 // indirect + github.com/gethinode/mod-utils/v6 v6.6.2 // 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 65c9dc0..f0003c8 100644 --- a/go.sum +++ b/go.sum @@ -1,35 +1,35 @@ -github.com/FortAwesome/Font-Awesome v0.0.0-20260625220317-70fb2dd154b6 h1:slcJCZg0UQMHqw5JCoVmE8/IJfoNUprTmP2T3lDG9VY= -github.com/FortAwesome/Font-Awesome v0.0.0-20260625220317-70fb2dd154b6/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20260715180930-14c65a3747d0 h1:4+bB2ojsMTsQroHtQr1FWy2gxFzpBn5hISldeRfxF+o= +github.com/FortAwesome/Font-Awesome v0.0.0-20260715180930-14c65a3747d0/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/airbnb/lottie-web v5.13.0+incompatible h1:plBV5Uq/F1kK0EC61Hr0cBGReI9OgUfd/pp0baoDX8o= github.com/airbnb/lottie-web v5.13.0+incompatible/go.mod h1:nTss557UK9FGnp8QYlCMO29tjUHwbdAHG/DprbGfHGE= github.com/cloudcannon/bookshop/hugo/v3 v3.18.5 h1:AKWzUQpWcBSbJgHQ/5cfPQtGX40bn8vbHBGk4rlHEGE= github.com/cloudcannon/bookshop/hugo/v3 v3.18.5/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8= -github.com/gethinode/hinode/v3 v3.0.0 h1:1ksEZYvTpD27XODFPUbIQ9UfjcD4tiJRt44OME0P6u8= -github.com/gethinode/hinode/v3 v3.0.0/go.mod h1:WuAa/ga+jArmSJ97j2Qi4L47y899smP76oQhGy9AZ/I= -github.com/gethinode/mod-blocks/v2 v2.0.1 h1:BoHDy2PqZfSQ5kolAjnem2gWOarxVCRzaJZ6owM0oCs= -github.com/gethinode/mod-blocks/v2 v2.0.1/go.mod h1:yhZH/AHvPlr1IkYu9GRmhvsLBlyvwpO0T8DvnKUITDw= +github.com/gethinode/hinode/v3 v3.6.0 h1:Y8x4MEArJuze6og+3I/ne74AMqNDj/il5KNuv+rTclA= +github.com/gethinode/hinode/v3 v3.6.0/go.mod h1:YK0S5jwc71tlVACTxqgAh1VCxn7JEKtDuP3AC6q6Hj0= +github.com/gethinode/mod-blocks/v2 v2.2.4 h1:3Kdbu17EfNyIcYy/6Lg/pVS3tKbcRPacenLG0KYbkZY= +github.com/gethinode/mod-blocks/v2 v2.2.4/go.mod h1:1a4A2RrNSEoqgUjJoNPc2T+JtfPe0GvjHNrxjXauWCA= github.com/gethinode/mod-bootstrap v1.3.7 h1:rbjOg//q7dbsM+TkDQLsyk9LKv93D1RUjtcSkvV55UU= github.com/gethinode/mod-bootstrap v1.3.7/go.mod h1:CxrYCFzKtBMz3YWG5i/d5jHKCgvUo60NFcCmz2mxCjQ= -github.com/gethinode/mod-csp v1.0.11 h1:kQKQWF0UL/RT8m5t+VBbTGyo2vTWmCwVXKrHDuCwCU4= -github.com/gethinode/mod-csp v1.0.11/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg= -github.com/gethinode/mod-flexsearch/v5 v5.0.0 h1:JsrsKejSRxirUyfCZheLFkQVAJKdtRDr/d0lRKjrLYw= -github.com/gethinode/mod-flexsearch/v5 v5.0.0/go.mod h1:FGj0l97PX7OnDjvFtdFrq3g3BJPeal7FiSgrtd6Yxdo= -github.com/gethinode/mod-fontawesome/v6 v6.0.0 h1:PrfiMfVEAM5Lpnkp+sXOtOdRSOe3l56z+ngrPcACzlA= -github.com/gethinode/mod-fontawesome/v6 v6.0.0/go.mod h1:ayMslv2xpC5cjxUVTkIlFBbOd1LM5ezIr0OSOr6q8Gk= -github.com/gethinode/mod-google-analytics/v2 v2.0.3 h1:G2uwsOmgpjNA0Zcftvzlz++qXCFb5DMn5e54H3GZnUA= -github.com/gethinode/mod-google-analytics/v2 v2.0.3/go.mod h1:y4ZlacA8FSXjmvn9P8cZshOrBB5Wc+3p0DKSehkk+8E= -github.com/gethinode/mod-katex v1.1.5 h1:Fp0BGdf3m9xWOQHx1hILi78gpNHRwdTpruQpLHpTCFw= -github.com/gethinode/mod-katex v1.1.5/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= -github.com/gethinode/mod-leaflet/v3 v3.0.0 h1:rNjdruvS08bxqsLFEWNt9aU2KCbHiRlEKpKIutqWVOw= -github.com/gethinode/mod-leaflet/v3 v3.0.0/go.mod h1:FsoyVRb3DRZBb2jWPV4yJNqbmOKmCwaJgom2hbWZXnA= -github.com/gethinode/mod-lottie/v3 v3.0.0 h1:gTSuMNmaN72YWeeGYkIVukZDmJnu2ROF+yYQmTN4Rk4= -github.com/gethinode/mod-lottie/v3 v3.0.0/go.mod h1:t1aH0lLklNCchd398reXJtI0kAHkf3SXjo3tqi355wg= -github.com/gethinode/mod-mermaid/v5 v5.0.0 h1:ZKVZ5a4znJdBvzHmQdZv9dGcI3TNUdA1szB6GleBqxs= -github.com/gethinode/mod-mermaid/v5 v5.0.0/go.mod h1:UzpYEHz1txw9sDI+l7EZexHccOdPnvwP1PInT9JKdoo= -github.com/gethinode/mod-simple-datatables/v4 v4.0.0 h1:Qv+i8Oz2slrAjKlngnIal02wMrSQVDh4r5fh8dkDXa8= -github.com/gethinode/mod-simple-datatables/v4 v4.0.0/go.mod h1:s/g95xKr/GUqJ90EXydgXS8YpyBxH6URj9HyMIq0VVk= -github.com/gethinode/mod-utils/v6 v6.3.0 h1:tFF7wp58vRzM3iAjV8znNZfURSc7HAVRu45vKLV/VXY= -github.com/gethinode/mod-utils/v6 v6.3.0/go.mod h1:E5tO9w3VKaidJpu1nI8zAKmh0bddFHOIIQnudAaXQTs= +github.com/gethinode/mod-csp v1.0.12 h1:6CaIH3IBn92lcwMFdYPmmWsPKq+VZ6n9Po8FI26jLJc= +github.com/gethinode/mod-csp v1.0.12/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg= +github.com/gethinode/mod-flexsearch/v5 v5.1.0 h1:sNi3UJkRupYRzPIdG7oAkHZ+bm/rMuBfjNBHECBsyWg= +github.com/gethinode/mod-flexsearch/v5 v5.1.0/go.mod h1:zNdWGmjNg+WtEZbmqzPZm/W5gb0bl43qrm0wKp09V6M= +github.com/gethinode/mod-fontawesome/v6 v6.1.1 h1:k5Jy7nA+YfLZ9YqXH8hyaiw9wjAeOxNEUcnu6fynnJo= +github.com/gethinode/mod-fontawesome/v6 v6.1.1/go.mod h1:875OBk5te+KBJmr0PdSkFcduYnsKCuHWfcaqChh9NGo= +github.com/gethinode/mod-google-analytics/v2 v2.0.4 h1:ONEUjhfVR6p+Y/XyU3BUGXZy4+HAkJvGo+mr24ugklY= +github.com/gethinode/mod-google-analytics/v2 v2.0.4/go.mod h1:y4ZlacA8FSXjmvn9P8cZshOrBB5Wc+3p0DKSehkk+8E= +github.com/gethinode/mod-katex v1.1.6 h1:mow61stEySb5mH5tUp1l69l2FrLWl+jh46JVT5lMOSA= +github.com/gethinode/mod-katex v1.1.6/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= +github.com/gethinode/mod-leaflet/v3 v3.1.2 h1:mnZGSTy7Xo99y459lZ6ogQxdellX2Sigy3JdLqLQpeE= +github.com/gethinode/mod-leaflet/v3 v3.1.2/go.mod h1:eiNhr24pY4+MrMCuJF2MAa+c5mPrD90UM4GZxJproic= +github.com/gethinode/mod-lottie/v3 v3.0.3 h1:45JsMsCiTfdFIUzqA0TAJngV0jCMrAKt6nusgBTcjXU= +github.com/gethinode/mod-lottie/v3 v3.0.3/go.mod h1:xLcfuqo+fqpUdQSyRL0gUnkcZxoEXmH6pFt6lJl03qY= +github.com/gethinode/mod-mermaid/v5 v5.0.3 h1:AXcTZHJnvO34bRA8oelegPogNLSIDDwFc3U9p7B8LJU= +github.com/gethinode/mod-mermaid/v5 v5.0.3/go.mod h1:rrCnPe+gLH83GpMm5uA/SeapZcNBj65jcJVLyXtsXPU= +github.com/gethinode/mod-simple-datatables/v4 v4.1.0 h1:AtEtLH9RoAEIpElg0k6UkVlHmiBc4Df3NCCUfBtmktU= +github.com/gethinode/mod-simple-datatables/v4 v4.1.0/go.mod h1:jRHoX20bUiaVg7UtKzMjfHQjd5M6WZ8hAeVqA3TKwTA= +github.com/gethinode/mod-utils/v6 v6.6.2 h1:hSk1SR1MLkgZMh6cdZWwwUpGxf2vt0HQFVcbc0QQjdw= +github.com/gethinode/mod-utils/v6 v6.6.2/go.mod h1:E5tO9w3VKaidJpu1nI8zAKmh0bddFHOIIQnudAaXQTs= github.com/nextapps-de/flexsearch v0.0.0-20260529083235-f7ed963096a0 h1:QDKcU3q39lFGzdVwM6kgCGnW3ibbMfYIi0Rwl62iJpo= github.com/nextapps-de/flexsearch v0.0.0-20260529083235-f7ed963096a0/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU= github.com/twbs/bootstrap v5.3.8+incompatible h1:eK1fsXP7R/FWFt+sSNmmvUH9usPocf240nWVw7Dh02o= diff --git a/hugo_stats.json b/hugo_stats.json deleted file mode 100644 index 8905605..0000000 --- a/hugo_stats.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "htmlElements": { - "tags": [ - "a", - "body", - "button", - "dialog", - "div", - "footer", - "form", - "head", - "html", - "img", - "input", - "label", - "li", - "link", - "main", - "meta", - "nav", - "ol", - "p", - "path", - "script", - "section", - "small", - "span", - "strong", - "svg", - "symbol", - "table", - "tbody", - "title", - "ul", - "use" - ], - "classes": [ - "active", - "align-items-center", - "align-self-center", - "align-self-end", - "ball", - "bg-body", - "bg-opacity-10", - "bg-primary", - "bg-primary-subtle", - "bottom-0", - "bottom-bar", - "breadcrumb", - "breadcrumb-item", - "btn", - "btn-close", - "btn-primary", - "checkbox", - "col", - "col-12", - "col-6", - "col-8", - "col-lg-2", - "col-lg-8", - "col-md-3", - "col-md-6", - "col-md-8", - "col-md-9", - "col-sm-8", - "collapse", - "collapsed", - "container", - "container-fluid", - "container-xxl", - "d-flex", - "d-inline", - "d-lg-block", - "d-md-block", - "d-md-none", - "d-none", - "d-sm-block", - "d-sm-none", - "display-1", - "display-4", - "emphasis", - "end-0", - "fa-10x", - "fa-2x", - "fa-angle-left", - "fa-chevron-right", - "fa-ellipsis", - "fa-fw", - "fa-github", - "fa-link-slash", - "fa-linkedin", - "fa-medium", - "fa-moon", - "fa-sun", - "fa-xl", - "fa-xmark", - "fab", - "fas", - "fixed-top", - "flex-column", - "flex-fill", - "flex-grow-1", - "footer", - "form-control", - "fs-3", - "fw-30", - "fw-bold", - "h-100", - "hero", - "hero-content", - "hero-image", - "hero-image-container", - "hero-title", - "hstack", - "img-fluid", - "invisible", - "is-search", - "justify-content-center", - "justify-content-end", - "justify-content-md-start", - "justify-content-start", - "label", - "lead", - "lightbox", - "lightbox-close", - "lightbox-content", - "link-bg-footer", - "link-secondary", - "m-auto", - "main", - "main-nav-toggler", - "mb-5", - "me-auto", - "me-md-3", - "middle-bar", - "mode-switch", - "ms-auto", - "ms-md-3", - "mt-3", - "mt-4", - "mt-5", - "mt-md-0", - "mx-auto", - "my-auto", - "my-md-auto", - "nav-item", - "nav-link", - "navbar", - "navbar-brand", - "navbar-collapse", - "navbar-container", - "navbar-expand-md", - "navbar-fixed", - "navbar-fixed-top", - "navbar-fs-6", - "navbar-md-fs", - "navbar-mode-selector", - "navbar-nav", - "navbar-nav-scroll", - "navbar-toggler", - "no-js", - "order-0", - "order-1", - "order-md-0", - "order-md-1", - "p-0", - "p-2", - "p-3", - "position-fixed", - "position-relative", - "ps-1", - "pt-1", - "pt-4", - "pt-md-0", - "px-4", - "px-xxl-0", - "py-3", - "py-4", - "rounded", - "row", - "row-cols-1", - "row-cols-2", - "row-cols-lg-3", - "row-cols-md-2", - "search", - "search-input", - "search-suggestions", - "section-cover", - "section-title", - "shadow", - "svg-inline--fa", - "text-body", - "text-center", - "text-decoration-none", - "text-muted", - "text-secondary", - "text-sm-start", - "text-start", - "toast", - "toast-body", - "toast-container", - "toast-header", - "toggler-icon", - "top-bar", - "w-100", - "w-md-auto" - ], - "ids": [ - "container", - "fab-github", - "fab-linkedin", - "fab-medium", - "fas-angle-left", - "fas-chevron-right", - "fas-ellipsis", - "fas-link-slash", - "fas-moon", - "fas-sun", - "fas-xmark", - "navbar-0-collapse", - "navbar-mode", - "navbar-mode-checkbox", - "toast-container", - "toast-copied-code-message", - "welcome-to-hinode" - ] - } -} diff --git a/package-lock.json b/package-lock.json index 9faf48f..ffbbefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@fullhuman/postcss-purgecss": "^8.0.0", "autoprefixer": "^10.4.27", "cssnano": "^7.1.9", - "cssnano-preset-advanced": "^7.0.16", "hugo-extended": "^0.161.1", "postcss-cli": "^11.0.1", "rimraf": "^6.1.3" @@ -1935,27 +1934,6 @@ "postcss": "^8.5.13" } }, - "node_modules/cssnano-preset-advanced": { - "version": "7.0.16", - "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.16.tgz", - "integrity": "sha512-VJHfOZeEavQsFW3BVDXvGNuKDeWy2cyXMelG4/DFYRfQTFAD7fvtOz+tWMoXJNlxoon6X20P3FggUM1eh/YICA==", - "license": "MIT", - "dependencies": { - "autoprefixer": "^10.5.0", - "browserslist": "^4.28.2", - "cssnano-preset-default": "^7.0.16", - "postcss-discard-unused": "^7.0.7", - "postcss-merge-idents": "^7.0.3", - "postcss-reduce-idents": "^7.0.4", - "postcss-zindex": "^7.0.3" - }, - "engines": { - "node": "^18.12.0 || ^20.9.0 || >=22.0" - }, - "peerDependencies": { - "postcss": "^8.5.13" - } - }, "node_modules/cssnano-preset-default": { "version": "7.0.17", "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.17.tgz", @@ -6091,21 +6069,6 @@ "postcss": "^8.5.13" } }, - "node_modules/postcss-discard-unused": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-7.0.7.tgz", - "integrity": "sha512-h6pZqLfX9kcNbyt8zIGUU8B1rFNcucYKJhTtVn2rA6UAWk0rvE9AHhBP4D2m3Fm9+LjA++tKzG71oHlv7/6glQ==", - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^7.1.1" - }, - "engines": { - "node": "^18.12.0 || ^20.9.0 || >=22.0" - }, - "peerDependencies": { - "postcss": "^8.5.13" - } - }, "node_modules/postcss-load-config": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-5.1.0.tgz", @@ -6152,22 +6115,6 @@ "dev": true, "license": "MIT" }, - "node_modules/postcss-merge-idents": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-7.0.3.tgz", - "integrity": "sha512-jZrzf/jDgMRgxJF4NE7j3mHvZ4SNtqKkQR2q13vuXMYXaD+rr4u/qjk7jUw7GC555FHL7NWa8S1JQZcXEtXaTg==", - "license": "MIT", - "dependencies": { - "cssnano-utils": "^5.0.3", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^18.12.0 || ^20.9.0 || >=22.0" - }, - "peerDependencies": { - "postcss": "^8.5.13" - } - }, "node_modules/postcss-merge-longhand": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-7.0.7.tgz", @@ -6418,21 +6365,6 @@ "postcss": "^8.5.13" } }, - "node_modules/postcss-reduce-idents": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-7.0.4.tgz", - "integrity": "sha512-83wW7bk6GVhM78+FV3sQHTwBskagmm9ESVCXrKCRF9owRCeD+eLS1BWkSh3qRRwFNSJSPDEH5CbFtzfVzhNL3A==", - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^18.12.0 || ^20.9.0 || >=22.0" - }, - "peerDependencies": { - "postcss": "^8.5.13" - } - }, "node_modules/postcss-reduce-initial": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-7.0.9.tgz", @@ -6601,18 +6533,6 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "license": "MIT" }, - "node_modules/postcss-zindex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-7.0.3.tgz", - "integrity": "sha512-K7wJskMRzG8Gs48BQTEdrcGSjQ0NBnQLdJSvJghwxbnIRyKcNL8QE0EqS4/DhsRuBTyMJraK6erXLgJ/zwls8Q==", - "license": "MIT", - "engines": { - "node": "^18.12.0 || ^20.9.0 || >=22.0" - }, - "peerDependencies": { - "postcss": "^8.5.13" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", diff --git a/package.json b/package.json index 347e7f9..71bd0c7 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,18 @@ "version": "2.0.0", "description": "Hinode is a production-ready Hugo theme built on Bootstrap 5. Open source, actively maintained, and built for developers.", "main": "index.js", + "browserslist": [ + ">= 0.5%", + "last 2 major versions", + "not dead", + "Chrome >= 60", + "Firefox >= 60", + "Firefox ESR", + "iOS >= 12", + "Safari >= 12", + "not Explorer <= 11", + "not kaios <= 2.5" + ], "scripts": { "prestart": "npm run -s mod:vendor", "start": "hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings", @@ -45,7 +57,6 @@ "@fullhuman/postcss-purgecss": "^8.0.0", "autoprefixer": "^10.4.27", "cssnano": "^7.1.9", - "cssnano-preset-advanced": "^7.0.16", "hugo-extended": "^0.161.1", "postcss-cli": "^11.0.1", "rimraf": "^6.1.3" From cfc5f7279f7f22bebef7e4ea37fc201295f99781 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sat, 18 Jul 2026 07:28:22 +0200 Subject: [PATCH 2/2] fix: bump hinode v3.6.1 + mod-flexsearch v5.1.1 (search index on Hugo < 0.164) The starter deploys with Hugo 0.158/0.161, where mod-flexsearch v5.1.0's templates.Defer search index collides with the theme's resources.PostProcess and leaks a raw __hdeferred token into the navbar search box. mod-flexsearch v5.1.1 version-gates that (eager publish on Hugo < 0.164); hinode v3.6.1 adds the sidebar cycle guard. _vendor is gitignored, so the deploy vendors these from go.mod at build time. Fresh-site build on Hugo 0.161: 0 __hdeferred leaks, search index published, purged CSS served (main.css 198 KB), green. --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 5be78a7..2747542 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,11 @@ require ( github.com/FortAwesome/Font-Awesome v0.0.0-20260715180930-14c65a3747d0 // indirect github.com/airbnb/lottie-web v5.13.0+incompatible // indirect github.com/cloudcannon/bookshop/hugo/v3 v3.18.5 // indirect - github.com/gethinode/hinode/v3 v3.6.0 // indirect + github.com/gethinode/hinode/v3 v3.6.1 // indirect github.com/gethinode/mod-blocks/v2 v2.2.4 // indirect github.com/gethinode/mod-bootstrap v1.3.7 // indirect github.com/gethinode/mod-csp v1.0.12 // indirect - github.com/gethinode/mod-flexsearch/v5 v5.1.0 // indirect + github.com/gethinode/mod-flexsearch/v5 v5.1.1 // indirect github.com/gethinode/mod-fontawesome/v6 v6.1.1 // indirect github.com/gethinode/mod-google-analytics/v2 v2.0.4 // indirect github.com/gethinode/mod-katex v1.1.6 // indirect diff --git a/go.sum b/go.sum index f0003c8..3004084 100644 --- a/go.sum +++ b/go.sum @@ -4,16 +4,16 @@ github.com/airbnb/lottie-web v5.13.0+incompatible h1:plBV5Uq/F1kK0EC61Hr0cBGReI9 github.com/airbnb/lottie-web v5.13.0+incompatible/go.mod h1:nTss557UK9FGnp8QYlCMO29tjUHwbdAHG/DprbGfHGE= github.com/cloudcannon/bookshop/hugo/v3 v3.18.5 h1:AKWzUQpWcBSbJgHQ/5cfPQtGX40bn8vbHBGk4rlHEGE= github.com/cloudcannon/bookshop/hugo/v3 v3.18.5/go.mod h1:s7mIonDhtsLcn10ZKuVXyqd6BDHI8vT1WQhZw8rPfY8= -github.com/gethinode/hinode/v3 v3.6.0 h1:Y8x4MEArJuze6og+3I/ne74AMqNDj/il5KNuv+rTclA= -github.com/gethinode/hinode/v3 v3.6.0/go.mod h1:YK0S5jwc71tlVACTxqgAh1VCxn7JEKtDuP3AC6q6Hj0= +github.com/gethinode/hinode/v3 v3.6.1 h1:QKAnY2bJgHTZzJHnvXdtCyfRcbYctLpaWMn/yD8ypzg= +github.com/gethinode/hinode/v3 v3.6.1/go.mod h1:YK0S5jwc71tlVACTxqgAh1VCxn7JEKtDuP3AC6q6Hj0= github.com/gethinode/mod-blocks/v2 v2.2.4 h1:3Kdbu17EfNyIcYy/6Lg/pVS3tKbcRPacenLG0KYbkZY= github.com/gethinode/mod-blocks/v2 v2.2.4/go.mod h1:1a4A2RrNSEoqgUjJoNPc2T+JtfPe0GvjHNrxjXauWCA= github.com/gethinode/mod-bootstrap v1.3.7 h1:rbjOg//q7dbsM+TkDQLsyk9LKv93D1RUjtcSkvV55UU= github.com/gethinode/mod-bootstrap v1.3.7/go.mod h1:CxrYCFzKtBMz3YWG5i/d5jHKCgvUo60NFcCmz2mxCjQ= github.com/gethinode/mod-csp v1.0.12 h1:6CaIH3IBn92lcwMFdYPmmWsPKq+VZ6n9Po8FI26jLJc= github.com/gethinode/mod-csp v1.0.12/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg= -github.com/gethinode/mod-flexsearch/v5 v5.1.0 h1:sNi3UJkRupYRzPIdG7oAkHZ+bm/rMuBfjNBHECBsyWg= -github.com/gethinode/mod-flexsearch/v5 v5.1.0/go.mod h1:zNdWGmjNg+WtEZbmqzPZm/W5gb0bl43qrm0wKp09V6M= +github.com/gethinode/mod-flexsearch/v5 v5.1.1 h1:x1dnOMV1fLBzpWqPQYPnn8zDXN0bcdD16qAcIzsWD/s= +github.com/gethinode/mod-flexsearch/v5 v5.1.1/go.mod h1:bo51LbCcYROomghgAWpH3w6EYSe8ZtdqrPSB6C/DZaA= github.com/gethinode/mod-fontawesome/v6 v6.1.1 h1:k5Jy7nA+YfLZ9YqXH8hyaiw9wjAeOxNEUcnu6fynnJo= github.com/gethinode/mod-fontawesome/v6 v6.1.1/go.mod h1:875OBk5te+KBJmr0PdSkFcduYnsKCuHWfcaqChh9NGo= github.com/gethinode/mod-google-analytics/v2 v2.0.4 h1:ONEUjhfVR6p+Y/XyU3BUGXZy4+HAkJvGo+mr24ugklY=