From 571859a51bf44738e2519bd069e0964ec9101059 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Tue, 30 May 2017 11:44:55 -0700 Subject: [PATCH] Pin Hugo version on Netlify to the most recent one. So people start with a more modern version of Hugo when they deploy their site on Netlify. Signed-off-by: David Calavera --- README.md | 5 +++++ netlify.toml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 9ec000f..d0c55ca 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,11 @@ You can also click this button: [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/eliwilliamson/victor-hugo) +### Picking the right version of Hugo +Victor-Hugo doesn't make any assumption on which version of Hugo you use, this boilerplate works with any version above v0.13. However, the version +installed on your computer might not be the same version that Netlify uses to build your site. To ensure that those two versions match, open the `netlify.toml` +file and change the `HUGO_VERSION` variable to match the version you use in your computer. If you don't know which version you're using in your computer, you +can open a terminal and run `hugo version`, that will display the version in your computer. ## Enjoy!! diff --git a/netlify.toml b/netlify.toml index dd1ef8e..174dfd2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,5 +2,10 @@ command = "npm run build" publish = "dist" +# Change the version of Hugo you want to use on Netlify +# by changing this environment variable. +[build.environment] + HUGO_VERSION = "0.21" + [context.deploy-preview] command = "npm run build-preview"