Squashed 'docs/' changes from f887bd7b..1d052b16
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 5 Sep 2017 16:09:40 +0000 (18:09 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 5 Sep 2017 16:09:40 +0000 (18:09 +0200)
1d052b16 Update hosting-on-netlify.md
28b96bec Remove double brackets in Netlify hosting tutorial
373ed38b Update deployment instructions from hugo > 0.20 on Netlify
1bbb41ca Generate static assets on deploy in Nanobox tutorial
816d207f Add missing backtick in templates/views.md
bf88e772 Add nanobox as a deployment option
9c37b4cc Change config's syntax order matching description
d3cb05a7 Fix wrongly named default value of publishDir
4be85c54 Add link to showcase a theme setup via config file
46837195 Init and update of submodules in .gitlab-ci.yml
9e7c2827 Add CSS lang argument to code block
85aad56e Abstract the type in the lookup order
4e1e43e9 Fix broken Pygments url
65b4e79b Correct GitLab project pipelines URL
94af72b5 Fix .Data.Terms usage in taxonomy template example
eb371e52 functions: Fix lang.NumFmt docs
a745cd6c Fix layouts' folder name in template primer
e181e637 Correct typo on GitHub pages guide (#151)
28698500 Remove HTML special chars from Windows install example
96b1f5b5 Remove not needed escape slashes in urls.md
2e05043f Add upgrade instructions using homebrew
2a14624d Fix alias in countrunes.md
5e26bb97 Update docker image for build/publish
01424887 List the internal templates
a3ef5be9 Remove string concatenation from add (math) sample
43d12b44 Fix typo
89bafa49 Change to Asciidoc URI
4e14071e Removes an extra bracket (>) in single-page-templates.md
0938e423 Fix typo in http2 server push blog
fac55121 Fix typo in deployment with rsync tutorial

git-subtree-dir: docs
git-subtree-split: 1d052b16a1290ada12f1e28c7c0c373f86741071

25 files changed:
content/content-management/formats.md
content/content-management/urls.md
content/functions/NumFmt.md
content/functions/countrunes.md
content/functions/math.md
content/getting-started/installing.md
content/hosting-and-deployment/deployment-with-nanobox.md [new file with mode: 0644]
content/hosting-and-deployment/deployment-with-rsync.md
content/hosting-and-deployment/hosting-on-github.md
content/hosting-and-deployment/hosting-on-gitlab.md
content/hosting-and-deployment/hosting-on-netlify.md
content/news/http2-server-push-in-hugo.md
content/templates/base.md
content/templates/internal.md
content/templates/introduction.md
content/templates/shortcode-templates.md
content/templates/single-page-templates.md
content/templates/taxonomy-templates.md
content/templates/views.md
content/themes/installing-and-using-themes.md
content/tools/syntax-highlighting.md
static/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png [new file with mode: 0644]
static/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png [new file with mode: 0644]
static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png [new file with mode: 0644]
static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png [new file with mode: 0644]

index c2837ffc4c8a99f1bbe08225793eb3eb3f924a42..1ff0784a2a0dc7bab0dada4ed8c3c5ff1a00de63 100644 (file)
@@ -214,7 +214,7 @@ Markdown syntax is simple enough to learn in a single sitting. The following are
 * [Markdown Tutorial (Interactive), Garen Torikian][mdtutorial]
 
 [`emojify` function]: /functions/emojify/
-[ascii]: http://asciidoc.org/
+[ascii]: http://asciidoctor.org/
 [bfconfig]: /getting-started/configuration/#configuring-blackfriday-rendering
 [blackfriday]: https://github.com/russross/blackfriday
 [mmark]: https://github.com/miekg/mmark
index 29cd66e8425b0eb40cd7c13564f1edaa36a1cd70..f6f8df11fa110d56509b08f3f894d7ce3077517a 100644 (file)
@@ -24,7 +24,7 @@ The default Hugo target directory for your built website is `public/`. However,
 The `permalinks` option in your [site configuration][config] allows you to adjust the directory paths (i.e., the URLs) on a per-section basis. This will change where the files are written to and will change the page's internal "canonical" location, such that template references to `.RelPermalink` will honor the adjustments made as a result of the mappings in this option.
 
 {{% note "Default Publish and Content Folders" %}}
-These examples use the default values for `publishDir` and `contentDir`; i.e., `publish` and `content`, respectively. You can override the default values in your [site's `config` file](/getting-started/configuration/).
+These examples use the default values for `publishDir` and `contentDir`; i.e., `public` and `content`, respectively. You can override the default values in your [site's `config` file](/getting-started/configuration/).
 {{% /note %}}
 
 For example, if one of your [sections][] is called `post` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
@@ -149,14 +149,14 @@ Assuming a `baseURL` of `example.com`, the contents of the auto-generated alias
   <head>
     <title>https://example.com/posts/my-intended-url</title>
     <link rel="canonical" href="https://example.com/posts/my-intended-url"/>
-    <meta name=\"robots\" content=\"noindex\">
+    <meta name="robots" content="noindex">
     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     <meta http-equiv="refresh" content="0; url=https://example.com/posts/my-intended-url"/>
   </head>
 </html>
 ```
 
-The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name=\"robots\" content=\"noindex\">` lets search engine bots know they they should not crawl and index your new alias page.
+The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name="robots" content="noindex">` lets search engine bots know they they should not crawl and index your new alias page.
 
 ### Customize 
 You may customize this alias page by creating an `alias.html` template in the
index 6300c8e917e1be12bd9bb307a990caeda951f040..9940c47b7cdfef0389faf1f25fc491837ca51fdb 100644 (file)
@@ -1,18 +1,18 @@
 ---
 title: lang.NumFmt
-description: "Formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters."
+description: "Formats a number with a given precision using the requested `negative`, `decimal`, and `grouping` options. The `options` parameter is a string consisting of `<negative> <decimal> <grouping>`."
 godocref: ""
 workson: []
 date: 2017-02-01
 publishdate: 2017-02-01
-lastmod: 2017-02-01
+lastmod: 2017-08-21
 categories: [functions]
 #tags: [numbers]
 menu:
   docs:
     parent: "functions"
 toc: false
-signature: ["lang.NumFmt <decimal> <grouping> <negative> <precision> <number>"]
+signature: ["lang.NumFmt PRECISION NUMBER [OPTIONS]"]
 workson: []
 hugoversion:
 relatedfuncs: []
@@ -27,8 +27,9 @@ The default options value is `- . ,`.
 Numbers greater than or equal to 5 are rounded up. For example, if precision is set to `0`, `1.5` becomes `2`, and `1.4` becomes `1`.
 
 ```
-{{ lang.NumFmt "," "." "-" 2 12345.6789 }} → 12.345,68
-{{ lang.NumFmt "." "" "-" 6 -12345.6789 }} → -12345.678900
-{{ lang.NumFmt "." "," "-" 0 -12345.6789 }} → -12,346
-{{ -98765.4321 | lang.NumFmt "." "," "-" 2 }} → -98,765.43
+{{ lang.NumFmt 2 12345.6789 }} → 12,345.68
+{{ lang.NumFmt 2 12345.6789 "- , ." }} → 12.345,68
+{{ lang.NumFmt 0 -12345.6789 "- . ," }} → -12,346
+{{ lang.NumFmt 6 -12345.6789 "- ." }} → -12345.678900
+{{ -98765.4321 | lang.NumFmt 2 }} → -98,765.43
 ```
index bcb136f8662264d8cee38d9b17ac86af2c642118..8e72602b90ee1ed8d2927fdb899e836e451ab7b0 100644 (file)
@@ -15,7 +15,7 @@ workson: []
 hugoversion:
 relatedfuncs: []
 deprecated: false
-aliases: [/functions/countrunes/,/functions/countwords/]
+aliases: [/functions/countrunes/]
 ---
 
 In contrast with `countwords` function, which counts every word in a string, the `countrunes` function determines the number of runes in the content and excludes any whitespace. This has specific utility if you are dealing with CJK-like languages.
index 6375ad738e72f91d3dd12634f6639ee39be4d2c1..9a53473ec58f4c8d52b6f521b4813767c3179b72 100644 (file)
@@ -31,35 +31,3 @@ There are 6 basic mathematical operators that can be used in Hugo templates:
 | `mul`    | Multiplies two integers. | `{{mul 2 3}}` &rarr; 6        |
 | `sub`    | Subtracts two integers.  | `{{sub 3 2}}` &rarr; 1        |
 
-## Use `add` with Strings
-
-You can also use the `add` function with strings. You may like this functionality in many use cases, including creating new variables by combining page- or site-level variables with other strings.
-
-For example, social media sharing with [Twitter Cards][cards] requires the following `meta` link in your site's `<head>` to display Twitter's ["Summary Card with Large Image"][twtsummary]:
-
-```
-<meta name="twitter:image" content="https://example.com/images/my-twitter-image.jpg">
-```
-
-Let's assume you have an `image` field in the front matter of each of your content files:
-
-```
----
-title: My Post
-image: my-post-image.jpg
----
-```
-
-You can then concatenate the `image` value (string) with the path to your `images` directory in `static` and leverage a URL-related templating function for increased flexibility:
-
-{{< code file="partials/head/twitter-card.html" >}}
-{{$socialimage := add "images/" .Params.image}}
-<meta name="twitter:image" content="{{ $socialimage | absURL }}">
-{{< /code >}}
-
-{{% note %}}
-The `add` example above makes use of the [`absURL` function](/functions/absurl/). `absURL` and its relative companion `relURL` is the recommended way to construct URLs in Hugo.
-{{% /note %}}
-
-[cards]: https://dev.twitter.com/cards/overview
-[twtsummary]: https://dev.twitter.com/cards/types/summary-large-image
\ No newline at end of file
index 46cad2a2bbe72e350ba7848b3bbdc8432d1d286b..6485de4ec5bfd3b60c1ed0acf0c97f0772c4792a 100644 (file)
@@ -388,10 +388,10 @@ C:\Hugo\Sites> hugo new site example.com
 You should now have a directory at `C:\Hugo\Sites\example.com`. Change into that directory and list the contents. You should get output similar to the following:
 
 ```
-C:\Hugo\Sites&gt;cd example.com
-C:\Hugo\Sites\example.com&gt;dir
-&nbsp;Directory of C:\hugo\sites\example.com
-&nbsp;
+C:\Hugo\Sitescd example.com
+C:\Hugo\Sites\example.comdir
+Directory of C:\hugo\sites\example.com
+
 04/13/2015  10:44 PM    <DIR>          .
 04/13/2015  10:44 PM    <DIR>          ..
 04/13/2015  10:44 PM    <DIR>          archetypes
@@ -459,7 +459,7 @@ See the [related discussion in the Hugo forums][redhatforum].
 
 ## Upgrade Hugo
 
-Upgrading Hugo is as easy as downloading and replacing the executable you’ve placed in your `PATH`.
+Upgrading Hugo is as easy as downloading and replacing the executable you’ve placed in your `PATH` or run `brew upgrade hugo` if using Homebrew.
 
 ## Install Pygments (Optional)
 
@@ -481,7 +481,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp
 [installgit]: http://git-scm.com/
 [installgo]: https://golang.org/dl/
 [Path Editor]: https://patheditor2.codeplex.com/
-[pygments]: https://pygments.org
+[pygments]: http://pygments.org
 [quickstart]: /getting-started/quick-start/
 [redhatforum]: https://discourse.gohugo.io/t/solved-fedora-copr-repository-out-of-service/2491
 [releases]: https://github.com/gohugoio/hugo/releases
diff --git a/content/hosting-and-deployment/deployment-with-nanobox.md b/content/hosting-and-deployment/deployment-with-nanobox.md
new file mode 100644 (file)
index 0000000..c318155
--- /dev/null
@@ -0,0 +1,247 @@
+---
+title: Host-Agnostic Deploys with Nanobox
+linktitle: Host-Agnostic Deploys with Nanobox
+description: Easily deploy Hugo to AWS, DigitalOcean, Google, Azure, and more...
+date: 2017-08-24
+publishdate: 2017-08-24
+lastmod: 2017-08-24
+categories: [hosting and deployment]
+#tags: [nanobox,deployment,hosting,aws,digitalocean,azure,google,linode]
+authors: [Steve Domino]
+menu:
+  docs:
+    parent: "hosting-and-deployment"
+    weight: 05
+weight: 05
+sections_weight: 05
+draft: false
+aliases: [/tutorials/deployment-with-nanobox/]
+toc: true
+---
+
+![hugo with nanobox](/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png)
+
+## Before You Begin
+
+Nanobox provides an entire end-to-end workflow for developing and deploying applications. Using Nanobox to deploy also means you'll use it to develop your application.
+
+{{% note %}}
+If you're already using Nanobox and just need deployment instructions, you can skip to [Deploying Hugo with Nanobox](#deploying-hugo-with-nanobox)
+{{% /note %}}
+
+
+## What You'll Need
+
+With Nanobox you don't need to worry about having Golang or Hugo installed. They'll be installed as part of the development environment created for you.
+
+To get started you'll just need the following three items:
+
+* [A Nanobox Account](https://nanobox.io) - Signup is free
+* [Nanobox Desktop](https://dashboard.nanobox.io/download) - The free desktop development tool
+* An account with a hosting provider such as:
+  - [AWS](https://aws.amazon.com/)
+  - [DigitalOcean](https://www.digitalocean.com/)
+  - [Linode](https://www.linode.com/)
+  - Azure (coming)
+  - Google (coming)
+  - [Roll Your Own](https://docs.nanobox.io/providers/create/)
+
+### Before We Begin
+
+There are a few things to get out of the way before diving into the guide. To deploy, you'll need to make sure you have connected a host account to your Nanobox account, and launched a new application.
+
+#### Connect a Host Account
+
+Nanobox lets you choose where to host your application (AWS, DigitalOcean, Google, Azure, etc.). In the [Hosting Accounts](https://dashboard.nanobox.io/provider_accounts) section of your Nanobox dashboard [link your Nanobox account with your host](https://docs.nanobox.io/providers/hosting-accounts/).
+
+#### Launch a New Application on Nanobox
+
+[Launching a new app on Nanobox](https://docs.nanobox.io/workflow/launch-app/) is very simple. Navigate to [Launch New App](https://dashboard.nanobox.io/apps/new) in the dashboard, and follow the steps there. You'll be asked to name your app, and select a host and region.
+
+With those out of the way you're ready to get started!
+
+
+## Getting Started
+
+{{% note %}}
+If you already have a functioning Hugo app, you can skip to [Configure Hugo to run with Nanobox](#configure-hugo-to-run-with-nanobox)
+{{% /note %}}
+
+To get started, all you'll need an empty project directory. Create a directory wherever you want your application to live and `cd` into it:
+
+`mkdir path/to/project && cd path/to/project`
+
+### Configure Hugo to run with Nanobox
+
+Nanobox uses a simple config file known as a [boxfile.yml](https://docs.nanobox.io/boxfile/) to describe your application's infrastructure. In the root of your project add the following `boxfile.yml`:
+
+{{< code file="boxfile.yml" >}}
+run.config:
+
+  # use the static engine
+  engine: static
+  engine.config:
+
+    # tell the engine where to serve static assets from
+    rel_dir: public
+
+  # enable file watching for live reload
+  fs_watch: true
+
+  # install hugo
+  extra_steps:
+    - bash ./install.sh
+
+deploy.config:
+
+  # generate site on deploy
+  extra_steps:
+    - hugo
+
+{{< /code >}}
+
+{{% note %}}
+If you already have a functioning Hugo app, which should now be configured, you can skip to [Deploying Hugo with Nanobox](#deploying-hugo-with-nanobox).
+{{% /note %}}
+
+### Installing Hugo
+
+Nanobox uses Docker to create instant, isolated, development environments. Because of this, you'll need to make sure that during development you have Hugo available.
+
+Do this by add a custom install script at the root of your project that will install Hugo automatically for you:
+
+{{< code file="install.sh" >}}
+
+#!/bin/bash
+
+if [[ ! -f /data/bin/hugo ]]; then
+  cd /tmp
+  wget https://github.com/gohugoio/hugo/releases/download/v0.25.1/hugo_0.25.1_Linux-64bit.tar.gz
+  tar -xzf hugo_0.25.1_Linux-64bit.tar.gz
+  mv hugo /data/bin/hugo
+  cd -
+  rm -rf /tmp/*
+fi
+
+{{< /code >}}
+
+{{% note %}}
+If the install script fails during `nanobox run` you may need to make it executable with `chmod +x install.sh`
+{{% /note %}}
+
+### Generating a New Hugo App
+
+You'll generate your new application from inside a Nanobox console (this is why you don't need to worry about having Golang or Hugo installed).
+
+Run the following command to drop into a Nanobox console (inside the VM) where your codebase is mounted:
+
+```
+nanobox run
+```
+
+![nanobox run](/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png)
+
+Once inside here use the following steps to create a new Hugo application:
+
+```
+# cd into the /tmp dir to create an app
+cd /tmp
+
+# generate the hugo app
+hugo new site app
+
+# cd back into the /app dir
+cd -
+
+# copy the generated app into the project
+shopt -s dotglob
+cp -a /tmp/app/* .
+```
+
+### Install a theme
+
+`cd` into the `themes` directory and clone the `nanobox-hugo-theme` repo:
+
+```
+cd themes
+git clone https://github.com/sdomino/nanobox-hugo-theme
+```
+
+To use the theme *either* copy the entire `config.toml` that comes with the theme, or just add the theme to your existing `config.toml`
+
+```
+# copy the config.toml that comes with the theme
+cp ./themes/nanobox-hugo-theme/config.toml config.toml
+
+# or, add it to your existing config.toml
+theme = "nanobox-hugo-theme"
+```
+
+{{% note %}}
+It is not intended that you use the `nanobox-hugo-theme` as your actual theme. It's simply a theme to start with and should be replaced.
+{{% /note %}}
+
+### View Your App
+
+To view your application simply run the following command from a Nanobox console:
+
+```
+hugo server --bind="0.0.0.0" --baseUrl=$APP_IP
+```
+
+![hugo server](/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png)
+
+With that you should be able to visit your app at the given IP:1313 address
+
+{{% note %}}
+You can [add a custom DNS alias](https://docs.nanobox.io/cli/dns/#add) to make it easier to access your app. Run `nanobox dns add local hugo.dev`. After starting your server, visit your app at [hugo.dev:1313](http://hugo.dev:1313)
+{{% /note %}}
+
+### Develop, Develop, Develop
+
+{{% note %}}
+IMPORTANT: One issue we are aware of, and actively investigating, is livereload. Currently, livereload does not work when developing Hugo applications with Nanobox.
+{{% /note %}}
+
+With Hugo installed you're ready to go. Develop Hugo like you would normally (using all the generators, etc.). Once your app is ready to deploy, run `hugo` to generate your static assets and get ready to deploy!
+
+
+## Deploying Hugo with Nanobox
+
+{{% note %}}
+If you haven't already, make sure to [connect a hosting account](#connect-a-host-account) to your Nanobox account, and [launch a new application](#launch-a-new-application-on-nanobox) in the Dashboard.
+{{% /note %}}
+
+To deploy your application to Nanobox you simply need to [link your local codebase](https://docs.nanobox.io/workflow/deploy-code/#add-your-live-app-as-a-remote) to an application you've created on Nanobox. That is done with the following command:
+
+```
+nanobox remote add <your-app-name>
+```
+
+{{% note %}}
+You may be prompted to login using your ***Nanobox credentials*** at this time
+{{% /note %}}
+
+### Stage Your Application (optional)
+
+Nanobox gives you the ability to [simulate your production environment locally](https://docs.nanobox.io/workflow/deploy-code/#preview-locally). While staging is optional it's always recommended, so there's no reason not to!
+
+To stage your app simply run:
+
+```
+nanobox deploy dry-run
+```
+
+Now visit your application with the IP address provided.
+
+![nanobox deploy dry-run](/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png)
+
+### Deploy Your Application
+
+Once everything checks out and you're [ready to deploy](https://docs.nanobox.io/workflow/deploy-code/#deploy-to-production), simply run:
+
+```
+nanobox deploy
+```
+
+Within minutes you're Hugo app will be deployed to your host and humming along smoothly. That's it!
index 0d18da711e3cfba49f218ed9e850ec6db1b2f4cc..509949c291ba8ee930ef4b5efcbb29f6a4f3ad62 100644 (file)
@@ -1,12 +1,12 @@
 ---
-title: Deployment with Rysnc
-linktitle: Deployment with Rysnc
+title: Deployment with Rsync
+linktitle: Deployment with Rsync
 description: If you have access to your web host with SSH, you can use a simple rsync one-liner to incrementally deploy your entire Hugo website.
 date: 2017-02-01
 publishdate: 2017-02-01
 lastmod: 2017-02-01
 categories: [hosting and deployment]
-#tags: [rysnc,deployment]
+#tags: [rsync,deployment]
 authors: [Adrien Poupin]
 menu:
   docs:
index bd930b3f4d90bf21e9b7140968cdbe318046e3ff..59433a9e790a4e9644557ccd226ba73bbdb75272 100644 (file)
@@ -38,11 +38,10 @@ Make sure your `baseURL` key-value in your [site configuration](/getting-started
 [As described in the GitHub Pages documentation][ghpfromdocs], you can deploy from a folder called `docs/` on your master branch. To effectively use this feature with Hugo, you need to change the Hugo publish directory in your [site's][config] `config.toml` and `config.yaml`, respectively:
 
 ```
-publishDir: docs
+publishDir = "docs"
 ```
-
 ```
-publishDir = "docs"
+publishDir: docs
 ```
 
 After running `hugo`, push your master branch to the remote repository and choose the `docs/` folder as the website source of your repo. Do the following from within your GitHub project:
@@ -217,7 +216,7 @@ cd ..
 ```
 
 
-You can then run `./deploy.sh "Your optional commit message"` to send changes to `<USERNAME>.github.io`. Note that you likely will want to commit changes to your `<YOUR-PROJECDT>` repository as well.
+You can then run `./deploy.sh "Your optional commit message"` to send changes to `<USERNAME>.github.io`. Note that you likely will want to commit changes to your `<YOUR-PROJECT>` repository as well.
 
 That's it! Your personal page should be up and running at `https://yourusername.github.io` within a couple minutes.
 
index 0b852dde351f434554a960e6b53ffe10a2b4293c..00f2cd18d7ebf65d8fcfebc70953b2c1da577a28 100644 (file)
@@ -38,7 +38,11 @@ cd your-hugo-site
 In the root directory of your Hugo site, create a `.gitlab-ci.yml` file. The `.gitlab-ci.yml` configures the GitLab CI on how to build your page. Simply add the content below.
 
 {{< code file="gitlab-ci.yml" >}}
-image: publysher/hugo
+image: monachus/hugo
+
+before_script:
+  - git submodule init
+  - git submodule update --force
 
 pages:
   script:
@@ -70,7 +74,7 @@ git push -u origin master
 
 ## Wait for Your Page to Build
 
-That's it! You can now follow the CI agent building your page at https://gitlab.com/<YourUsername>/<your-hugo-site>/pipelines.
+That's it! You can now follow the CI agent building your page at `https://gitlab.com/<YourUsername>/<your-hugo-site>/pipelines`.
 
 After the build has passed, your new website is available at `https://<YourUsername>.gitlab.io/<your-hugo-site>/`.
 
index 012c45d2c36fdc2110c3bd4d4d578979459d4b4e..ce10c4a5c9736e0bffd78dd8e8e3b933d0fb892d 100644 (file)
@@ -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].
 
-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
@@ -73,6 +73,22 @@ Your simple configuration should now look similar to the following:
 
 ![Screenshot of 3-step, basic continuous deployment setup with a new Hugo site on Netlify](/images/hosting-and-deployment/hosting-on-netlify/netlify-create-new-site-step-3.jpg)
 
+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.
+
+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:.
 
 ![Animated gif of deploying a site to Netlify, including the terminal read out for the build.](/images/hosting-and-deployment/hosting-on-netlify/netlify-deploying-site.gif)
index 76c39094e7ddb83ff01635cfb7652644a5109b7e..369d0b22150b4d524236b2526aef350efae23a06 100644 (file)
@@ -66,7 +66,7 @@ Also note that this is a template for the home page, so the full `Page` with its
 
 
 ## 3. Add Template For the _redirects File 
-Add `layouts/index.redirects`:
+Add `layouts/index.redir`:
 ```bash
 # Netlify redirects. See https://www.netlify.com/docs/redirects/
 {{  range $p := .Site.Pages -}}
index b27b1a33d98a80a473c780219ca2e688921c2354..9433dc9f59e908ebbb9154ef7b40e40c295b5c0e 100644 (file)
@@ -31,8 +31,8 @@ The [lookup order][lookup] for base templates is as follows:
 4. `/themes/<THEME>/layouts/<TYPE>/baseof.html`
 5. `/layouts/section/baseof.html`
 6. `/themes/<THEME>/layouts/section/baseof.html`
-7. `/layouts/_default/post-baseof.html`
-8. `/themes/<THEME>/layouts/_default/post-baseof.html`
+7. `/layouts/_default/<TYPE>-baseof.html`
+8. `/themes/<THEME>/layouts/_default/<TYPE>-baseof.html`
 9. `/layouts/_default/baseof.html`
 10. `/themes/<THEME>/layouts/_default/baseof.html`
 
index 022e95c3c5fb71e4073aa57c898cca08587f466a..3d43913d4656c29ea39b66eef677f5a2d511a796 100644 (file)
@@ -118,18 +118,14 @@ You can then render your custom Disqus partial template as follows:
 {{ partial "disqus.html" . }}
 ```
 
-```
-_internal/_default/robots.txt
-_internal/_default/rss.xml
-_internal/_default/sitemap.xml
-_internal/_default/sitemapindex.xml
+## The Internal Templates
+
+* `_internal/disqus.html`
+* `_internal/google_news.html`
+* `_internal/google_analytics.html`
+* `_internal/google_analytics_async.html`
+* `_internal/opengraph.html`
+* `_internal/pagination.html`
+* `_internal/schema.html`
+* `_internal/twitter_cards.html`
 
-_internal/disqus.html
-_internal/google_news.html
-_internal/google_analytics.html
-_internal/google_analytics_async.html
-_internal/opengraph.html
-_internal/pagination.html
-_internal/schema.html
-_internal/twitter_cards.html
-```
index 647d580c4b656618a6a0b065ccc40aa06668c6a5..08ef0272e70688684cb54b371fcb6cc7c25334b0 100644 (file)
@@ -110,7 +110,7 @@ There are more boolean operators than those listed in the Hugo docs in the [Gola
 When including another template, you will pass to it the data it will be
 able to access. To pass along the current context, please remember to
 include a trailing dot. The templates location will always be starting at
-the `/layout/` directory within Hugo.
+the `/layouts/` directory within Hugo.
 
 ### Template and Partial Examples
 
index 585d538d844907a8aa6e13accf0310b2e48f6a52..65642ae61f517cddedf3f56220a10a8e283516e5 100644 (file)
@@ -119,7 +119,7 @@ You could then include the following as part of your shortcode templating:
 
 ```
 {{ if .IsNamedParams }}
-<img src="{{.Get "src" alt="">
+<img src="{{.Get "src" }}" alt="">
 {{ else }}
 <img src="{{.Get 0}}" alt="">
 {{ end }}.
@@ -345,4 +345,4 @@ More shortcode examples can be found in the [shortcodes directory for spf13.com]
 [spfscs]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes "See more examples of shortcodes by visiting the shortcode directory of the source for spf13.com, the blog of Hugo's creator, Steve Francia."
 [templates]: /templates/ "The templates section of the Hugo docs."
 [vimeoexample]: #single-flexible-example-vimeo
-[youtubeshortcode]: /content-management/shortcodes/#youtube "See how to use Hugo's built-in YouTube shortcode."
\ No newline at end of file
+[youtubeshortcode]: /content-management/shortcodes/#youtube "See how to use Hugo's built-in YouTube shortcode."
index 20942e5d520a939b58a5e258769b0b3b43526e48..cb86b36aa0c8a68e10cdcd1163274dc58e212bb1 100644 (file)
@@ -25,7 +25,7 @@ You can specify a [content's `type`][content type] and `layout` in a single cont
 Hugo assumes your content section and content type are the same unless you tell Hugo otherwise by providing a `type` directly in the front matter of a content file. This is why #1 and #3 come before #2 and #4, respectively, in the following lookup order. Values in angle brackets (`<>`) are variable.
 
 1. `/layouts/<TYPE>/<LAYOUT>.html`
-2. `/layouts/<SECTION>>/<LAYOUT>.html`
+2. `/layouts/<SECTION>/<LAYOUT>.html`
 3. `/layouts/<TYPE>/single.html`
 4. `/layouts/<SECTION>/single.html`
 5. `/layouts/_default/single.html`
@@ -102,4 +102,4 @@ To easily generate new instances of a content type (e.g., new `.md` files in a s
 [section]: /content-management/sections/
 [site variables]: /variables/site/
 [spf13]: http://spf13.com/
-[`with`]: /functions/with/
\ No newline at end of file
+[`with`]: /functions/with/
index 6e5b6c40fc7682398cc5dc74ee45ba00c06eff4b..5cb0f3346d5164ea09c8323d9cd903e04e876745 100644 (file)
@@ -143,7 +143,7 @@ Taxonomies can be ordered by either alphabetical key or by the number of content
 ```
 <ul>
   {{ $data := .Data }}
-  {{ range $key, $value := .Data.Taxonomy.Alphabetical }}
+  {{ range $key, $value := .Data.Terms.Alphabetical }}
   <li><a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}"> {{ $value.Name }} </a> {{ $value.Count }} </li>
   {{ end }}
 </ul>
@@ -154,7 +154,7 @@ Taxonomies can be ordered by either alphabetical key or by the number of content
 ```
 <ul>
   {{ $data := .Data }}
-  {{ range $key, $value := .Data.Taxonomy.ByCount }}
+  {{ range $key, $value := .Data.Terms.ByCount }}
   <li><a href="{{ $.Site.LanguagePrefix }}/{{ $data.Plural }}/{{ $value.Name | urlize }}"> {{ $value.Name }} </a> {{ $value.Count }} </li>
   {{ end }}
 </ul>
index 0383636a197783b29d1073c8b2b59ceb4cf6e6cf..c8e003bd1d7d8652852e38db521ef47fa2293689 100644 (file)
@@ -27,7 +27,7 @@ The following are common use cases for content views:
 
 ## Create a Content View
 
-To create a new view, create a template in each of your different content type directories with the view name. The following example contains an "li" view and a "summary" view for the `post` and `project` content types. As you can see, these sit next to the [single content view][single] template, `single.html. You can even provide a specific view for a given type and continue to use the `_default/single.html` for the primary view.
+To create a new view, create a template in each of your different content type directories with the view name. The following example contains an "li" view and a "summary" view for the `post` and `project` content types. As you can see, these sit next to the [single content view][single] template, `single.html`. You can even provide a specific view for a given type and continue to use the `_default/single.html` for the primary view.
 
 ```
   ▾ layouts/
@@ -118,4 +118,4 @@ Continuing on the previous example, we can change our render function to use a s
 [spfsourcesection]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/section.html
 [spfsourcesummary]: https://github.com/spf13/spf13.com/blob/master/layouts/_default/summary.html
 [summaries]: /content-management/summaries/
-[taxonomylists]: /templates/taxonomy-templates/
\ No newline at end of file
+[taxonomylists]: /templates/taxonomy-templates/
index 474b7b036ff56e67df7b1dabb1996e938dabe216..4d2be5b714d952fcb1529528020c06c5323bdac1 100644 (file)
@@ -79,7 +79,7 @@ Hugo applies the decided theme first and then applies anything that is in the lo
 
 ### Command Line
 
-There are two different approaches to using a theme with your Hugo website: via the Hugo CLI or as part of your
+There are two different approaches to using a theme with your Hugo website: via the Hugo CLI or as part of your [site configuration file][config].
 
 To change a theme via the Hugo CLI, you can pass the `-t` [flag][] when building your site:
 
@@ -109,4 +109,4 @@ The `themename` in the above examples must match the name of the specific theme
 [flag]: /getting-started/usage/ "See the full list of flags in Hugo's basic usage."
 [install]: /getting-started/installing/
 [config]: /getting-started/configuration/  "Learn how to customize your Hugo website configuration file in yaml, toml, or json."
-[themesrepo]: https://github.com/gohugoio/hugoThemes
\ No newline at end of file
+[themesrepo]: https://github.com/gohugoio/hugoThemes
index e6fb4de8281c4b30b5604f5a99324a04cd961d6b..d927e0bf2f74bf03e9cb5b1553703885a8cb1fd0 100644 (file)
@@ -203,7 +203,7 @@ body {
 Here is the same example but with triple back ticks to denote the fenced code block:
 
 {{< nohighlight >}}
-```
+```css
 body {
   font-family: "Noto Sans", sans-serif;
 }
@@ -234,4 +234,4 @@ Please see individual libraries' documentation for how to implement each of the
 [Rainbow]: http://craig.is/making/rainbows
 [Syntax Highlighter]: http://alexgorbatchev.com/SyntaxHighlighter/
 [Google Prettify]: https://github.com/google/code-prettify
-[Yandex]: http://yandex.ru/
\ No newline at end of file
+[Yandex]: http://yandex.ru/
diff --git a/static/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png b/static/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png
new file mode 100644 (file)
index 0000000..b37b2c3
Binary files /dev/null and b/static/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png differ
diff --git a/static/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png b/static/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png
new file mode 100644 (file)
index 0000000..8b889b3
Binary files /dev/null and b/static/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png differ
diff --git a/static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png b/static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png
new file mode 100644 (file)
index 0000000..55c4383
Binary files /dev/null and b/static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png differ
diff --git a/static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png b/static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png
new file mode 100644 (file)
index 0000000..3432df8
Binary files /dev/null and b/static/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png differ