diff --git a/content/hosting-and-deployment/hosting-on-netlify.md b/content/hosting-and-deployment/hosting-on-netlify.md index 0e84f55eb..ada1a56dc 100644 --- a/content/hosting-and-deployment/hosting-on-netlify.md +++ b/content/hosting-and-deployment/hosting-on-netlify.md @@ -59,7 +59,7 @@ 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 +## Build with a Specific Hugo Version Setting the build command to `hugo` will build your site according to the current default Hugo version used by Netlify. @@ -79,15 +79,21 @@ For production: ``` [context.production.environment] - HUGO_VERSION = "0.26" + HUGO_VERSION = "0.36" ``` For testing: ``` [context.deploy-preview.environment] - HUGO_VERSION = "0.26" -``` + 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`: + +{{< 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:. diff --git a/content/troubleshooting/faq.md b/content/troubleshooting/faq.md index 400bba897..b6fc9407f 100644 --- a/content/troubleshooting/faq.md +++ b/content/troubleshooting/faq.md @@ -29,4 +29,9 @@ How automate the "publish at intervals" part depends on your situation: Also see this Twitter thread: -{{< tweet 962380712027590657 >}} \ No newline at end of file +{{< tweet 962380712027590657 >}} + +## 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). + diff --git a/layouts/shortcodes/code.html b/layouts/shortcodes/code.html index f40cf071d..4c12b0f29 100644 --- a/layouts/shortcodes/code.html +++ b/layouts/shortcodes/code.html @@ -11,7 +11,7 @@ {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} {{end}}
{{- .Inner | string -}}{{ end }}
+ {{ if .Get "nocode" }}{{ .Inner }}{{ else }}{{ if $isHTML }}{{- highlight .Inner "html" "" | -}}{{ else }}{{- .Inner | string -}}{{ end }}{{ end }}