Getting started
Prerequisites
Firstly, ensure you have installed the extended version of Hugo. See installation steps from Hugo's official docs.
Getting up and running
Read the prerequisites above and verify you're using the extended version of Hugo. There are at least two ways of quickly getting started with Hugo and the VMware Clarity theme:
Option 1 (recommended)
Generate a new Hugo site and add this theme as a Git submodule inside your themes folder:
| |
Then run
| |
Hurray!
Option 2 (Great for testing quickly)
You can run your site directly from the exampleSite. To do so, use the following commands:
| |
Although, option 2 is great for quick testing, it is somewhat problematic when you want to update your theme. You would need to be careful not to overwrite your changes.
Option 3 (The new, most fun & painless approach)
This option enables you to load this theme as a hugo module. It arguably requires the least effort to run and maintain in your website.
First things first, ensure you have go binary installed on your machine.
| |
Open config.toml file in your code editor, replace theme = "hugo-clarity" with theme = ["github.com/chipzoller/hugo-clarity"] or just theme = "github.com/chipzoller/hugo-clarity".
Hurray you can now run
| |
To pull in theme updates, run hugo mod get -u ./... from the theme folder. If unsure, learn how to update hugo modules
There is more you could do with hugo modules, but this will suffice for our use case here.