Install as a Hugo Module (recommended)
This guide creates a new Hugo site named quickstart and installs the Ananke theme as a Hugo Module. Hugo then downloads the theme and records its exact version in your project. To compare this method with a Git submodule, read Choose an installation method.
Requirements #
- Hugo, in a version that the current Ananke release supports. See Hugo version compatibility. We recommend the latest Hugo release.
- Git.
- Go. Hugo uses Go to download modules.
Check the installed versions:
hugo version
git --version
go versionInstallation #
Create the site and change into its directory:
bashhugo new site quickstart cd quickstart git initMake the site a Hugo Module. Replace the path with the address of your own repository, for example
github.com/username/reponame. Hugo does not check the path, but your repository address makes it unique:bashhugo mod init github.com/username/reponameHugo creates a
go.modfile.Add the theme import to the end of
hugo.toml:toml# hugo.toml [[module.imports]] path = "github.com/gohugo-ananke/ananke/v2"The
/v2at the end of the path is required. If your site uses a configuration directory, put the import inconfig/_default/module.tomlas[[imports]]instead.Download the theme:
bashhugo mod get github.com/gohugo-ananke/ananke/v2 hugo mod tidyHugo adds the latest Ananke release to
go.modand records checksums ingo.sum. Commit both files.Start the development server:
bashhugo server
Check the result #
hugo mod graphlistsgithub.com/gohugo-ananke/ananke/v2@followed by the installed version.- http://localhost:1313/ shows the site with a dark header bar and the site title. The new site has no content yet.
Stop the server with Ctrl + C.
If the build fails, compare your Hugo version with Hugo version compatibility, and see Troubleshooting.
Next steps #
- Add a homepage, a post, and a menu: Build your first Ananke site.
- Set your site’s options: Configuration.
- Update the theme later: Update Ananke.