Hugo Mod

Prerequisites

You should install the following softwares before start:

Steps

Init a new site

hugo new site my-site --format=yaml

Import theme with hugo mod

# Init hugo mod
cd my-site
hugo mod init github.com/username/my-site

# add Hugo Narrow
hugo mod get github.com/tom2almighty/hugo-narrow

Copy exampleSite files

Copy the full files of hugo-narrow/exampleSite/ to the root folder. This method will NOT Create any files at ~/themes/, visit theme repository see the files.

Modify hugo-narrow/config/_default/hugo.yaml, import theme according to hugo mod:

module:
  hugoVersion:
    extended: true
    min: 0.146.0
  imports:
    - path: github.com/tom2almighty/hugo-narrow

Localhost preview

hugo server --buildDrafts --disableFastRender

Visit http://localhost:1313 see your new site.

Update theme

To update ALL mods use the command:

hugo mod get -u

To update the theme mod use the command:

hugo mod get -u github.com/tom2almighty/hugo-narrow

Note

Click Hugo Mod to visit hugo mod update documentation.