Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ resources/
node_modules/

.DS_store
.hugo_build.lock
.hugo_build.lock
# Generated by build.buildStats; regenerated each build, never committed
hugo_stats.json
1 change: 0 additions & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
48 changes: 33 additions & 15 deletions config/postcss.config.js
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -17,18 +9,25 @@ 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',
'active',
'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)
Expand All @@ -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',
Expand Down Expand Up @@ -103,20 +111,30 @@ 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/,
/^translate/ // Bootstrap utilities
]
}
})
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
]
}
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.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.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.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
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
)
52 changes: 26 additions & 26 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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.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.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.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=
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=
Expand Down
Loading