From 7ec46861e3989a04fa1d6d71a6a444c83f910344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20F=2E=20A=2E=20de=20Pr=C3=A1?= Date: Thu, 25 Mar 2021 14:23:50 -0300 Subject: [PATCH] Merge go modules (#543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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á * Remove hugo mod from exampleSite and Netlify build * Bump hugo version * Move env vars inside netlify.toml Co-authored-by: Edward Muller --- CONTRIBUTORS.md | 1 + config.toml | 5 +++++ exampleSite/config.toml | 2 +- go.mod | 3 +++ netlify.toml | 8 ++------ theme.toml | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 config.toml create mode 100644 go.mod diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0557035..ab5a42d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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) \ No newline at end of file diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..62b395a --- /dev/null +++ b/config.toml @@ -0,0 +1,5 @@ +baseURL = "https://example.com/" + +[module] +[module.hugoVersion] +min = "0.77.0" \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 9af81e3..fdc876f 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,7 +4,7 @@ theme = "hugo-coder" languageCode = "en" defaultContentLanguage = "en" paginate = 20 -pygmentsStyle = "b2" +pygmentsStyle = "bw" pygmentsCodeFences = true pygmentsCodeFencesGuessSyntax = true enableEmoji = true diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..9b2ac45 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/luizdepra/hugo-coder + +go 1.16 diff --git a/netlify.toml b/netlify.toml index 9a854c6..b52bc33 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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" diff --git a/theme.toml b/theme.toml index 09fe299..42f573e 100644 --- a/theme.toml +++ b/theme.toml @@ -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á"