Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lucperkins/hugo-fresh.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefMa <StefMaDev@outlook.com>2021-02-15 17:15:40 +0300
committerStefMa <StefMaDev@outlook.com>2021-02-15 17:15:40 +0300
commitcc31e5c6078f07cbb4608530d73c187dd76002ad (patch)
treebcd1d564db0ae7b7b5006ef0c088a07539001ac2
parent73ded70a9730873fb9c23ceb17e28c2f41325c67 (diff)
Document hugo modules usage
-rw-r--r--README.md38
1 files changed, 37 insertions, 1 deletions
diff --git a/README.md b/README.md
index 487012a..fd99178 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,10 @@
## Getting started
-To create a new site using this theme:
+To create a new site using this theme
+
+<details open>
+<summary>with git submodules</summary>
```bash
# Create site and cd into it
@@ -28,6 +31,39 @@ hugo server
open http://localhost:1313
```
+</details>
+
+<details>
+<summary>with hugo modules</summary>
+
+```bash
+# Create site and cd into it
+hugo new site my-site && cd my-site
+
+# Transform your hugo site to an module
+hugo mod init YOUR_MODULE_NAME
+
+# Remove the default config
+rm config.toml
+
+# Fetch the example config
+curl -O https://raw.githubusercontent.com/StefMa/hugo-fresh/master/exampleSite/config.yaml
+
+# Replace theme with module in config.yaml
+#theme: [hugo-fresh]
+module:
+ imports:
+ path: github.com/stefma/hugo-fresh
+
+# Run the site locally
+hugo server
+
+# Open the site in your browser
+open http://localhost:1313
+```
+
+</details>
+
## Customizing your page
### Landing page