To initialize a Hugo project, it's simple (this will generate a minimal boilerplate):
hugo new site <site name> --destination .
To import hugo-primer theme, following properties must be added into hugo.(yaml|toml)
configuration file:
theme: github.com/kilianpaquier/hugo-primer
module:
imports:
- path: github.com/kilianpaquier/hugo-primer
You then can initialize go.mod
file and tidy with the following commands to download this theme as dependency (like you would do with Go):
hugo mod init github.com/<username>/<site name>
hugo mod tidy
If you intend to go with a Git submodule, two possibilities:
With SSH :
git submodules add [email protected]:kilianpaquier/hugo-primer.git themes/hugo-primer
With HTTPS :
git submodules add https://github.com/kilianpaquier/hugo-primer.git themes/hugo-primer
You then need to update hugo.(yaml|toml)
configuration with following property:
theme: hugo-primer
For an expected experience with hugo-primer theme, default configuration should be merged with your own:
_merge: deep
You are now ready to start you Hugo website:
hugo server --disableFastRender --destination dist