Update your Docsy Hugo Module
hugo mod get, for sites that manage the theme as a Hugo Module.At the command prompt, change to the root directory of your existing site.
cd /path/to/my-existing-site
Applies if your site config still imports github.com/google/docsy/theme
(Docsy 0.17.0 and earlier): follow the 0.18.0 release report’s migration
steps before the commands below, which assume the current path.
Then invoke Hugo’s module get subcommand with the update flag:
hugo mod get -u github.com/docsy/docsy/theme
Hugo automatically pulls in the latest theme version.
To pin the theme to a specific version, specify its tag when updating, for example:
hugo mod get github.com/docsy/docsy/theme@v0.18.0
Instead of a version tag, you can also specify a commit hash, replacing
COMMIT_HASH:
hugo mod get github.com/docsy/docsy/theme@COMMIT_HASH
After updating the theme, tidy your module files, refresh the generated theme npm dependencies workspace, and reinstall it:
hugo mod tidy
hugo mod npm pack
npm install
Hugo warns at build time when the generated workspace’s dependency set has drifted from the theme’s. To verify the resolved version, run:
hugo mod graph
Confirm that it lists github.com/docsy/docsy/theme at the version you expect.
After updating the theme, continue with the remaining update steps, starting with Review your theme overrides.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.