From b41ef4d01bb90fd5149bf9a1c7e9ac6bc93d26e4 Mon Sep 17 00:00:00 2001 From: Oliver Salzburg Date: Thu, 30 Jul 2026 11:44:42 +0200 Subject: [PATCH] Update docsy theme This should resolve warnings during the build, related to deprecations in Hugo. I aligned some of the npm scripts with the docsy-example project, to make everything work fluently. Signed-off-by: Oliver Salzburg --- .gitignore | 1 + go.mod | 2 +- go.sum | 10 ++-------- hugo.yaml | 8 ++++---- package.json | 19 +++++++++++++++---- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index fc73afa..4433b04 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ resources/ node_modules/ package-lock.json .hugo_build.lock +packages/hugoautogen/ .DS_Store /_vendor/ diff --git a/go.mod b/go.mod index 77fc755..02a1390 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/google/docsy-example go 1.25 -require github.com/google/docsy v0.15.0 +require github.com/google/docsy/theme v0.16.0 // indirect diff --git a/go.sum b/go.sum index 2302028..879c6f0 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,2 @@ -github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3 h1:/iluJkJiyTAdnqrw3Yi9rH2HNHhrrtCmj8VJe7I6o3w= -github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= -github.com/google/docsy v0.14.2 h1:XJud05ZWCUFgvE9G1KdxhGsDdr7OmWYdnWPxrclIPWE= -github.com/google/docsy v0.14.2/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU= -github.com/google/docsy v0.15.0 h1:MNJ1nrE2ZuweXlUNaegTo/UbSKZJu+WMczahfZaxosI= -github.com/google/docsy v0.15.0/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU= -github.com/twbs/bootstrap v5.3.8+incompatible h1:eK1fsXP7R/FWFt+sSNmmvUH9usPocf240nWVw7Dh02o= -github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/google/docsy/theme v0.16.0 h1:9uV9qEhk7UpJ8KYbSpTPQlq6htH+8hYskedgGZVnNsU= +github.com/google/docsy/theme v0.16.0/go.mod h1:NX/JqXCbZBn9Q2Hj7ez9Xeh9z4XcLiwmDYZXhB4RhRM= diff --git a/hugo.yaml b/hugo.yaml index 38be52f..dfdebfe 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -30,13 +30,13 @@ permalinks: imaging: resampleFilter: "CatmullRom" quality: 75 - anchor: "smart" + anchor: "Smart" # Language configuration languages: en: - languageName: "English" + label: "English" # Weight used for sorting. weight: 1 @@ -199,5 +199,5 @@ module: extended: true min: "0.161.1" imports: - path: "github.com/google/docsy" - disable: false + - path: github.com/google/docsy/theme + disable: false diff --git a/package.json b/package.json index a2f537a..c669bca 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ "license": "Apache-2.0", "bugs": "https://github.com/getsops/docs/issues", "spelling": "cSpell:ignore HTMLTEST precheck postbuild -", + "workspaces": [ + "packages/hugoautogen" + ], "scripts": { "_build": "npm run _hugo-dev --", "_check:links": "echo IMPLEMENTATION PENDING for check-links; echo", @@ -25,6 +28,7 @@ "clean": "rm -Rf public/* resources", "local": "npm run _local -- npm run", "make:public": "git init -b main public", + "postinstall": "npm run update:docsy:pack", "precheck:links:all": "npm run build", "precheck:links": "npm run build", "postbuild:preview": "npm run _check:links", @@ -32,14 +36,21 @@ "serve": "npm run _serve", "serveProduction": "npm run _serveProduction", "test": "npm run check:links", - "update:pkg:dep": "npm install --save-dev autoprefixer@latest postcss-cli@latest", - "update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest" + "update:docsy:mod": "hugo mod get -u github.com/google/docsy/theme", + "update:docsy:pack": "hugo mod npm pack && npm install --ignore-scripts", + "update:hugo": "npm install --save-dev --save-exact hugo-extended@latest", + "update:packages": "npm install --save-dev autoprefixer@latest postcss-cli@latest", + "update": "npm run update:packages && npm run update:docsy:mod" }, "devDependencies": { - "autoprefixer": "^10.4.24", + "autoprefixer": "^10.5.4", "cross-env": "^10.1.0", "hugo-extended": "0.164.0", "postcss-cli": "^11.0.1", "rtlcss": "^4.3.0" - } + }, + "engines": { + "node": ">=22" + }, + "private": true }