Install theme

First ensure that you have hugo installed.

You need a recent extended version (we recommend version 0.61 or later) of Hugo to do local builds and previews of sites (like this one) that uses this theme.

If you install from the release page, make sure to get the extended Hugo version, which supports sass; you may need to scroll down the list of releases to see it.

For comprehensive Hugo documentation, see gohugo.io.

You could go with the options right below.

This option enables you to load compose theme as a hugo module. First things first, ensure you have go binary installed on your machine.

1$ git clone https://github.com/onweru/compose/
2cd compose/exampleSite/
3hugo server

To pull in theme updates, run hugo mod get -u ./... from the theme folder. If unsure, learn how to update hugo modules

The exampleSite uses the theme as a hugo module by default.

If you choose Option 2 or Option 3 below, ensure you edit these lines in the hugo.toml file as advised on the comments. Else, you will not be able to pull theme updates.

Generate a new Hugo site and add this theme as a Git submodule inside your themes folder:

1hugo new site yourSiteName
2cd yourSiteName
3git init
4git submodule add https://github.com/onweru/compose/ themes/compose
5cp -a themes/compose/exampleSite/* .
6git commit -m "setup compose theme"

Then run

1hugo server

Hurray!

You can run your site directly from the exampleSite. To do so, use the following commands:

1git clone https://github.com/onweru/compose/
2cd compose/exampleSite/
3hugo server --themesDir ../..
Although, option 3 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.

Once set, jump over to the hugo.toml file and start configuring your site.