con un clic
hugo-chores
// Maintenance tasks for the memmachine.github.io Hugo site: upgrade Hugo version in CI/CD, verify the build, update npm dependencies, update vendored theme libraries. Use when the user wants to perform site maintenance.
// Maintenance tasks for the memmachine.github.io Hugo site: upgrade Hugo version in CI/CD, verify the build, update npm dependencies, update vendored theme libraries. Use when the user wants to perform site maintenance.
| name | hugo-chores |
| description | Maintenance tasks for the memmachine.github.io Hugo site: upgrade Hugo version in CI/CD, verify the build, update npm dependencies, update vendored theme libraries. Use when the user wants to perform site maintenance. |
| trigger | /hugo-chores |
Perform maintenance tasks on the MemMachine website repository. Subcommands handle Hugo version upgrades, build verification, npm dependency updates, and vendored theme library updates.
/hugo-chores # show available subcommands
/hugo-chores upgrade-hugo # update Hugo version in CI/CD and docs
/hugo-chores verify-build # run a production build and report results
/hugo-chores update-npm # audit and update npm dependencies
/hugo-chores update-theme # check and update vendored theme libraries
The site deploys automatically. Every push to main triggers the GitHub Actions workflow at .github/workflows/hugo.yaml, which builds the site with Hugo and deploys the output to GitHub Pages. There is no manual deploy step — merging a PR to main is the deploy.
All tool versions are pinned as env: vars at the top of that workflow file:
env:
DART_SASS_VERSION: 1.99.0
GO_VERSION: 1.26.3
HUGO_VERSION: 0.161.1
NODE_VERSION: 22.22.3
To upgrade any tool, edit the corresponding env var in .github/workflows/hugo.yaml and push to main.
If no subcommand is given, print the usage above and list the available subcommands with one-line descriptions. Do not run any commands.
If a subcommand is given, follow the steps for that subcommand below.
Upgrades the Hugo version used in CI/CD and updates all version references in documentation.
grep -n "HUGO_VERSION\|DART_SASS_VERSION\|GO_VERSION\|NODE_VERSION" .github/workflows/hugo.yaml | head -10
Parse all four pinned versions from the workflow file.
Run these in parallel:
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name"'
curl -s https://api.github.com/repos/sass/dart-sass/releases/latest | grep '"tag_name"'
curl -s https://go.dev/dl/?mode=json | python3 -c "import sys,json; data=json.load(sys.stdin); stable=[r for r in data if r.get('stable')]; print(stable[0]['version'] if stable else 'not found')"
curl -s https://nodejs.org/dist/index.json | python3 -c "import sys,json; releases=[r for r in json.load(sys.stdin) if r['version'].startswith('v22.') and 'lts' in r and r['lts']]; print(releases[0]['version'] if releases else 'not found')"
If network access is unavailable, ask the user to provide the latest version numbers.
If all current versions equal the latest, tell the user all tools are up to date and stop.
If any are newer, proceed with those that need updating.
In .github/workflows/hugo.yaml, update the env vars that changed. Use the Edit tool for a targeted replacement of the env block.
Version format notes:
v (e.g., v0.161.1 → 0.161.1)go (e.g., go1.26.3 → 1.26.3)v (e.g., v22.22.3 → 22.22.3)Update version references in these files (use grep first to find exact strings):
grep -rn "[0-9]\+\.[0-9]\+\.[0-9]\+" README.md AGENTS.md .claude/CLAUDE.md 2>/dev/null | grep -i "hugo\|sass\|go\|node"
Files that reference Hugo version: README.md, AGENTS.md, .claude/CLAUDE.md
Files that reference all four tool versions: AGENTS.md
Use the Edit tool to update each occurrence found.
hugo version
Report the installed Hugo version. Note if it differs from the new CI version (that's expected if the user hasn't installed the new version locally yet).
Tell the user:
git commit -sS -m "chore: bump CI tool versions"Runs a full production build and reports success or failure with useful diagnostics.
hugo --gc --minify 2>&1
On success: Report:
public/On failure: Report:
Common error types and fixes:
template: ... execute of template failed — template syntax error in themes/memmachine/layouts/YAML parse error — malformed frontmatter in a content file or data fileError: module ... not found — run hugo mod tidy or check hugo.tomlSass compilation error — CSS syntax error in themes/memmachine/assets/css/If build succeeded, the public/ directory now contains the built site. Remind the user that public/ is gitignored and should not be committed.
Audits and updates Node.js dependencies (PostCSS, Autoprefixer).
npm audit
Report the number of vulnerabilities found by severity. If none, say so.
npm update
hugo --gc --minify 2>&1
If the build fails after the npm update, report the error. The user may need to investigate the breaking change in the updated package.
Tell the user:
package.json before and after)git commit -sS -m "chore: update npm dependencies"Checks and updates the vendored third-party libraries used by the memmachine theme. The theme vendors libraries directly as minified files rather than using a package manager.
| Library | Vendored files | How to detect version |
|---|---|---|
| Bootstrap (CSS) | themes/memmachine/assets/css/bootstrap.min.css | First line comment: Bootstrap v5.3.8 |
| Bootstrap (JS) | themes/memmachine/assets/js/bootstrap.bundle.min.js | First line comment: Bootstrap v5.3.8 |
| Lenis (CSS) | themes/memmachine/assets/css/lenis.css | File is unminified; version not embedded — check git blame or cross-reference JS |
| Lenis (JS) | themes/memmachine/assets/js/lenis.min.js | First 200 chars contain "1.3.23" (bare version string, first quoted number) |
| Font Awesome | CDN in themes/memmachine/layouts/_partials/head.html | grep 'font-awesome' themes/memmachine/layouts/_partials/head.html |
Note: themes/memmachine/assets/css/aos.min.css is vendored but not included in the CSS bundle (themes/memmachine/layouts/_partials/head/css.html) and not loaded by any layout — skip it.
# Bootstrap version (from CSS comment)
head -2 themes/memmachine/assets/css/bootstrap.min.css | grep -o 'Bootstrap v[0-9.]*'
# Lenis version (from JS string)
python3 -c "
import re
with open('themes/memmachine/assets/js/lenis.min.js') as f:
c = f.read(300)
m = re.search(r'[^0-9]([0-9]+\.[0-9]+\.[0-9]+)[^0-9]', c)
print('Lenis:', m.group(1) if m else 'not found')
"
# Font Awesome version (from CDN URL)
grep -o 'font-awesome/[0-9.]*' themes/memmachine/layouts/_partials/head.html
Run these in parallel:
# Bootstrap latest
curl -s https://api.github.com/repos/twbs/bootstrap/releases/latest | grep '"tag_name"'
# Lenis latest
curl -s https://registry.npmjs.org/lenis/latest | python3 -c "import sys,json; d=json.load(sys.stdin); print('lenis:', d['version'])"
# Font Awesome latest
curl -s https://api.github.com/repos/FortAwesome/Font-Awesome/releases/latest | grep '"tag_name"'
Build a table of current vs. latest. For any library that is already up to date, skip it. For any that has a newer release, proceed to update it.
Download new CSS and JS from jsDelivr, replacing the vendored files:
BOOTSTRAP_VERSION=5.3.8 # use the actual latest version
curl -sL "https://cdn.jsdelivr.net/npm/bootstrap@${BOOTSTRAP_VERSION}/dist/css/bootstrap.min.css" \
-o themes/memmachine/assets/css/bootstrap.min.css
curl -sL "https://cdn.jsdelivr.net/npm/bootstrap@${BOOTSTRAP_VERSION}/dist/js/bootstrap.bundle.min.js" \
-o themes/memmachine/assets/js/bootstrap.bundle.min.js
Verify the download by checking the version comment:
head -2 themes/memmachine/assets/css/bootstrap.min.css | grep -o 'Bootstrap v[0-9.]*'
Download new CSS and JS from jsDelivr:
LENIS_VERSION=1.3.23 # use the actual latest version
curl -sL "https://cdn.jsdelivr.net/npm/lenis@${LENIS_VERSION}/dist/lenis.css" \
-o themes/memmachine/assets/css/lenis.css
curl -sL "https://cdn.jsdelivr.net/npm/lenis@${LENIS_VERSION}/dist/lenis.min.js" \
-o themes/memmachine/assets/js/lenis.min.js
Verify by checking the version string in the new JS:
python3 -c "
import re
with open('themes/memmachine/assets/js/lenis.min.js') as f:
c = f.read(300)
m = re.search(r'[^0-9]([0-9]+\.[0-9]+\.[0-9]+)[^0-9]', c)
print('Lenis:', m.group(1) if m else 'not found')
"
Edit the CDN URL in themes/memmachine/layouts/_partials/head.html. The line looks like:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css" ...>
Use the Edit tool to replace only the version number in the URL. Do not change any other attributes.
hugo --gc --minify 2>&1
If the build fails, the most likely causes are:
themes/memmachine/assets/js/custom.jsIf the build fails, revert the specific failing library and report the issue to the user.
Tell the user:
git commit -sS -m "chore: update vendored theme libraries"Setup: Current workflow has HUGO_VERSION: 0.149.0. Latest GitHub release is v0.161.1.
Expected behavior:
.github/workflows/hugo.yaml env blockREADME.md, AGENTS.md, .claude/CLAUDE.mdPass criteria: All files updated with correct version string; no other files modified.
Setup: Repository has no uncommitted changes; all content and templates are valid.
Expected behavior:
hugo --gc --minifyPass criteria: Build passes; only read-only operations and the hugo command are run; public/ is not staged for commit.
Setup: bootstrap.min.css first line shows Bootstrap v5.3.2. Lenis JS has "1.1.14". Font Awesome CDN shows 7.0.0. Latest Bootstrap is v5.3.8, Lenis is 1.3.23, Font Awesome is 7.2.0.
Expected behavior:
head.htmlPass criteria: All three libraries at new versions; build passes; no other files modified.