Update Ananke
Your site uses one exact Ananke release until you update it. This guide updates the theme to the latest release or to a release that you select, and checks the result.
Before you update #
- Find your current release. For a Hugo Module, run
hugo mod graph. For a Git submodule, rungit -C themes/ananke describe --tags. - Read the release notes of every release after yours. They name new features, changed defaults, and deprecations.
- Check that your Hugo version supports the new release: see Hugo version compatibility.
- Commit or back up your site, so that you can return to the current state.
Update a Hugo Module #
To update to the latest release:
hugo mod get -u github.com/gohugo-ananke/ananke/v2
hugo mod tidyTo select a release, add its version:
hugo mod get github.com/gohugo-ananke/ananke/v2@v2.23.0
hugo mod tidyThe same command with an older version returns to that release. Commit the changed go.mod and go.sum.
If the module path in your configuration starts with github.com/theNewDynamic/, these commands fail. Follow Upgrade from theNewDynamic to gohugo-ananke first.
Update a Git submodule #
Fetch the releases and check out the one that you want, for example v2.23.0:
git -C themes/ananke fetch --tags
git -C themes/ananke checkout v2.23.0Then commit the new theme commit in your site:
git add themes/ananke
git commit -m "Update Ananke to v2.23.0"On other computers and in deployments, run git submodule update --init after you pull this commit.
Check the result #
Confirm the version:
hugo mod graph, orgit -C themes/ananke describe --tags.Build the site and read every warning line that starts with
WARNand contains[ananke]:bashhugo --gcOpen the site with
hugo serverand check the pages that use your customisations: overridden partials, hooks, custom CSS, and menus.
Changes that need action #
Some releases need changes in your site. The release notes link to the guide:
- Ananke 2.16.0 changed the stylesheet pipeline: see Upgrade from Ananke 2.15 or earlier.
- Ananke 2.21.0 deprecated overrides of the header partials: see Migrate existing header overrides.
- Ananke 2.11.0 replaced the social settings: see Upgrade social links from Ananke 2.10 or earlier.
- Ananke 2.13.0 and later use the module path
github.com/gohugo-ananke/ananke/v2: see Upgrade from theNewDynamic to gohugo-ananke.