From 382632b5839057f287060c1a3ce6e705489b3328 Mon Sep 17 00:00:00 2001 From: siedentop <284732+siedentop@users.noreply.github.com> Date: Thu, 21 May 2020 01:59:02 -0700 Subject: [PATCH] Use-modules: More help how to get started importing a theme (#1107) * Use-modules: More help how to get started It took me too long to figure out how to do this simple thing. How can I import a theme using the new hugo-module concept. Let's update the documentation so that it is easier for others. * Incorporate review suggestions * Neutral theme * Remove redundant `theme` setting. --- content/en/hugo-modules/use-modules.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/content/en/hugo-modules/use-modules.md b/content/en/hugo-modules/use-modules.md index 85417b5bf..baf68d21b 100644 --- a/content/en/hugo-modules/use-modules.md +++ b/content/en/hugo-modules/use-modules.md @@ -30,9 +30,20 @@ Use `hugo mod init` to initialize a new Hugo Module. If it fails to guess the mo hugo mod init github.com/gohugoio/myShortcodes ``` - Also see the [CLI Doc](/commands/hugo_mod_init/). +## Use a Module for a Theme +The easiest way to use a for a theme is to import it in the config. + +1. Initialize the hugo module system: `hugo mod init github.com//` +2. Import the theme in your `config.toml`: + +```toml +[module] + [[module.imports]] + path = "github.com/spf13/hyde/" +``` + ## Update Modules Modules will be downloaded and added when you add them as imports to your configuration, see [Module Imports](/hugo-modules/configuration/#module-config-imports).