Skip to content

Commit e41a374

Browse files
DotTecherquhart
authored andcommitted
Let Netlify build use its own Hugo installation (#114)
1 parent ced97a1 commit e41a374

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

gulpfile.babel.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ import inject from "gulp-inject";
1313
import cssnano from "cssnano";
1414

1515
const browserSync = BrowserSync.create();
16-
const hugoBin = `./bin/hugo.${process.platform === "win32" ? "exe" : process.platform}`;
1716
const defaultArgs = ["-d", "../dist", "-s", "site"];
1817

18+
var hugoBin = `./bin/hugo.${process.platform === "win32" ? "exe" : process.platform}`;
19+
20+
if (process.env.HUGO_VERSION) {
21+
hugoBin = 'hugo'
22+
}
23+
1924
if (process.env.DEBUG) {
2025
defaultArgs.unshift("--debug")
2126
}

netlify.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
publish = "dist"
44
[build.environment]
55
YARN_VERSION = "1.9.4"
6+
HUGO_VERSION = "0.46"
67

78
[context.deploy-preview]
89
command = "yarn build-preview"

0 commit comments

Comments
 (0)