mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-17 14:25:05 -04:00
Some more Netlify improvements
This commit is contained in:
parent
0bd5121250
commit
218ba2a654
@ -59,21 +59,9 @@ Select the repo you want to use for continuous deployment. If you have a large n
|
||||
|
||||
Once selected, you'll be brought to a screen for basic setup. Here you can select the branch you wanted published, your [build command][], and your publish (i.e. deploy) directory. The publish directory should mirror that of what you've set in your [site configuration][config], the default of which is `public`. The following steps assume you are publishing from the `master` branch.
|
||||
|
||||
## Build with a Specific Hugo Version
|
||||
## Configure Hugo Version in Netlify
|
||||
|
||||
Setting the build command to `hugo` will build your site according to the current default Hugo version used by Netlify.
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
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 or set `HUGO_VERSION` as a build environment variable in the Netlify console.
|
||||
You can [set Hugo version](https://www.netlify.com/blog/2017/04/11/netlify-plus-hugo-0.20-and-beyond/) testing and production in `netlify.toml` file or set `HUGO_VERSION` as a build environment variable in the Netlify console.
|
||||
|
||||
For production:
|
||||
|
||||
@ -89,13 +77,15 @@ For testing:
|
||||
HUGO_VERSION = "0.36"
|
||||
```
|
||||
|
||||
The Netlify configuration file can be a little hard to understand and get right for the different, and you may get some inspiration and tips from this site's `netlify.toml`:
|
||||
The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`:
|
||||
|
||||
{{< code file="netlify.toml" nocode="true" >}}
|
||||
{{< readfile file="netlify.toml" highlight="toml" >}}
|
||||
{{< /code >}}
|
||||
|
||||
Selecting "Deploy site" will immediately take you to a terminal for your build:.
|
||||
## Build and Deploy Site
|
||||
|
||||
In the Netlify console, selecting "Deploy site" will immediately take you to a terminal for your build:.
|
||||
|
||||

|
||||
|
||||
|
@ -33,5 +33,5 @@ Also see this Twitter thread:
|
||||
|
||||
## Can I use the latest Hugo version on Netlify?
|
||||
|
||||
Yes you can! Read [this](/hosting-and-deployment/hosting-on-netlify/#build-with-a-specific-hugo-version).
|
||||
Yes you can! Read [this](/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user