Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
21cbb0f
Renovate: move config to JSONC, harden GitHub Actions bumps
chalin Sep 24, 2026
98b7580
CONTRIBUTING: one pointer for the family settings; two local facts
chalin Sep 24, 2026
1f66956
CONTRIBUTING: drop the timezone bullet; the config is its home and it…
chalin Sep 24, 2026
e16ff4d
CONTRIBUTING and config: the hugo rule's why lives in Update Hugo; tw…
chalin Sep 24, 2026
dac2636
CONTRIBUTING: the local list holds deltas only
chalin Sep 24, 2026
8b48c71
CONTRIBUTING: drop the min-release-age bullet; the missing floor is a…
chalin Sep 24, 2026
1b98adf
Bring .npmrc and .nvmrc back in step with docsy
chalin Sep 25, 2026
5f837f4
.npmrc: one comment per key, naming the decision it implements
chalin Sep 25, 2026
3e563f9
.npmrc: comments pass; four per-key comments restated their keys
chalin Sep 25, 2026
4804a2b
CONTRIBUTING, netlify.toml: round-3 wording; the cooldown override in…
chalin Sep 25, 2026
95a9b99
.npmrc: keep install scripts on; the allowScripts gate needs one path…
chalin Sep 25, 2026
3ac467f
.npmrc: say why ignore-scripts is absent
chalin Sep 25, 2026
04e98c9
CONTRIBUTING § Update Hugo: Docsy's flow by pointer, this repo's delt…
chalin Sep 25, 2026
a196780
CONTRIBUTING: the Hugo exclusion is Docsy's rule, not a delta; Update…
chalin Sep 25, 2026
70017bc
Drop update:hugo; the bump is the pinned install command
chalin Sep 25, 2026
64ee914
update:hugo: newest aged release by default, --hugo=X.Y.Z to name one
chalin Sep 25, 2026
6f1a525
Drop update:hugo; approve:hugo syncs the tree first; CONTRIBUTING truths
chalin Sep 25, 2026
eeb6719
CONTRIBUTING: say why ignore-scripts stays unset, not just that CI ne…
chalin Sep 25, 2026
6e57835
CONTRIBUTING: Update Hugo leads with the property CI enforces; .npmrc…
chalin Sep 25, 2026
9d93209
CONTRIBUTING § Update Hugo: the key name is Install configuration's; …
chalin Sep 25, 2026
0773ab2
Drop the Renovate timezone; CONTRIBUTING round-5 wording
chalin Sep 25, 2026
ab97a6f
Pin the Renovate schedule to UTC; the Hugo pin's policy and the coold…
chalin Sep 25, 2026
c6d542e
Update Hugo states the approval at its true strength; delta leaks and…
chalin Sep 26, 2026
fdabf08
Update Hugo: the pin's policy first, then the update command, in the …
chalin Sep 26, 2026
1cd5988
Update Hugo: "the pin" was ambiguous (the repo pins more than version…
chalin Sep 26, 2026
9dc0a92
Install configuration: the ignore-scripts exception answers first, th…
chalin Sep 26, 2026
399b5b4
Update Hugo: the cooldown bound is Docsy's to state; two comments tha…
chalin Sep 26, 2026
21a778b
renovate.jsonc: the timezone key states its own effect; its reason be…
chalin Sep 26, 2026
f4e6487
Update Hugo: a Dependabot PR for hugo-extended is closed, not approve…
chalin Sep 26, 2026
7c82f52
Dependency updates: say what Renovate does, not the config value ("of…
chalin Sep 26, 2026
29adc99
Dependency updates: the delta list in one register (cause, consequenc…
chalin Sep 26, 2026
081a371
Update Hugo: the security-PR sentence in the Bootstrap/FA bullet's sh…
chalin Sep 26, 2026
e2965cc
.cspell.yml: single quotes (prettier)
chalin Sep 26, 2026
626129e
renovate.jsonc: the runner-label comment says the rule's effect, not …
chalin Sep 26, 2026
15519b1
Update Hugo: a security fix arrives through Docsy; the enforcement si…
chalin Sep 26, 2026
be74c3c
CONTRIBUTING: four wordings the round-10 reviewers flagged (for the o…
chalin Sep 26, 2026
6cfa65d
Install configuration: name the Netlify build as the path that checks…
chalin Sep 26, 2026
7435038
Install configuration: Docsy's Netlify path is gated by its rebuild s…
chalin Sep 26, 2026
bc216b0
renovate.jsonc: the runner-label comment back to the owner's one-line…
chalin Sep 26, 2026
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
2 changes: 2 additions & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ words:
- github
- gohugoio
- Goldydocs
- gomod
- hugoautogen
- pageinfo
2 changes: 2 additions & 0 deletions .github/workflows/links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
node-version-file: .nvmrc
cache: npm

# Scripts on: the one automated install that evaluates allowScripts
# (CONTRIBUTING.md#install-configuration).
- run: npm ci

- name: Regenerate generated files (drift-check input)
Expand Down
17 changes: 7 additions & 10 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# The npm engines floor (package.json) is the version where the allowScripts
# policy landed; on older npm the key is silently ignored, an unprotected
# install that looks protected. engine-strict turns that floor into a hard
# install-time failure.
engine-strict=true
# npm supply-chain controls. Shared rationale:
# https://opentelemetry.io/site/design/supply-chain-security/

min-release-age=7
strict-allow-scripts=true
engine-strict=true
# No ignore-scripts setting here: see CONTRIBUTING.md#install-configuration.

# One script interpreter on every platform: without this, Windows npm hands
# scripts to cmd.exe, whose quoting rules silently diverge from sh (the
# single-quoted glob in test:site would no-match instead of erroring). Covers
# workspace runs too: npm resolves config at the workspace root. Git Bash
# ships with Git for Windows.
# Windows npm defaults to cmd.exe, whose quoting silently diverges from sh.
script-shell=bash
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
24.20.0
97 changes: 61 additions & 36 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,18 @@ repo's [main ruleset][] mirrors Docsy's).

### Dependency updates

Renovate opens version-update PRs, created on Sundays, configured in
`renovate.json5`. Settings rationale:

- `ignorePresets`: the preset's 3-day npm cooldown would override this repo's
7-day `minimumReleaseAge`. Caution: this exclusion silently stops working if
the preset is renamed upstream.
- `lockFileMaintenance` off: wholesale lock re-resolves would churn the
committed lockfile; transitive security fixes arrive alert-driven instead.
- `gomod` off: the Docsy theme pin is updated manually; see
[Upgrade Docsy](#upgrade-docsy). All other detected managers are active.
- Package rules:
- Patch and minor updates are each grouped into a single PR per wave, to cut
review overhead. Majors stay individual, except families that Renovate's
presets keep in lockstep (for example, the GitHub artifact actions).
- `hugo-extended` is version-pinned and coupled to its `allowScripts` approval
(see [Update Hugo](#update-hugo)).
- Bootstrap and Font Awesome updates route through the theme
(`packages/hugoautogen` is regenerated from the theme, reverting any direct
bump). A Dependabot security PR may still bump these directly: close it and
route the fix through a theme update.

Renovate's vulnerability-alert PRs stay on (immediate, cooldown-exempt), beside
GitHub's Dependabot security updates; a rare duplicate PR is accepted.
For the Renovate settings shared with Docsy and their rationale, the action-pin
requirements, and the action-bump merge checks, see Docsy's [Dependency
updates][]. What differs here:

- The `gomod` manager is disabled; Docsy is [updated manually](#upgrade-docsy).
- `hugo-extended` tracks Docsy's version rather than the latest release; see
[Update Hugo](#update-hugo).
- `packages/hugoautogen` is regenerated from the theme, reverting any direct
Bootstrap or Font Awesome bump. If a security PR bumps them directly, route
the fix through a [Docsy update](#upgrade-docsy).
- No audit test guards the action-pin comments here; the PR reviewer checks
them.

### Deploy logs

Expand All @@ -48,12 +37,33 @@ exactly what they pin.
Both files are regenerated by `npm run update:docsy:pack`, which, unlike
`install:safe`, needs `go` at run time (`hugo mod`); it also normalizes the
generated package's name, otherwise derived from the checkout-directory name.
The Docsy-update scripts run it as their post phase, and CI reruns it to catch
drift. If a theme update changes either file, commit the result. Installs
themselves declare no lifecycle hooks (guarded by `tests/npm-scripts.test.mjs`),
so neither install mode runs root-package code; `install:safe` remains the
lock-exact, script-free path, while a plain `npm install` resolves and may
rewrite the lock.
The Docsy-update scripts and `approve:hugo` run it as their post phase, and CI
reruns it to catch drift. If a theme update changes either file, commit the
result. The manifests declare no lifecycle hooks (guarded by
`tests/npm-scripts.test.mjs`), so installs run no root-package code. A plain
`npm install` resolves and may rewrite the lock.

### Install configuration

`.npmrc` follows Docsy's, with two exceptions:

- No `@docsy:registry` pin: this repo publishes no packages.
- No `ignore-scripts=true`: the `allowScripts` check in
[Update Hugo](#update-hugo) runs only on an install that runs scripts, and
this repo needs one to exist.
- Here, CI's `npm ci` is that install, and so is a plain `npm install` unless
a user-level `ignore-scripts` is set; either runs hugo-extended's installer.
`npm run install:safe` runs no scripts, so unlike in Docsy's flow it never
fails on a missing approval.
- Docsy can set the key because its `install:safe` re-enables scripts for
hugo-extended alone, in a rebuild step ([officially supported version][]),
so its CI still evaluates the allowlist; this repo's `install:safe` has no
such step.
- With the key set, a lock-synced hugo-extended bump with no approval would
arrive with a green `check-links`.
- The Netlify build is script-free (`install:safe`) and then runs `hugo`,
whose wrapper self-installs the pinned binary: that path checks no approval
here (Docsy's does, through its rebuild step).

### Upgrade Docsy

Expand All @@ -71,12 +81,25 @@ npm run update:docsy:main

### Update Hugo

To update Hugo, run `npm run update:hugo`, review the new [hugo-extended][]
release, then run `npm run approve:hugo`: script-enabled installs fail until the
new version is approved. The approval gates the install script only (the hugo
binary self-installs at first use), so don't run builds between the two steps.
Automated update PRs skip hugo-extended version bumps for the same reason,
except security updates, which fail CI until approved via `approve:hugo`.
hugo-extended's installer downloads and executes a binary. Every pinned version
has a maintainer approval on record (`allowScripts`), and CI flags a bump
without one: `npm ci` fails ([Install configuration](#install-configuration)
names the installs that run scripts). The approval covers the install script
only; the binary self-installs at first use regardless. The two-step flow that
keeps the approval current is [Docsy's][officially supported version]. What
differs here:

- The version tracks Docsy's [officially supported version][]. If a security PR
bumps it, take the fix through Docsy instead: once Docsy pins a version
carrying it, update to that version with the command below, then approve.
- Update using
`npm install --save-dev --save-exact --ignore-scripts hugo-extended@X.Y.Z`;
this repo has no `update:hugo` script. For a release younger than the npm
cooldown, add Docsy's [`NPM_CONFIG_MIN_RELEASE_AGE`
override][Dependency updates] to that command.
- `npm run approve:hugo` has no audit to re-run and no rebuild step; instead its
tail regenerates the manifest ([Lockfile and generated manifest][]), and the
`hugo` call in that step self-installs the just-approved binary.

### Develop against a local Docsy

Expand All @@ -94,12 +117,14 @@ watches it, so theme edits hot-reload.
<!-- prettier-ignore-start -->
[alternate dashboard]: https://app.netlify.com/sites/goldydocs/deploys
[contribution guidelines]: https://main--docsydocs.netlify.app/docs/contributing/
[Dependency updates]: https://main--docsydocs.netlify.app/project/about/maintainer-notes/#dependency-updates
[deploys]: https://app.netlify.com/sites/docsy-example/deploys
[Docsy]: https://github.com/docsy/docsy
[hugo-extended]: https://www.npmjs.com/package/hugo-extended
[Hugo workspace]: https://gohugo.io/configuration/module/#top-level-settings
[Lockfile and generated manifest]: #lockfile-and-generated-manifest
[main ruleset]: https://github.com/docsy/docsy-example/rules/23697395
[Merge requirements]: https://main--docsydocs.netlify.app/project/about/maintainer-notes/#merge-requirements
[officially supported version]: https://main--docsydocs.netlify.app/project/about/maintainer-notes/#official-hugo-version
[workflow security analysis]: https://main--docsydocs.netlify.app/project/about/maintainer-notes/#workflow-security-analysis
<!-- prettier-ignore-end -->

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"_netlify:prepare": "npm run -s _is:clean && npm run install:safe && npm run -s _is:clean",
"_serve": "npm run _hugo-dev -- --minify serve --renderToMemory",
"_update:docsy:post": "hugo mod tidy && npm run update:docsy:pack",
"approve:hugo": "npm approve-scripts hugo-extended && npm run update:docsy:pack",
"approve:hugo": "npm run install:safe && npm approve-scripts --allow-scripts-pin hugo-extended && npm run update:docsy:pack",
"build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"",
"build:production": "npm run _hugo -- --minify",
"build": "npm run _build -- ",
Expand All @@ -49,7 +49,6 @@
"update:docsy:main": "hugo mod get -u github.com/google/docsy/theme@main && npm run _update:docsy:post",
"update:docsy:mod": "hugo mod get -u github.com/google/docsy/theme && npm run _update:docsy:post",
"update:docsy:pack": "hugo mod npm pack && npm pkg set 'name=\"@docsy/hugoautogen\"' private=true --json --prefix packages/hugoautogen && npm install --ignore-scripts",
"update:hugo": "npm install --save-dev --save-exact --ignore-scripts hugo-extended@latest",
"update:main": "npm run update:packages && npm run update:docsy:main",
"update:packages": "npm-check-updates -u -x hugo-extended",
"update": "npm run update:packages && npm run update:docsy:mod"
Expand Down
33 changes: 0 additions & 33 deletions renovate.json5

This file was deleted.

41 changes: 41 additions & 0 deletions renovate.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:best-practices"],
// For details about this repo's settings, see
// CONTRIBUTING.md#dependency-updates
"ignorePresets": ["security:minimumReleaseAgeNpm"],
"lockFileMaintenance": { "enabled": false },
"schedule": ["* * * * 0"],
"timezone": "UTC",
"labels": ["dependencies"],
"gomod": { "enabled": false },
"minimumReleaseAge": "7 days",
"packageRules": [
{
"groupName": "all patch versions",
"matchUpdateTypes": ["patch"],
"matchManagers": ["!github-actions"],
},
{
"groupName": "all minor versions",
"matchUpdateTypes": ["minor"],
"matchManagers": ["!github-actions"],
},
{
"matchManagers": ["github-actions"],
// Not "runs-on" labels: they have no releases to look up.
"matchDepTypes": ["action", "workflow"],
"overrideDatasource": "github-releases",
"branchTopic": "{{{depNameSanitized}}}-{{{newDigest}}}",
},
{
"matchPackageNames": ["hugo-extended"],
"enabled": false,
},
{
"matchPackageNames": ["bootstrap", "@fortawesome/fontawesome-free"],
"enabled": false,
},
],
// cSpell:ignore datasource hugo fortawesome fontawesome
}
Loading