Small CLI wrapper for common Hugo helper tools (update lastmod, clean cache, SFTP sync).
npm install hugo-toolboxMy Javascript Toolbox for the Hugo Website Builder:
1. Cleans the Hugo-Cache the smart way. See git-repo
1. Track modified dates of images and set lastmod in markdown / frontmatter. See git-repo
1. Check the Website for broken links. See git-repo
1. Upload your Hugo Website via sftp and a real push-sync. See git-repo [BREAKING CHANGE]
Please visit the git repos for detailed manuals.
``bash`
npm i -D hugo-toolboxor
npm install --save-dev hugo-toolboxor
yarn add --dev hugo-toolboxor
pnpm add -D hugo-toolbox
`bash`
npx hugo-toolbox --help # help, -h
in package.json
`bash
"scripts": {
"predev": "hugo-toolbox update-lastmod",
"dev": "hugo server --disableFastRender --noHTTPCache",
"prebuild": "hugo-toolbox update-lastmod",
"build": "hugo --minify --gc",
"clean:cache": "hugo-toolbox clean-cache",
"sync:staging": "hugo-toolbox sync staging",
"sync:staging:dry": "hugo-toolbox sync staging --dry-run",
"ss": "npm run sync:staging",
"ssd": "npm run sync:staging:dry",
"sync:prod": "hugo-toolbox sync prod",
"sync:prod:dry": "hugo-toolbox sync prod --dry-run",
"sp": "npm run sync:prod",
"spd": "npm run sync:prod:dry"
"check-links": "hugo-toolbox check-links carsten-local all",
"check-links:intern": "hugo-toolbox check-links carsten-local intern",
"check-links:extern": "hugo-toolbox check-links carsten-local extern",
"check-links:dry": "hugo-toolbox check-links carsten-local all --dry-run"
}
``
For more options check the repos of the tools:
-
-
-
-
-