-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Installation as GoHugo Module
Hugo Module based installation for the Ananke theme for GoHugo.
- Install Hugo (extended or extended/deploy edition, 0.128.0 or later)
- Install Git
- Install Golang
To install or create a GoHugo website from scratch with the Ananke theme using the GoHugo Module method, follow these steps:
Verify that you have installed Hugo 0.128.0 or later.
hugo version
Create the project structure quickstart
directory:
hugo new site quickstart
Change into the newly created directory:
cd quickstart
Initialize Git in the current directory:
git init
Initialize your repository as a Hugo Module:
hugo mod init github.com/username/reponame
Note: replace username and reponame with the path to your repository. This is a convention that is not enforced, of course your module can be named anything you like, but it is recommended to use the same path as your repository.
Add the Ananke theme as a Hugo Module:
[module]
[[module.imports]]
disable = false
ignoreConfig = false
ignoreImports = false
path = 'github.com/theNewDynamic/gohugo-theme-ananke/v2'
Note: Hugo configuration can have various formats and locations. The previous lines are written in the hugo.toml
or config.toml
file at the root of the project. If you have a different configuration file or format it could be that you need to add the module configuration in a different way.
Note: v2
is required to use the latest published version of Ananke.
Now update the module configuration by running:
hugo mod get -u ./...
hugo mod tidy
This will load the module into the cache and create/update the go.mod
and go.sum
files. These two files should be added to your repository.
Start Hugo's development server to view the site.
hugo server
Running this command will start the development server and you can see your website at http://localhost:1313/. To stop the development server press Ctrl + C
.
So set up details like comment system follow the steps in the Ananke theme's getting started guide.
Tip
We offer two sample repositories for Ananke's use. Feel free to clone them and play around to test out features described here:
- gohugo-theme-ananke-template-mod --- Hugo Module installation (preferred)
- gohugo-theme-ananke-template-submod --- Git Submodule installation (legacy method)
- Home
- Installation (notes)
- Configuration (notes)
- Content (notes)
- Design and customization
- FAQ