summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2024-04-07 15:10:53 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2024-04-07 15:14:57 +0200
commit1b9806ad6a5cd3295c96d1322af96b33fd246533 (patch)
treec3dbe65e299375fc62cea14131bf8376f990af03
parent8858738b17ea5b992d684ff40450b5405cea22c8 (diff)
downloadgohugo-theme-ed-1b9806ad6a5cd3295c96d1322af96b33fd246533.tar.gz
Use Hugo's module imports for theme configuration
- Remove the `theme` variable from config.yaml - Add the theme's repository path to the `imports` section under `module` - Update comments to clarify the purpose of the `imports` section
-rw-r--r--CHANGELOG.md5
-rw-r--r--exampleSite/config/_default/config.yaml8
2 files changed, 9 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e2fbdcf..4e9207d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated the minimum required Hugo version for this theme to 0.114.0.
+- Refactored the theme configuration in `exampleSite/config/_default/config.yaml`
+ to use Hugo's module imports instead of the `theme` variable. The theme's
+ repository path is now specified under the `imports` section in the `module`
+ block. This change improves clarity and aligns with Hugo's recommended practices
+ for managing theme dependencies.
## [v0.7.0](https://github.com/sergeyklay/gohugo-theme-ed/compare/v0.6.0...v0.7.0)
diff --git a/exampleSite/config/_default/config.yaml b/exampleSite/config/_default/config.yaml
index d5b1459..3941f28 100644
--- a/exampleSite/config/_default/config.yaml
+++ b/exampleSite/config/_default/config.yaml
@@ -12,10 +12,6 @@ defaultContentLanguage: en
# title of the page. Eg. "Contacts - Ed."
title: Ed.
-# Use full path to theme's repository in case of using Hugo Modules.
-# This is replaced in go.mod for exampleSite to point to the directory above.
-theme: github.com/sergeyklay/gohugo-theme-ed
-
enableRobotsTXT: true
# When using ref or relref to resolve page links and a link cannot
@@ -170,3 +166,7 @@ module:
hugoVersion:
extended: true
min: '0.114.0'
+ imports:
+ # Use full path to theme's repository. This is replaced in go.mod for
+ # exampleSite to point to the directory above.
+ - path: github.com/sergeyklay/gohugo-theme-ed