diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-06-11 22:32:19 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-06-11 22:32:19 +0200 |
commit | e02629f81ab5f817a95cf0ffec8f0aa2016294aa (patch) | |
tree | f71600b94849c70165c12d6a84d0b5db9d860d66 /docs/content | |
parent | ed4a345efeaa19eef2c1c6360d22f75c24abc31a (diff) | |
parent | b239595af5a9fc1fc9a1ccc666c3ab06ccc32f04 (diff) |
Merge commit 'b239595af5a9fc1fc9a1ccc666c3ab06ccc32f04'
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/en/about/hugo-and-gdpr.md | 2 | ||||
-rw-r--r-- | docs/content/en/content-management/multilingual.md | 2 | ||||
-rw-r--r-- | docs/content/en/content-management/urls.md | 6 | ||||
-rw-r--r-- | docs/content/en/contribute/development.md | 4 | ||||
-rw-r--r-- | docs/content/en/functions/findRe.md | 4 | ||||
-rw-r--r-- | docs/content/en/functions/format.md | 2 | ||||
-rw-r--r-- | docs/content/en/functions/len.md | 4 | ||||
-rw-r--r-- | docs/content/en/functions/now.md | 2 | ||||
-rw-r--r-- | docs/content/en/functions/replacere.md | 4 | ||||
-rw-r--r-- | docs/content/en/getting-started/configuration.md | 3 | ||||
-rw-r--r-- | docs/content/en/hosting-and-deployment/deployment-with-nanobox.md | 4 | ||||
-rw-r--r-- | docs/content/en/hosting-and-deployment/hosting-on-netlify.md | 2 | ||||
-rw-r--r-- | docs/content/en/news/0.41-relnotes/featured-hugo-41-poster.png | bin | 0 -> 67955 bytes | |||
-rw-r--r-- | docs/content/en/news/0.41-relnotes/index.md | 6 | ||||
-rw-r--r-- | docs/content/en/templates/introduction.md | 8 | ||||
-rw-r--r-- | docs/content/en/templates/lists.md | 10 | ||||
-rw-r--r-- | docs/content/en/variables/shortcodes.md | 3 |
17 files changed, 36 insertions, 30 deletions
diff --git a/docs/content/en/about/hugo-and-gdpr.md b/docs/content/en/about/hugo-and-gdpr.md index ef68d5690..0a95e602d 100644 --- a/docs/content/en/about/hugo-and-gdpr.md +++ b/docs/content/en/about/hugo-and-gdpr.md @@ -23,7 +23,7 @@ toc: true **Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.** - But even static websites can integrate with external services, so from version `0.41`, Hugo provides a `Privacy Config` that covers the relevant built-in templates. + But even static websites can integrate with external services, so from version `0.41`, Hugo provides a **Privacy Config** that covers the relevant built-in templates. Note that: diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index 28a6e4fec..9ac2efee7 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -282,7 +282,7 @@ i18n|MISSING_TRANSLATION|en|wordCount ## Customize Dates -At the time of this writing, Golang does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content: +At the time of this writing, Go does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content: ~~~yaml 1: "janvier" diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md index d33725b72..ae58a6277 100644 --- a/docs/content/en/content-management/urls.md +++ b/docs/content/en/content-management/urls.md @@ -88,7 +88,7 @@ Luckily, redirects can be handled easily with **aliases** in Hugo. ### Example: Aliases -Let's assume you create a new piece of content at `content/posts/my-awesome-blog-post.md`. The content is a revision of your previous post at `content/posts/my-original-url.md`. You can create an `aliases` field in the front matter of your new `my-awesome-blog-post.md` where you can add previous paths. The following examples show how to create this filed in TOML and YAML front matter, respectively. +Let's assume you create a new piece of content at `content/posts/my-awesome-blog-post.md`. The content is a revision of your previous post at `content/posts/my-original-url.md`. You can create an `aliases` field in the front matter of your new `my-awesome-blog-post.md` where you can add previous paths. The following examples show how to create this field in TOML and YAML front matter, respectively. #### TOML Front Matter @@ -188,7 +188,7 @@ content/posts/post-1.md ## Ugly URLs -If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`.. +If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`. If you want a specific piece of content to have an exact URL, you can specify this in the [front matter][] under the `url` key. The following are examples of the same content directory and what the eventual URL structure will be when Hugo runs with its default behavior. @@ -253,7 +253,7 @@ Or, if you are on Windows and do not have `grep` installed: hugo config | FINDSTR /I canon ``` -## Override URLS with Front Matter +## Override URLs with Front Matter In addition to specifying permalink values in your site configuration for different content sections, Hugo provides even more granular control for individual pieces of content. diff --git a/docs/content/en/contribute/development.md b/docs/content/en/contribute/development.md index aafec4110..be2ca4a2b 100644 --- a/docs/content/en/contribute/development.md +++ b/docs/content/en/contribute/development.md @@ -42,7 +42,7 @@ If you are having trouble following the installation guides for Go, check out [G ### Install Go From Source -[Download the latest stable version of Go][godl] and follow the official [Golang installation guide][goinstall]. +[Download the latest stable version of Go][godl] and follow the official [Go installation guide][goinstall]. Once you're finished installing Go, let's confirm everything is working correctly. Open a terminal---or command line under Windows--and type the following: @@ -390,7 +390,7 @@ Thank you for reading through this contribution guide. Hopefully, we will see yo Feel free to [open an issue][newissue] if you think you found a bug or you have a new idea to improve Hugo. We are happy to hear from you. -## Additional References for Learning Git and Golang +## Additional References for Learning Git and Go * [Codecademy's Free "Learn Git" Course][codecademy] (Free) * [Code School and GitHub's "Try Git" Tutorial][trygit] (Free) diff --git a/docs/content/en/functions/findRe.md b/docs/content/en/functions/findRe.md index 23817c575..743c8542b 100644 --- a/docs/content/en/functions/findRe.md +++ b/docs/content/en/functions/findRe.md @@ -35,9 +35,9 @@ You can limit the number of matches in the list with a third parameter. The foll ``` {{% note %}} -Hugo uses Golang's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax). +Hugo uses Go's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax). -If you are just learning RegEx, or at least Golang's flavor, you can practice pattern matching in the browser at <https://regex101.com/>. +If you are just learning RegEx, or at least Go's flavor, you can practice pattern matching in the browser at <https://regex101.com/>. {{% /note %}} diff --git a/docs/content/en/functions/format.md b/docs/content/en/functions/format.md index 1d498cc3b..fef4d85da 100644 --- a/docs/content/en/functions/format.md +++ b/docs/content/en/functions/format.md @@ -31,7 +31,7 @@ Assuming a key-value of `date: 2017-03-03` in a content file's front matter, you {{ .PublishDate.Format "January 2, 2006" }} => March 3, 2017 ``` -For formatting *any* string representations of dates defined in your front matter, see the [`dateFormat` function][dateFormat], which will still leverage the Golang layout string explained below but uses a slightly different syntax. +For formatting *any* string representations of dates defined in your front matter, see the [`dateFormat` function][dateFormat], which will still leverage the Go layout string explained below but uses a slightly different syntax. ## Go's Layout String diff --git a/docs/content/en/functions/len.md b/docs/content/en/functions/len.md index b8e380e49..e054ed5f8 100644 --- a/docs/content/en/functions/len.md +++ b/docs/content/en/functions/len.md @@ -17,7 +17,7 @@ toc: false aliases: [] --- -`len` is a built-in function in Golang that returns the length of a variable according to its type. From the Golang documentation: +`len` is a built-in function in Go that returns the length of a variable according to its type. From the Go documentation: > Array: the number of elements in v. > @@ -57,4 +57,4 @@ Note the use of `.RegularPages`, a [site variable][] that counts all regular con [list templates]: /templates/lists/ [section]: /content-management/sections/ [site variable]: /variables/site/ -[`where`]: /functions/where/
\ No newline at end of file +[`where`]: /functions/where/ diff --git a/docs/content/en/functions/now.md b/docs/content/en/functions/now.md index 8c706835b..ae8213d05 100644 --- a/docs/content/en/functions/now.md +++ b/docs/content/en/functions/now.md @@ -37,7 +37,7 @@ would produce the following: </div> ``` -The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Golang's layout string. +The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Go's layout string. {{% note %}} Older Hugo themes may still be using the obsolete Page’s `.Now` (uppercase with leading dot), which causes build error that looks like the following: diff --git a/docs/content/en/functions/replacere.md b/docs/content/en/functions/replacere.md index 0571c92b2..9c2778b5f 100644 --- a/docs/content/en/functions/replacere.md +++ b/docs/content/en/functions/replacere.md @@ -25,7 +25,7 @@ aliases: [] ``` {{% note %}} -Hugo uses Golang's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax). +Hugo uses Go's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax). -If you are just learning RegEx, or at least Golang's flavor, you can practice pattern matching in the browser at <https://regex101.com/>. +If you are just learning RegEx, or at least Go's flavor, you can practice pattern matching in the browser at <https://regex101.com/>. {{% /note %}} diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index 518e4a2cc..ea21fa5ce 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -210,6 +210,9 @@ theme ("") themesDir ("themes") : The directory where Hugo reads the themes from. +timeout (10000) +: Timeout for generating page contents, in milliseconds (defaults to 10 seconds). *Note:* this is used to bail out of recursive content generation, if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents) you might need to raise this limit. + title ("") : Site title. diff --git a/docs/content/en/hosting-and-deployment/deployment-with-nanobox.md b/docs/content/en/hosting-and-deployment/deployment-with-nanobox.md index 245e9544a..1ab77c401 100644 --- a/docs/content/en/hosting-and-deployment/deployment-with-nanobox.md +++ b/docs/content/en/hosting-and-deployment/deployment-with-nanobox.md @@ -30,7 +30,7 @@ If you're already using Nanobox and just need deployment instructions, you can s ## 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. +With Nanobox you don't need to worry about having Go 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: @@ -133,7 +133,7 @@ Make sure to check the version of Hugo you have installed and update the install ### Generating a New Hugo App -You'll generate your new application from inside the Nanobox VM (this is why you don't need to worry about having Golang or Hugo installed). +You'll generate your new application from inside the Nanobox VM (this is why you don't need to worry about having Go or Hugo installed). Run the following command to drop into a Nanobox console (inside the VM) where your codebase is mounted: diff --git a/docs/content/en/hosting-and-deployment/hosting-on-netlify.md b/docs/content/en/hosting-and-deployment/hosting-on-netlify.md index fca639fac..f2820a8de 100644 --- a/docs/content/en/hosting-and-deployment/hosting-on-netlify.md +++ b/docs/content/en/hosting-and-deployment/hosting-on-netlify.md @@ -35,7 +35,7 @@ The following examples use GitHub, but other git providers will follow a similar ![Screenshot of the homepage for app.netlify.com, containing links to the most popular hosted git solutions.](/images/hosting-and-deployment/hosting-on-netlify/netlify-signup.jpg) -Selecting GitHub will bring up a typical modal you've seen through other application that use GitHub for authentication. Select "Authorize application." +Selecting GitHub will bring up an authorization modal for authentication. Select "Authorize application." ![Screenshot of the authorization popup for Netlify and GitHub.](/images/hosting-and-deployment/hosting-on-netlify/netlify-first-authorize.jpg) diff --git a/docs/content/en/news/0.41-relnotes/featured-hugo-41-poster.png b/docs/content/en/news/0.41-relnotes/featured-hugo-41-poster.png Binary files differnew file mode 100644 index 000000000..8f752f665 --- /dev/null +++ b/docs/content/en/news/0.41-relnotes/featured-hugo-41-poster.png diff --git a/docs/content/en/news/0.41-relnotes/index.md b/docs/content/en/news/0.41-relnotes/index.md index ab6fbed66..411e373e5 100644 --- a/docs/content/en/news/0.41-relnotes/index.md +++ b/docs/content/en/news/0.41-relnotes/index.md @@ -1,13 +1,13 @@ --- date: 2018-05-25 -title: "0.41" -description: "0.41" +title: "Hugo 0.41: Privacy Configuration for GDPR" +description: "Hugo 0.41 adds a new site configuration section to meet the new General Data Protection Regulation (GDPR)." categories: ["Releases"] --- -In Hugo `0.41` we add a new **Privacy Configuration** section to meet the new regulations in the new **General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation))**. Many have contributed in the discussion about this, but a special thanks to [@onedrawingperday](https://github.com/onedrawingperday), [@jhabdas](https://github.com/jhabdas), and [@it-gro](https://github.com/it-gro). +In Hugo `0.41` we add a new **Privacy Configuration** section to meet the new regulations in the new **General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation))**. Many have contributed work on this project, but a special thanks to [@onedrawingperday](https://github.com/onedrawingperday), [@jhabdas](https://github.com/jhabdas), and [@it-gro](https://github.com/it-gro). > You can read more about the new Privacy Config [here](https://gohugo.io/about/hugo-and-gdpr/). diff --git a/docs/content/en/templates/introduction.md b/docs/content/en/templates/introduction.md index 32df11297..f13378ef0 100644 --- a/docs/content/en/templates/introduction.md +++ b/docs/content/en/templates/introduction.md @@ -29,7 +29,7 @@ Go templates provide an extremely simple template language that adheres to the b ## Basic Syntax -Golang templates are HTML files with the addition of [variables][variables] and [functions][functions]. Golang template variables and functions are accessible within `{{ }}`. +Go templates are HTML files with the addition of [variables][variables] and [functions][functions]. Go template variables and functions are accessible within `{{ }}`. ### Access a Predefined Variable @@ -104,7 +104,7 @@ Go templates only ship with a few basic functions but also provide a mechanism f Note that both examples make use of Go template's [math functions][]. {{% note "Additional Boolean Operators" %}} -There are more boolean operators than those listed in the Hugo docs in the [Golang template documentation](http://golang.org/pkg/text/template/#hdr-Functions). +There are more boolean operators than those listed in the Hugo docs in the [Go template documentation](http://golang.org/pkg/text/template/#hdr-Functions). {{% /note %}} ## Includes @@ -526,8 +526,8 @@ Go allows you to do more than what's shown here. Using Hugo's [`where` function] [first]: /functions/first/ [front matter]: /content-management/front-matter/ [functions]: /functions/ "See the full list of Hugo's templating functions with a quick start reference guide and basic and advanced examples." -[Go html/template]: http://golang.org/pkg/html/template/ "Godocs references for Golang's html templating" -[gohtmltemplate]: http://golang.org/pkg/html/template/ "Godocs references for Golang's html templating" +[Go html/template]: http://golang.org/pkg/html/template/ "Godocs references for Go's html templating" +[gohtmltemplate]: http://golang.org/pkg/html/template/ "Godocs references for Go's html templating" [index]: /functions/index/ [math functions]: /functions/math/ [partials]: /templates/partials/ "Link to the partial templates page inside of the templating section of the Hugo docs" diff --git a/docs/content/en/templates/lists.md b/docs/content/en/templates/lists.md index d2621a929..431407e43 100644 --- a/docs/content/en/templates/lists.md +++ b/docs/content/en/templates/lists.md @@ -77,12 +77,12 @@ Using the above example, let's assume you have the following in `content/post/_i {{< code file="content/post/_index.md" >}} --- -title: My Golang Journey +title: My Go Journey date: 2017-03-23 publishdate: 2017-03-24 --- -I decided to start learning Golang in March 2017. +I decided to start learning Go in March 2017. Follow my journey through this new blog. {{< /code >}} @@ -118,9 +118,9 @@ This above will output the following HTML: <main> <article> <header> - <h1>My Golang Journey</h1> + <h1>My Go Journey</h1> </header> - <p>I decided to start learning Golang in March 2017.</p> + <p>I decided to start learning Go in March 2017.</p> <p>Follow my journey through this new blog.</p> </article> <ul> @@ -457,7 +457,7 @@ In the above example, you may want `{{.Title}}` to point the `title` field you h ### By Page Parameter in Date Format -The following template takes grouping by `date` a step further and uses Golang's layout string. See the [`Format` function][] for more examples of how to use Golang's layout string to format dates in Hugo. +The following template takes grouping by `date` a step further and uses Go's layout string. See the [`Format` function][] for more examples of how to use Go's layout string to format dates in Hugo. {{< code file="layouts/partials/by-page-param-as-date.html" >}} <!-- Groups content by month according to the "param_key" field in front matter --> diff --git a/docs/content/en/variables/shortcodes.md b/docs/content/en/variables/shortcodes.md index b194eb7db..3484df7a0 100644 --- a/docs/content/en/variables/shortcodes.md +++ b/docs/content/en/variables/shortcodes.md @@ -20,6 +20,9 @@ toc: false [Shortcodes][shortcodes] have access to parameters delimited in the shortcode declaration via [`.Get`][getfunction], page- and site-level variables, and also the following shortcode-specific fields: +.Ordinal +: Zero-based ordinal in relation to its parent. If the parent is the page itself, this ordinal will represent the position of this shortcode in the page content. + .Parent : provides access to the parent shortcode context in nested shortcodes. This can be very useful for inheritance of common shortcode parameters from the root. |