mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 20:17:17 +00:00
Update deployment instructions from hugo > 0.20 on Netlify
This commit is contained in:
1 parent
1bbb41ca41
commit
373ed38b05
1 file changed
+17
-1
@@ -63,7 +63,7 @@ Once selected, you'll be brought to a screen for basic setup. Here you can selec
|
|||||||
|
|
||||||
Setting the build command to `hugo` will build your site according to the current default Hugo version used by Netlify. You can see the full list of [available Hugo versions in Netlify's Docker file][hugoversions].
|
Setting the build command to `hugo` will build your site according to the current default Hugo version used by Netlify. You can see the full list of [available Hugo versions in Netlify's Docker file][hugoversions].
|
||||||
|
|
||||||
If you want to tell Netlify to build with a specific version, you can append an underscore followed by the version number to the build command:
|
If you want to tell Netlify to build with a specific version (hugo <= 0.20), you can append an underscore followed by the version number to the build command:
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo_0.19
|
hugo_0.19
|
||||||
@@ -73,6 +73,22 @@ Your simple configuration should now look similar to the following:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
For version hugo > 0.20 you have to [specify version hugo for testing and production]((https://www.netlify.com/blog/2017/04/11/netlify-plus-hugo-0.20-and-beyond/) in `netlify.toml` file.
|
||||||
|
|
||||||
|
For production:
|
||||||
|
|
||||||
|
```
|
||||||
|
[context.production.environment]
|
||||||
|
HUGO_VERSION = "0.26"
|
||||||
|
```
|
||||||
|
|
||||||
|
For testing:
|
||||||
|
|
||||||
|
```
|
||||||
|
[context.deploy-preview.environment]
|
||||||
|
HUGO_VERSION = "0.26"
|
||||||
|
```
|
||||||
|
|
||||||
Selecting "Deploy site" will immediately take you to a terminal for your build:.
|
Selecting "Deploy site" will immediately take you to a terminal for your build:.
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
Reference in new issue
Block a user