Update your Docsy Hugo Module
Update Docsy with hugo mod get, for sites that manage the theme as a Hugo Module.
These pages apply to Docsy v0.16.0 and compatible versions, and target release refers to the Docsy version that you are updating your site to. For what changed in a given release, and any release-specific upgrade actions, see the upgrade blog posts.
Perform the update steps in the order given by this page:
Applies if your target release names a newer Node.js version than your project uses; its upgrade blog post says so. With nvm, install and select that version, for example:
nvm install NODE_VERSION
Replace NODE_VERSION with the version that the upgrade post names.
Applies if your target release raises the minimum or recommended Hugo version; its upgrade blog post says so. For projects using the hugo-extended NPM package, update the package version, for example:
npm install --save-exact --save-dev hugo-extended@HUGO_VERSION
Replace HUGO_VERSION with the version that the upgrade post names.
After updating, also refresh any CI/CD cache keys so that builds don’t reuse a cached Hugo.
How you update the theme depends on the way that Docsy is installed in your project. Follow the page matching your install mode:
The remaining update steps apply to all install modes.
If your project overrides theme files, then after updating, diff each override against its new theme counterpart and port upstream changes as needed. Look for overrides in your project’s:
assets/i18n/layouts/, the most common locationstatic/Docsy’s project style files (_variables_project.scss and
friends) also work this way, but the theme’s copies are placeholders that are
intentionally empty: there’s nothing to diff, so they don’t need this review.
After updating, build or serve your site and check for errors and warnings. We recommend building both development and production versions of your site, since they can differ in their configuration, minification, etc.
Use this checklist as a guide to verify that your update succeeded:
Also perform any release-specific checks listed in the release’s upgrade blog post.
Update Docsy with hugo mod get, for sites that manage the theme as a Hugo Module.
Update Docsy with npm install, for sites that use the @docsy/theme package.
Update a Docsy theme vendored under themes/ as a Git submodule or clone.
Move a submodule- or clone-based site to Hugo Modules and simplify future updates.
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.