Prerequisites

You should install the following softwares before start:

Steps

Init a new site

BASH
1hugo new site my-site --format=yaml
Click to expand and view more

Import theme with hugo mod

BASH
1# Init hugo mod
2cd my-site
3hugo mod init github.com/username/my-site
4
5# add Hugo Narrow
6hugo mod get github.com/tom2almighty/hugo-narrow
Click to expand and view more

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:

BASH
1module:
2  hugoVersion:
3    extended: true
4    min: 0.146.0
5  imports:
6    - path: github.com/tom2almighty/hugo-narrow
Click to expand and view more

Localhost preview

BASH
1hugo server --buildDrafts --disableFastRender
Click to expand and view more

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

Update theme

To update ALL mods use the command:

BASH
1hugo mod get -u
Click to expand and view more

To update the theme mod use the command:

BASH
1hugo mod get -u github.com/tom2almighty/hugo-narrow
Click to expand and view more

Copyright Notice

Author: Hugo Narrow

Link: https://hugo-narrow-docs.vercel.app/docs/hugo-mod/

License: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut