Skip to content

Commit 5bfdc7d

Browse files
committed
Simplify exampleSite setup
Use a replace directive in exampleSite/go.mod to point to the directory above instead of the themesDir workaround it replaces. This should make it more robust and be the same setup as people using this theme for real projects.
1 parent 3cc71f3 commit 5bfdc7d

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

‎exampleSite/config.toml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
theme = "docuapi"
2-
themesdir = "../.."
31
languageCode = "en-us"
42
baseurl = "https://docuapi.netlify.com/"
53
title = "DocuAPI Example Site"
@@ -25,8 +23,8 @@ defaultContentLanguage = "en"
2523
[module]
2624
[module.hugoVersion]
2725
[[module.imports]]
28-
# We include the theme by "../.." above, but we need one module import for Hugo to detect us as a Hugo Module.
29-
path="github.com/bep/empty-hugo-module"
26+
# This is replaced in go.mod to point to the directory above.
27+
path="github.com/bep/docuapi/v2"
3028

3129
[params]
3230
search = true

‎exampleSite/go.mod‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ module github.com/bep/docuapi/exampleSite
22

33
go 1.16
44

5-
require (
6-
github.com/bep/empty-hugo-module v1.0.0 // indirect
7-
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.500.100 // indirect
8-
github.com/olivernn/lunr.js v2.3.9+incompatible // indirect
9-
github.com/slatedocs/slate v2.9.2+incompatible // indirect
10-
)
5+
require github.com/bep/docuapi/v2 v2.0.4 // indirect
6+
7+
replace github.com/bep/docuapi/v2 => ../

‎exampleSite/go.sum‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
github.com/bep/empty-hugo-module v1.0.0 h1:aYc9RWea644CdYjg9zCy8nkVF4KjC3fwhUTvvcXXg8s=
2-
github.com/bep/empty-hugo-module v1.0.0/go.mod h1:whohinbSjMoFi/Skivj9kvdPs1tEgzYpZ4rXoQk/0/I=
3-
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.401.201 h1:rIBco2i/51nTPbi7pHUvwBwznCddMOsp/9pR2veAPx8=
4-
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.401.201/go.mod h1:WWQxcmPs5Xy3xDgi29ipkmZT6NKVb3bsqyCDTY3eYYY=
1+
github.com/bep/docuapi/v2 v2.0.4 h1:TU6CzjdfiWI+D/d911r8ZQG7R8h64ayEaC6iWNbJ/NQ=
2+
github.com/bep/docuapi/v2 v2.0.4/go.mod h1:hoeibCSjXWJ/fLOwPSo8WZbgl5EO3zQjS/nrAs2v2Ro=
53
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.500.100 h1:yIymGxglvwr9Guhk7cr9VoMQ3IgLLJ0E4PKcKCg+kJY=
64
github.com/gohugoio/hugo-mod-jslibs-dist/alpinejs/v3 v3.500.100/go.mod h1:WWQxcmPs5Xy3xDgi29ipkmZT6NKVb3bsqyCDTY3eYYY=
75
github.com/olivernn/lunr.js v2.3.9+incompatible h1:eH8iBnjlR4mwlYDdNuqy9PCNLjp2bEs6aoNnTSaccx0=

0 commit comments

Comments
 (0)