ref: 67f3aa72cf9aaf3d6e447fa6bc12de704d46adf7
parent: 0947cf958358e5a45b4f605e2a5b2504896fa360
parent: 2e711a28c71e8667258e5ab824f9b9a71c261b0a
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Sun Dec 15 05:37:36 EST 2019
Merge commit '2e711a28c71e8667258e5ab824f9b9a71c261b0a'
--- a/docs/README.md
+++ b/docs/README.md
@@ -13,16 +13,16 @@
*Pull requests shall **only** contain changes to the actual documentation. However, changes on the code base of Hugo **and** the documentation shall be a single, atomic pull request in the [hugo](https://github.com/gohugoio/hugo) repository.*
-Spelling fixes are most welcomed, and if you want to contribute longer sections to the documentation, it would be great if you had these in mind when writing:
+Spelling fixes are most welcomed, and if you want to contribute longer sections to the documentation, it would be great if you had the following criteria in mind when writing:
* Short is good. People go to the library to read novels. If there is more than one way to _do a thing_ in Hugo, describe the current _best practice_ (avoid "… but you can also do …" and "… in older versions of Hugo you had to …".
-* For examples, try to find short snippets that teaches people about the concept. If the example is also useful as-is (copy and paste), then great, but don't list long and similar examples just so people can use them on their sites.
-* Hugo has users from all over the world, so an easy to understand and [simple English](https://simple.wikipedia.org/wiki/Basic_English) is good.
+* For example, try to find short snippets that teaches people about the concept. If the example is also useful as-is (copy and paste), then great. Don't list long and similar examples just so people can use them on their sites.
+* Hugo has users from all over the world, so easy to understand and [simple English](https://simple.wikipedia.org/wiki/Basic_English) is good.
## Branches
* The `master` branch is where the site is automatically built from, and is the place to put changes relevant to the current Hugo version.
-* The `next` branch is where we store changes that is related to the next Hugo release. This can be previewed here: https://next--gohugoio.netlify.com/
+* The `next` branch is where we store changes that are related to the next Hugo release. This can be previewed here: https://next--gohugoio.netlify.com/
## Build
--- a/docs/content/en/_index.md
+++ b/docs/content/en/_index.md
@@ -43,7 +43,7 @@
link: templates/
color_classes: bg-primary-color-light black
image: /images/home-page-templating-example.png
- copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex. If you prefer Jade/Pug-like syntax, you can also use Amber, Ace, or any combination of the three."
+ copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex."
---
Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.
--- a/docs/content/en/content-management/image-processing/index.md
+++ b/docs/content/en/content-management/image-processing/index.md
@@ -98,11 +98,12 @@
{{ range $k, $v := .Tags }}
TAG: {{ $k }}: {{ $v }}
{{ end }}
+{{ end }}
```
#### Exif fields
-Data
+Date
: "photo taken" date/time
Lat
--- a/docs/content/en/content-management/syntax-highlighting.md
+++ b/docs/content/en/content-management/syntax-highlighting.md
@@ -74,11 +74,9 @@
case "go":
return strings.Title
case "chicago":
- tc := transform.NewTitleConverter(transform.ChicagoStyle)
- return tc.Title
+ return transform.NewTitleConverter(transform.ChicagoStyle)
default:
- tc := transform.NewTitleConverter(transform.APStyle)
- return tc.Title
+ return transform.NewTitleConverter(transform.APStyle)
}
}
{{< / highlight >}}
@@ -94,13 +92,9 @@
Highlighting in code fences is enabled by default.{{< new-in "0.60.0" >}}
````
-```go-html-template{hl_lines=[3,"5-6"],linenos=true}
-```
-````
-
-````
```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199}
// ... code
+```
````
@@ -122,11 +116,9 @@
case "go":
return strings.Title
case "chicago":
- tc := transform.NewTitleConverter(transform.ChicagoStyle)
- return tc.Title
+ return transform.NewTitleConverter(transform.ChicagoStyle)
default:
- tc := transform.NewTitleConverter(transform.APStyle)
- return tc.Title
+ return transform.NewTitleConverter(transform.APStyle)
}
}
```
--- a/docs/content/en/content-management/toc.md
+++ b/docs/content/en/content-management/toc.md
@@ -18,7 +18,11 @@
---
{{% note "TOC Heading Levels are Fixed" %}}
-Currently, the `{{.TableOfContents}}` [page variable](/variables/page/) does not allow you to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` is going to start at `<h1>` when pulling from `{{.Content}}`.
+
+Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `<nav id="TableOfContents"><ul></ul></nav>` was going to start at `<h1>` when pulling from `{{.Content}}`.
+
+Hugo [v0.60.0](https://github.com/gohugoio/hugo/releases/tag/v0.60.0) made a switch to [Goldmark](https://github.com/yuin/goldmark/) as the default library for Markdown which has improved and configurable implementation of TOC. Take a look at [how to configure TOC](/getting-started/configuration-markup/#table-of-contents) for Goldmark renderer.
+
{{% /note %}}
## Usage
@@ -43,7 +47,7 @@
Hugo will take this Markdown and create a table of contents from `## Introduction`, `## My Heading`, and `### My Subheading` and then store it in the [page variable][pagevars]`.TableOfContents`.
-The built-in `.TableOfContents` variables outputs a `<nav id="TableOfContents">` element with a child `<ul>`, whose child `<li>` elements begin with any `<h1>`'s (i.e., `#` in markdown) inside your content.'
+The built-in `.TableOfContents` variables outputs a `<nav id="TableOfContents">` element with a child `<ul>`, whose child `<li>` elements begin with appropriate HTML headings. See [the available settings](/getting-started/configuration-markup/#table-of-contents) to configure what heading levels you want to include in TOC.
{{% note "Table of contents not available for MMark" %}}
Hugo documents created in the [MMark](/content-management/formats/#mmark) Markdown dialect do not currently display TOCs. TOCs are, however, compatible with all other supported Markdown formats.
--- a/docs/content/en/getting-started/_index.md
+++ b/docs/content/en/getting-started/_index.md
@@ -17,7 +17,8 @@
toc: false
---
-If this is your first time using Hugo and you've [already installed Hugo on your machine][installed], we recommend the [quick start][].
+If this is your first time using Hugo and you've [already installed Hugo on your machine][installed], we recommend the [quick start][]. You can also use [external learning resources][] to learn Hugo.
[installed]: /getting-started/installing/
[quick start]: /getting-started/quick-start/
+[external learning resources]: /getting-started/external-learning-resources/
--- a/docs/content/en/getting-started/configuration.md
+++ b/docs/content/en/getting-started/configuration.md
@@ -350,9 +350,9 @@
Test and document setting params via JSON env var.
{{< /todo >}}
-## Ignore Files When Rendering
+## Ignore Content Files When Rendering
-The following statement inside `./config.toml` will cause Hugo to ignore files ending with `.foo` and `.boo` when rendering:
+The following statement inside `./config.toml` will cause Hugo to ignore content files ending with `.foo` and `.boo` when rendering:
```
ignoreFiles = [ "\\.foo$", "\\.boo$" ]
binary files /dev/null b/docs/content/en/getting-started/external-learning-resources/hia.jpg differ
--- /dev/null
+++ b/docs/content/en/getting-started/external-learning-resources/index.md
@@ -1,0 +1,29 @@
+---
+title: External Learning Resources
+linktitle: External Learning Resources
+description: A list of tutorials and books on Hugo.
+date: 2019-10-20
+publishdate: 2019-10-20
+lastmod: 2019-10-20
+keywords: [books,tutorials,learning,usage]
+menu:
+ docs:
+ parent: "getting-started"
+ weight: 70
+weight: 70
+sections_weight: 70
+draft: false
+toc: false
+---
+
+## Books
+### Hugo In Action
+[![Hugo In Action](hia.jpg)](https://www.manning.com/books/hugo-in-action)
+
+Hugo in Action is a step-by-step guide to using Hugo to create static websites. Working with a complete example website and source code samples, you’ll learn how to build and host a low-maintenance, high-performance site that will wow your users and stay stable without relying on a third-party server.
+
+[Hugo In Action Home Page](https://www.manning.com/books/hugo-in-action)
+
+## Video tutorials
+### Video Playlist by Mike Dane
+Mike Dane expains the various features of via dedicated tutorials on [Youtube](https://www.youtube.com/watch?list=PLLAZ4kZ9dFpOnyRlyS-liKL5ReHDcj4G3&v=qtIqKaDlqXo).
--- a/docs/content/en/getting-started/installing.md
+++ b/docs/content/en/getting-started/installing.md
@@ -463,6 +463,8 @@
This installs the "extended" Sass/SCSS version.
+This option is not recommended because the Hugo in Linux package managers for Debian and Ubuntu is usually a few versions behind as described [here](https://github.com/gcushen/hugo-academic/issues/703)
+
### Arch Linux
You can also install Hugo from the Arch Linux [community](https://www.archlinux.org/packages/community/x86_64/hugo/) repository. Applies also to derivatives such as Manjaro.
--- a/docs/content/en/getting-started/quick-start.md
+++ b/docs/content/en/getting-started/quick-start.md
@@ -21,7 +21,9 @@
{{% note %}}
This quick start uses `macOS` in the examples. For instructions about how to install Hugo on other operating systems, see [install](/getting-started/installing).
-It is recommended to have [Git](https://git-scm.com/downloads) installed to run this tutorial.
+It is recommended to have [Git installed](https://git-scm.com/downloads) to run this tutorial.
+
+For other approaches learning Hugo like book or a video tutorial refer to the [external learning resources](/getting-started/external-learning-resources/) page.
{{% /note %}}
--- a/docs/content/en/hosting-and-deployment/hugo-deploy.md
+++ b/docs/content/en/hosting-and-deployment/hugo-deploy.md
@@ -90,14 +90,14 @@
# Samples:
[[deployment.matchers]]
-# Cache static assets for 20 years.
+# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf)$"
-cacheControl = "max-age=630720000, no-transform, public"
+cacheControl = "max-age=31536000, no-transform, public"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(png|jpg)$"
-cacheControl = "max-age=630720000, no-transform, public"
+cacheControl = "max-age=31536000, no-transform, public"
gzip = false
[[deployment.matchers]]
--- a/docs/content/en/hugo-modules/use-modules.md
+++ b/docs/content/en/hugo-modules/use-modules.md
@@ -16,9 +16,9 @@
toc: true
---
-## Prerequisites
+## Prerequisite
-{{% gomodules-info %}}
+{{< gomodules-info >}}
--- a/docs/content/en/news/0.60.0-relnotes/index.md
+++ b/docs/content/en/news/0.60.0-relnotes/index.md
@@ -1,14 +1,23 @@
---
date: 2019-11-27
-title: "0.60.0"
-description: "0.60.0"
+title: "Now CommonMark Compliant!"
+description: "Goldmark -- CommonMark compliant, GitHub flavored, fast and flexible -- is the new default library for Markdown in Hugo."
categories: ["Releases"]
---
- [Goldmark](https://github.com/yuin/goldmark/) by [@yuin](https://github.com/yuin) is now the new default library used for Markdown in Hugo. It's CommonMark compliant and GitHub flavored, and both fast and flexible. Blackfriday, the old default, has served us well, but there have been formatting and portability issues that were hard to work around. The "CommonMark compliant" part is the main selling feature of Goldmark, but with that you also get attribute syntax on headers and code blocks (for code blocks you can turn on/off line numbers and highlight line ranges), strikethrough support and an improved and configurable implementation of `TableOfContents`. See [Markup Configuration](https://gohugo.io/getting-started/configuration-markup/) for an overview of extensions.
+[Goldmark](https://github.com/yuin/goldmark/) by [@yuin](https://github.com/yuin) is now the new default library used for Markdown in Hugo. It's CommonMark compliant and GitHub flavored, and both fast and flexible. Blackfriday, the old default, has served us well, but there have been formatting and portability issues that were hard to work around. The "CommonMark compliant" part is the main selling feature of Goldmark, but with that you also get attribute syntax on headers and code blocks (for code blocks you can turn on/off line numbers and highlight line ranges), strikethrough support and an improved and configurable implementation of `TableOfContents`. See [Markup Configuration](https://gohugo.io/getting-started/configuration-markup/) for an overview of extensions.
Please read the [Notes Section](#notes) and the updated documentation. We suggest you start with [List of content formats in Hugo](https://gohugo.io/content-management/formats/#list-of-content-formats). Goldmark is better, but the feature set is not fully comparable and it may be more stricter in some areas (there are 17 rules for how a [headline](https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis) should look like); if you have any problems you cannot work around, see [Configure Markup](https://gohugo.io/getting-started/configuration-markup/#configure-markup) for a way to change the default Markdown handler.
+
+Also, if you have lots of inline HTML in your Markdown files, you may have to enable the `unsafe` mode:
+
+{{< code-toggle file="config" >}}
+markup:
+ goldmark:
+ renderer:
+ unsafe: true
+{{< /code-toggle >}}
This release represents **62 contributions by 10 contributors** to the main Hugo code base. [@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@anthonyfok](https://github.com/anthonyfok), [@max-arnold](https://github.com/max-arnold), and [@trimbo](https://github.com/trimbo) for their ongoing contributions.
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) and [@onedrawingperday](https://github.com/onedrawingperday) for their relentless work on keeping the themes site in pristine condition and to [@kaushalmodi](https://github.com/kaushalmodi) and [@davidsneighbour](https://github.com/davidsneighbour) for great work on the documentation site.
binary files /dev/null b/docs/content/en/news/0.60.0-relnotes/poster-featured.png differ
binary files /dev/null b/docs/content/en/news/0.60.1-relnotes/featured-061.png differ
--- a/docs/content/en/news/0.60.1-relnotes/index.md
+++ b/docs/content/en/news/0.60.1-relnotes/index.md
@@ -4,9 +4,6 @@
title: "Hugo 0.60.1: A couple of Bug Fixes"
description: "This version fixes a couple of bugs introduced in 0.60.0."
categories: ["Releases"]
-images:
-- images/blog/hugo-bug-poster.png
-
---
binary files /dev/null b/docs/content/en/news/0.61.0-relnotes/hugo-61-featured.png differ
--- a/docs/content/en/news/0.61.0-relnotes/index.md
+++ b/docs/content/en/news/0.61.0-relnotes/index.md
@@ -1,12 +1,12 @@
---
date: 2019-12-11
-title: "0.61.0"
-description: "0.61.0"
+title: "40K GitHub Stars Edition"
+description: "40K stars on GitHub is a good enough reason to release a new version of Hugo!"
categories: ["Releases"]
---
- This is the [40K GitHub Stars Edition](https://github.com/gohugoio/hugo/stargazers). It's mostly a bug fix release, and an important note is the deprecation of Amber and Ace as template engines. See [#6609](https://github.com/gohugoio/hugo/issues/6609) for more information.
+This is the [40K GitHub Stars Edition](https://github.com/gohugoio/hugo/stargazers). It's mostly a bug fix release, and an important note is the deprecation of Amber and Ace as template engines. See [#6609](https://github.com/gohugoio/hugo/issues/6609) for more information.
This release represents **10 contributions by 3 contributors** to the main Hugo code base.
--- a/docs/content/en/templates/introduction.md
+++ b/docs/content/en/templates/introduction.md
@@ -25,8 +25,6 @@
Go Templates provide an extremely simple template language that adheres to the belief that only the most basic of logic belongs in the template or view layer.
-{{< youtube gnJbPO-GFIw >}}
-
## Basic Syntax
Go Templates are HTML files with the addition of [variables][variables] and [functions][functions]. Go Template variables and functions are accessible within `{{ }}`.
--- a/docs/content/en/templates/output-formats.md
+++ b/docs/content/en/templates/output-formats.md
@@ -4,7 +4,7 @@
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
date: 2017-03-22
publishdate: 2017-03-22
-lastmod: 2017-03-22
+lastmod: 2019-12-11
categories: [templates]
keywords: ["amp","outputs","rss"]
menu:
@@ -31,7 +31,7 @@
**Note:**
* It is possible to add custom media types or change the defaults; e.g., if you want to change the suffix for `text/html` to `asp`.
-* The `Suffix` is the value that will be used for URLs and filenames for that media type in Hugo.
+* `Suffixes` are the values that will be used for URLs and filenames for that media type in Hugo.
* The `Type` is the identifier that must be used when defining new/custom `Output Formats` (see below).
* The full set of media types will be registered in Hugo's built-in development server to make sure they are recognized by the browser.
@@ -40,9 +40,9 @@
{{< code-toggle file="config" >}}
[mediaTypes]
[mediaTypes."text/enriched"]
- suffix = "enr"
+ suffixes = ["enr"]
[mediaTypes."text/html"]
- suffix = "asp"
+ suffixes = ["asp"]
{{</ code-toggle >}}
The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type.
@@ -52,7 +52,7 @@
```toml
[mediaTypes]
[mediaTypes."text/html"]
-suffix = "htm"
+suffixes = ["htm"]
# Redefine HTML to update its media type.
[outputFormats]
@@ -221,7 +221,7 @@
A new output format needs a corresponding template in order to render anything useful.
{{% note %}}
-The key distinction for Hugo versions 0.20 and newer is that Hugo looks at an output format's `Name` and MediaType's `Suffix` when choosing the template used to render a given `Page`.
+The key distinction for Hugo versions 0.20 and newer is that Hugo looks at an output format's `Name` and MediaType's `Suffixes` when choosing the template used to render a given `Page`.
{{% /note %}}
The following table shows examples of different output formats, the suffix used, and Hugo's respective template [lookup order][]. All of the examples in the table can:
--- a/docs/content/en/tools/search.md
+++ b/docs/content/en/tools/search.md
@@ -18,7 +18,7 @@
toc: true
---
-A static website with a dynamic search function? Yes. As alternatives to embeddable scripts from Google or other search engines, you can provide your visitors a custom search by indexing your content files directly.
+A static website with a dynamic search function? Yes, Hugo provides an alternative to embeddable scripts from Google or other search engines for static websites. Hugo allows you to provide your visitors with a custom search function by indexing your content files directly.
* [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567). This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](https://lunrjs.com/) to serve the search results.
* [hugo-elasticsearch](https://www.npmjs.com/package/hugo-elasticsearch). Generate [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) indexes for Hugo static sites by parsing front matter. Hugo-Elasticsearch will generate a newline delimited JSON (NDJSON) file that can be bulk uploaded into Elasticsearch using any one of the available [clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html).
--- a/docs/data/docs.json
+++ b/docs/data/docs.json
@@ -1387,8 +1387,7 @@
},
"tableOfContents": {
"startLevel": 2,
- "endLevel": 3,
- "ordered": false
+ "endLevel": 3
},
"goldmark": {
"renderer": {
--- a/docs/data/homepagetweets.toml
+++ b/docs/data/homepagetweets.toml
@@ -1,4 +1,11 @@
[[tweet]]
+name = "Heinrich Hartmann"
+twitter_handle = "@heinrichhartman"
+quote = "Working with @GoHugoIO is such a joy. Having worked with #Jekyll in the past, the near instant preview is a big win! Did not expect this to make such a huge difference."
+link = "https://twitter.com/heinrichhartman/status/1199736512264462341"
+date = 2019-11-12T00:00:00Z
+
+[[tweet]]
name = "Joshua Steven"
twitter_handle = "@jscarto"
quote = "Can't overstate how much I enjoy <a href='https://twitter.com/gohugoio' target='_blank'>@GoHugoIO</a>. My site is relatively small, but *18 ms* to build the whole thing made template development and proofing a breeze."
--- a/docs/netlify.toml
+++ b/docs/netlify.toml
@@ -3,7 +3,7 @@
command = "hugo --gc --minify"
[context.production.environment]
-HUGO_VERSION = "0.59.1"
+HUGO_VERSION = "0.61.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@@ -11,7 +11,7 @@
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
-HUGO_VERSION = "0.59.1"
+HUGO_VERSION = "0.61.0"
HUGO_ENV = "production"
[context.deploy-preview]
@@ -18,13 +18,13 @@
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
-HUGO_VERSION = "0.59.1"
+HUGO_VERSION = "0.61.0"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
-HUGO_VERSION = "0.59.1"
+HUGO_VERSION = "0.61.0"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
binary files /dev/null b/docs/resources/_gen/images/news/0.60.0-relnotes/poster-featured_hu88aba11293facef11feec48164ba6c3f_31907_480x0_resize_catmullrom_2.png differ
binary files /dev/null b/docs/resources/_gen/images/news/0.60.0-relnotes/poster-featured_hu88aba11293facef11feec48164ba6c3f_31907_640x0_resize_catmullrom_2.png differ
binary files /dev/null b/docs/resources/_gen/images/news/0.60.1-relnotes/featured-061_hu55b86d71cf1e6f4fec276be0fe0d3e6e_28841_480x0_resize_catmullrom_2.png differ
binary files /dev/null b/docs/resources/_gen/images/news/0.60.1-relnotes/featured-061_hu55b86d71cf1e6f4fec276be0fe0d3e6e_28841_640x0_resize_catmullrom_2.png differ
binary files /dev/null b/docs/resources/_gen/images/news/0.61.0-relnotes/hugo-61-featured_huc7cf44fd2ae7c41ccbb87bf5c4aa169c_79929_480x0_resize_catmullrom_2.png differ
binary files /dev/null b/docs/resources/_gen/images/news/0.61.0-relnotes/hugo-61-featured_huc7cf44fd2ae7c41ccbb87bf5c4aa169c_79929_640x0_resize_catmullrom_2.png differ