Skip to content

Commit

Permalink
Merge go modules (#543)
Browse files Browse the repository at this point in the history
* Add support for using as a Hugo module (#534)

* Add support for using as a Hugo module

Fixes #502

* Don't need/want the theme directory with modules

* Fix go.{mod,sum} files

* Set go version and hugo version everywhere

Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>

* Remove hugo mod from exampleSite and Netlify build

* Bump hugo version

* Move env vars inside netlify.toml

Co-authored-by: Edward Muller <edward_muller@icloud.com>
  • Loading branch information
luizdepra and Edward Muller committed Mar 25, 2021
1 parent 1555abc commit 7ec4686
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@
- [Ziwei Pan](https://github.com/PanZiwei/)
- [Viktar Patotski](https://github.com/xp-vit)
- [cuso4-5h2o](https://www.cuso4.me)
- [freeformz](https://icanhazdowntime.org)
5 changes: 5 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
baseURL = "https://example.com/"

[module]
[module.hugoVersion]
min = "0.77.0"
2 changes: 1 addition & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ theme = "hugo-coder"
languageCode = "en"
defaultContentLanguage = "en"
paginate = 20
pygmentsStyle = "b2"
pygmentsStyle = "bw"
pygmentsCodeFences = true
pygmentsCodeFencesGuessSyntax = true
enableEmoji = true
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/luizdepra/hugo-coder

go 1.16
8 changes: 2 additions & 6 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
publish = "exampleSite/public"
command = "cd exampleSite && hugo --themesDir=../.. --baseURL $URL"

[context.production.environment]
HUGO_VERSION = "0.73.0"
[build.environment]
HUGO_VERSION = "0.77.0"
HUGO_THEME = "repo"

[context.deploy-preview]
command = "cd exampleSite && hugo --themesDir=../.. --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.73.0"
HUGO_THEME = "repo"
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ features = [
"single-column",
"syntax-highlighting"
]
min_version = "0.73.0"
min_version = "0.77.0"

[author]
name = "Luiz F. A. de Prá"
Expand Down

0 comments on commit 7ec4686

Please sign in to comment.